Mercurial > moin > 1.9
annotate Makefile @ 3243:1ad6243cdf06
macros: refactor for new arg parser
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Wed, 12 Mar 2008 00:23:45 +0100 |
parents | 2a3a6cb34e45 |
children | c8296a0c9799 |
rev | line source |
---|---|
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
1 # |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
2 # Makefile for MoinMoin |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
3 # |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
4 |
1598
dec11b291ba5
move the wikiconfig.py we use for testing out of the way
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
1056
diff
changeset
|
5 # location for the wikiconfig.py we use for testing: |
1603
767109c48208
rearrange testing setup, make moin.py runnable from toplevel dir
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
1598
diff
changeset
|
6 export PYTHONPATH=$(PWD)/tests:$(PWD) |
1598
dec11b291ba5
move the wikiconfig.py we use for testing out of the way
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
1056
diff
changeset
|
7 |
1603
767109c48208
rearrange testing setup, make moin.py runnable from toplevel dir
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
1598
diff
changeset
|
8 testwiki := ./tests/wiki |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
9 share := ./wiki |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
10 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
11 all: |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
12 python setup.py build |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
13 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
14 install-docs: |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
15 -mkdir build |
2981
0b9c89023917
use new master wiki url, master wiki runs 1.6 now (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
2056
diff
changeset
|
16 wget -U MoinMoin/Makefile -O build/INSTALL.html "http://master.moinmo.in/MoinMoin/InstallDocs?action=print" |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
17 sed \ |
2981
0b9c89023917
use new master wiki url, master wiki runs 1.6 now (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
2056
diff
changeset
|
18 -e 's#href="/#href="http://master.moinmo.in/#g' \ |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
19 -e 's#http://[a-z\.]*/wiki/classic/#/wiki/classic/#g' \ |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
20 -e 's#http://[a-z\.]*/wiki/modern/#/wiki/modern/#g' \ |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
21 -e 's#http://[a-z\.]*/wiki/rightsidebar/#/wiki/rightsidebar/#g' \ |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
22 -e 's#/wiki/classic/#wiki/htdocs/classic/#g' \ |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
23 -e 's#/wiki/modern/#wiki/htdocs/modern/#g' \ |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
24 -e 's#/wiki/rightsidebar/#wiki/htdocs/rightsidebar/#g' \ |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
25 build/INSTALL.html >docs/INSTALL.html |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
26 -rm build/INSTALL.html |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
27 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
28 -rmdir build |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
29 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
30 interwiki: |
2981
0b9c89023917
use new master wiki url, master wiki runs 1.6 now (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
2056
diff
changeset
|
31 wget -U MoinMoin/Makefile -O $(share)/data/intermap.txt "http://master.moinmo.in/InterWikiMap?action=raw" |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
32 chmod 664 $(share)/data/intermap.txt |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
33 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
34 check-tabs: |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
35 @python -c 'import tabnanny ; tabnanny.check("MoinMoin")' |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
36 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
37 # Create documentation |
491
be33ecd58d4e
add run() methods to scripts, include version info into MoinMoin/__init__.py for epydoc
Thomas Waldmann <tw@waldmann-edv.de>
parents:
365
diff
changeset
|
38 epydoc: patchlevel |
2056
fca8ed243a88
fixed Makefile for epydoc 3.0
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
2055
diff
changeset
|
39 @epydoc -o ../html-1.7 --name=MoinMoin --url=http://moinmo.in/ --graph=all --graph-font=Arial MoinMoin |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
40 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
41 # Create new underlay directory from MoinMaster |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
42 # Should be used only on TW machine |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
43 underlay: |
504 | 44 rm -rf $(share)/underlay |
2981
0b9c89023917
use new master wiki url, master wiki runs 1.6 now (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
2056
diff
changeset
|
45 MoinMoin/script/moin.py --config-dir=/srv/de.wikiwikiweb.moinmaster/bin16 --wiki-url=master.moinmo.in/ maint globaledit |
0b9c89023917
use new master wiki url, master wiki runs 1.6 now (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
2056
diff
changeset
|
46 MoinMoin/script/moin.py --config-dir=/srv/de.wikiwikiweb.moinmaster/bin16 --wiki-url=master.moinmo.in/ maint reducewiki --target-dir=$(share)/underlay |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
47 rm -rf $(share)/underlay/pages/InterWikiMap/ |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
48 echo -ne "#acl All:read\r\nSee MoinMoin:EditingOnMoinMaster.\r\n" > \ |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
49 $(share)/underlay/pages/MoinPagesEditorGroup/revisions/00000001 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
50 cd $(share); rm -rf underlay.tar.bz2; tar cjf underlay.tar.bz2 underlay |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
51 |
315
830cf8bdcf24
implemented 'make pagepacks', updated underlay
Thomas Waldmann <tw@waldmann-edv.de>
parents:
313
diff
changeset
|
52 pagepacks: |
2006
1339d6fdc4ff
Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents:
1920
diff
changeset
|
53 @python MoinMoin/_tests/maketestwiki.py |
1603
767109c48208
rearrange testing setup, make moin.py runnable from toplevel dir
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
1598
diff
changeset
|
54 @MoinMoin/script/moin.py --config-dir=$(testwiki)/.. maint mkpagepacks |
315
830cf8bdcf24
implemented 'make pagepacks', updated underlay
Thomas Waldmann <tw@waldmann-edv.de>
parents:
313
diff
changeset
|
55 cd $(share) ; rm -rf underlay |
830cf8bdcf24
implemented 'make pagepacks', updated underlay
Thomas Waldmann <tw@waldmann-edv.de>
parents:
313
diff
changeset
|
56 cp -a $(testwiki)/underlay $(share)/ |
830cf8bdcf24
implemented 'make pagepacks', updated underlay
Thomas Waldmann <tw@waldmann-edv.de>
parents:
313
diff
changeset
|
57 |
830cf8bdcf24
implemented 'make pagepacks', updated underlay
Thomas Waldmann <tw@waldmann-edv.de>
parents:
313
diff
changeset
|
58 dist: |
830cf8bdcf24
implemented 'make pagepacks', updated underlay
Thomas Waldmann <tw@waldmann-edv.de>
parents:
313
diff
changeset
|
59 -rm MANIFEST |
830cf8bdcf24
implemented 'make pagepacks', updated underlay
Thomas Waldmann <tw@waldmann-edv.de>
parents:
313
diff
changeset
|
60 python setup.py sdist |
830cf8bdcf24
implemented 'make pagepacks', updated underlay
Thomas Waldmann <tw@waldmann-edv.de>
parents:
313
diff
changeset
|
61 |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
62 # Create patchlevel module |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
63 patchlevel: |
596
1c326229c683
use hg for patchlevel generation (via hg identify)
tw@waldmann-edv.de
parents:
562
diff
changeset
|
64 @echo -e patchlevel = "\"`hg identify`\"\n" >MoinMoin/patchlevel.py |
730
2fefb02cf54f
update version in MoinMoin/__init__.py by make patchlevel target
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
597
diff
changeset
|
65 @MoinMoin/version.py update |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
66 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
67 # Report translations status |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
68 check-i18n: |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
69 MoinMoin/i18n/check_i18n.py |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
70 |
731
f78e361cb786
remove reference to tla in Makefile comment
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
730
diff
changeset
|
71 # Update the workdir from the default pull repo |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
72 update: |
597 | 73 hg pull -u |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
74 $(MAKE) patchlevel |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
75 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
76 # Update underlay directory from the tarball |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
77 update-underlay: |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
78 cd $(share); rm -rf underlay; tar xjf underlay.tar.bz2 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
79 |
2006
1339d6fdc4ff
Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents:
1920
diff
changeset
|
80 test: |
1339d6fdc4ff
Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents:
1920
diff
changeset
|
81 @echo Testing is now done using \`py.test\`. py.test can be installed by downloading from http://codespeak.net/py/dist/download.html |
1339d6fdc4ff
Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents:
1920
diff
changeset
|
82 @echo Writing tests is explained on http://codespeak.net/py/dist/test.html |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
83 |
886
203686df2c6d
Added a makefile target for coverage analysis of the unit tests (called coverage).
Alexander Schremmer <alex AT alexanderweb DOT de>
parents:
731
diff
changeset
|
84 coverage: |
2006
1339d6fdc4ff
Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents:
1920
diff
changeset
|
85 @python MoinMoin/_tests/maketestwiki.py |
886
203686df2c6d
Added a makefile target for coverage analysis of the unit tests (called coverage).
Alexander Schremmer <alex AT alexanderweb DOT de>
parents:
731
diff
changeset
|
86 @python -u -m trace --count --coverdir=cover --missing tests/runtests.py |
203686df2c6d
Added a makefile target for coverage analysis of the unit tests (called coverage).
Alexander Schremmer <alex AT alexanderweb DOT de>
parents:
731
diff
changeset
|
87 |
1920
b06ef2a53efa
'make pylint', fixed lots of minor stuff found by pylint (and there is still lots left to do)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
1603
diff
changeset
|
88 pylint: |
3175
2a3a6cb34e45
pylint findings: fix some harmless stuff
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
2981
diff
changeset
|
89 @pylint --disable-msg=W0142,W0511,W0612,W0613,C0103,C0111,C0302,C0321,C0322 --disable-msg-cat=R MoinMoin |
886
203686df2c6d
Added a makefile target for coverage analysis of the unit tests (called coverage).
Alexander Schremmer <alex AT alexanderweb DOT de>
parents:
731
diff
changeset
|
90 |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
91 clean: clean-testwiki clean-pyc |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
92 rm -rf build |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
93 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
94 clean-testwiki: |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
95 rm -rf $(testwiki)/* |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
96 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
97 clean-pyc: |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
98 find . -name "*.pyc" -exec rm -rf "{}" \; |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
99 |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
100 .PHONY: all dist install-docs check-tabs epydoc underlay patchlevel \ |
597 | 101 check-i18n update update-underlay test testwiki clean \ |
0
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
102 clean-testwiki clean-pyc |
77665d8e2254
tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff
changeset
|
103 |