-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
102 lines (89 loc) · 2.74 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
help:
@echo "This the O2sclpy root directory makefile. It is not intended"
@echo "for the end-user. Use 'python setup.py' for standard "
@echo "package setup and installation."
@echo "-------------------------------------------------------------"
@echo "Developer targets:"
@echo "doc: Make the documentation (requires sphinx & breathe)"
@echo "test: Test the library and output results to test.out"
@echo "testq: Test the library and output results to the screen"
@echo "sync-doc: Copies documentation to webserver"
@echo "open-doc: Open local documentation in browser"
@echo "web-doc: Open web documentation in browser (after sync-doc)"
@echo "test-sync:"
@echo "reinstall: Reinstall o2sclpy using pip3"
@echo "statfiles: Make the images and extra files for the docs"
@echo " (to be run before 'make doc')"
@echo
@echo "-------------------------------------------------------------"
@echo "Notes: to upload to pypi run 'rm dist/*',"
@echo "'python3 setup.py sdist bdist_wheel'"
@echo " and then 'twine upload dist/*'."
BROWSER =
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
BROWSER += open
else
BROWSER += xdg-open
endif
open-doc: .empty
$(BROWSER) doc/build/html/index.html
web-doc: .empty
$(BROWSER) "https://neutronstars.utk.edu/code/o2sclpy"
doc: .empty
cd doc/static; o2graph -h | grep -v "Set o2scl" | \
grep -v "Compiled at" | grep -v "New alias" > o2graph.help.txt
cd examples; $(MAKE) link_o2scl.ipynb
cd examples; $(MAKE) table.ipynb
cd examples; $(MAKE) tov.ipynb
cd examples; $(MAKE) unit_conv.ipynb
cd examples; $(MAKE) skyrme.ipynb
cd examples; $(MAKE) nucmass.ipynb
cd examples; $(MAKE) SFHo_SFHx.ipynb
cd examples; $(MAKE) DSH.ipynb
cd examples; $(MAKE) buchdahl.ipynb
cd doc; $(MAKE) html
sync-doc:
cd doc; $(MAKE) sync-doc
test-sync:
cd doc; $(MAKE) test-sync
test:
pytest o2sclpy/test \
examples/link_o2scl.py \
examples/table.py \
examples/unit_conv.py \
examples/skyrme.py \
examples/nucmass.py \
examples/SFHo_SFHx.py \
examples/DSH.py \
examples/buchdahl.py \
examples/tov.py \
examples/test_examples.py \
-s -v > test.out 2>&1 &
# This target is used by cron scripts to redirect the testing output
testq:
pytest o2sclpy/test \
examples/link_o2scl.py \
examples/table.py \
examples/unit_conv.py \
examples/skyrme.py \
examples/nucmass.py \
examples/SFHo_SFHx.py \
examples/DSH.py \
examples/buchdahl.py \
examples/tov.py \
examples/test_examples.py -s -v
ifeq ($(MACHINE),isospin)
PIP3_CMD = sudo pip3
else
PIP3_CMD = pip3
endif
reinstall:
-$(PIP3_CMD) uninstall -y o2sclpy
$(PIP3_CMD) install .
.empty:
statfiles:
cd doc; $(MAKE) statfiles
#Change permissions to current user with sudo
permfix:
sudo chown -R `whoami`:`whoami` * .git