forked from dkav/Circuitscape.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (62 loc) · 2.4 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
VER=4.0.5
# run standard verify routines
test:
python bin/csverify.py
# Register as a Python Package:
# 1. make pypi
# 2. make pypi_register
# 3. make pypi_upload
# generate the README in ReST format as Python packaging requires
pypi_readme:
pandoc -f markdown -t rst -o README.txt README.md
# create the python distribution
pypi: clean pypi_readme
python setup.py sdist
rm -f README.txt
# upload the python distribution
pypi_upload: clean pypi_readme
python setup.py register sdist upload
rm -f README.txt
# register the python distribution
pypi_register: clean pypi_readme
python setup.py register
rm -f README.txt
# generate mac binary bundle
mac: clean
python setup-mac.py py2app --iconfile circuitscape.icns
rm -fr output/Circuitscape-$(VER).dmg
hdiutil create -srcfolder ./dist/Circuitscape.app output/Circuitscape-$(VER).dmg
# generate a source bundle
src: clean
tar zcvf output/Circuitscape-src-$(VER).tar.gz --exclude .svn Makefile circuitscape.icns circuitscape.iss cs_logo.ico examples circuitscape
# Generate HTML and PDF format documents from the markdown format
# Requires pandoc (http://johnmacfarlane.net/pandoc/) and a TeX package that pandoc can work with.
#
# Intermediate html format is required to get the correct size of embedded images.
# Intermediate tex format is required only to handle unicode symbols in the md file.
# commented commands below:
# cd docs/4.0; \
# no-tex-ligatures needed for quotation marks in next line \
# pandoc -f markdown --no-tex-ligatures -o circuitscape_4_0_user_guide.html circuitscape_4_0.md; \
# removing pdf conversion and sticking with html for now \
# pandoc -o t1.tex circuitscape_4_0.html; \
# cat t1.tex | python -c "import sys; map(lambda x: sys.stdout.write(x.replace('√2', '$$\sqrt2$$')), sys.stdin);" > t2.tex; \
# pandoc --smart -o circuitscape_4_0.pdf t2.tex; \
# rm -f t1.tex t2.tex circuitscape_4_0.html; \
# cd ../..
doc:
cd docs/4.0; \
pandoc -f markdown --no-tex-ligatures -o circuitscape_4_0_user_guide.html circuitscape_4_0.md; \
cd ../..
clean:
rm -fr circuitscape/verify/output/*.ini
rm -fr circuitscape/verify/output/*.asc
rm -fr circuitscape/verify/output/*.txt
rm -fr circuitscape/verify/output/*.out
rm -fr circuitscape/verify/output/*.log
rm -fr *~ *# *.pyc
mkdir -p output
cleanall: clean
rm -fr dist build output
mkdir -p output
all: mac src