-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
48 lines (34 loc) · 1.21 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
.PHONY: doc
nothing:
@- echo
@- echo "Run Makefile with a command: all/doc/html/latex/clean"
@- echo
docdir = doc/
srcdir = doc/source/
build_latex = doc/build/latex/
build_html = doc/build/html/
build_singlehtml = doc/build/single_html/
sphinxbuild_options =
# -D extensions=['sphinxcontrib.napoleon','sphinx.ext.autodoc','sphinx.ext.viewcode',]
sphinx_build = sphinx-build $(sphinxbuild_options)
SVNREV = $(shell svn info | grep Revision | awk '{print $$2;}')
doc:
@- sphinx-apidoc . --force -H QuickReduce -R $(SVNREV) -o $(srcdir)
latex: doc
@- $(sphinx_build) -b latex $(srcdir) $(build_latex)
# Run latex twice to get the table of contents right
@- cd $(build_latex); pwd; pdflatex -interaction=nonstopmode QuickReduce.tex;
@- cd $(build_latex); pwd; pdflatex -interaction=nonstopmode QuickReduce.tex;
@- cp $(build_latex)/QuickReduce.pdf $(docdir)
html: doc
@- sphinx-build -b html $(srcdir) $(build_html)
single_html: doc
@- sphinx-build -b singlehtml $(srcdir) $(build_singlehtml)
all: doc html latex single_html
clean:
rm -rf doc/build/*
lac:
python setup.py build_ext --inplace
time ./test_lac.py input.fits
# ds9 input.fits test_out.fits
ds9 test_out.it2.fits -scale minmax -scale log -zoom 2