Makefile
author Reimar Bauer <rb.proj AT googlemail DOT com>
Mon, 19 Jan 2009 01:20:04 +0100
changeset 4247 c76d50dac855
parent 4039 532865ba8334
child 4521 600e220938db
permissions -rw-r--r--
text_html_text_moin_wiki: bug fix for GuiEditorBreaksIndentedTable
tw-public@0
     1
#
tw-public@0
     2
# Makefile for MoinMoin
tw-public@0
     3
#
tw-public@0
     4
tw@1598
     5
# location for the wikiconfig.py we use for testing:
tw@4096
     6
export PYTHONPATH=$(PWD)
tw@1598
     7
tw@1603
     8
testwiki := ./tests/wiki
tw-public@0
     9
share := ./wiki
tw-public@0
    10
tw-public@0
    11
all:
tw-public@0
    12
	python setup.py build
tw-public@0
    13
tw-public@0
    14
install-docs:
tw-public@0
    15
	-mkdir build
tw@4039
    16
	wget -U MoinMoin/Makefile -O build/INSTALL.html "http://master18.moinmo.in/MoinMoin/InstallDocs?action=print"
tw-public@0
    17
	sed \
tw@4039
    18
		-e 's#href="/#href="http://master18.moinmo.in/#g' \
tw-public@0
    19
		-e 's#http://[a-z\.]*/wiki/classic/#/wiki/classic/#g' \
tw-public@0
    20
		-e 's#http://[a-z\.]*/wiki/modern/#/wiki/modern/#g' \
tw-public@0
    21
		-e 's#http://[a-z\.]*/wiki/rightsidebar/#/wiki/rightsidebar/#g' \
tw-public@0
    22
		-e 's#/wiki/classic/#wiki/htdocs/classic/#g' \
tw-public@0
    23
		-e 's#/wiki/modern/#wiki/htdocs/modern/#g' \
tw-public@0
    24
		-e 's#/wiki/rightsidebar/#wiki/htdocs/rightsidebar/#g' \
tw-public@0
    25
        build/INSTALL.html >docs/INSTALL.html
tw-public@0
    26
	-rm build/INSTALL.html
tw-public@0
    27
tw@4039
    28
	wget -U MoinMoin/Makefile -O build/UPDATE.html "http://master18.moinmo.in/HelpOnUpdating?action=print"
rb@3688
    29
	sed \
tw@4039
    30
		-e 's#href="/#href="http://master18.moinmo.in/#g' \
rb@3688
    31
		-e 's#http://[a-z\.]*/wiki/classic/#/wiki/classic/#g' \
rb@3688
    32
		-e 's#http://[a-z\.]*/wiki/modern/#/wiki/modern/#g' \
rb@3688
    33
		-e 's#http://[a-z\.]*/wiki/rightsidebar/#/wiki/rightsidebar/#g' \
rb@3688
    34
		-e 's#/wiki/classic/#wiki/htdocs/classic/#g' \
rb@3688
    35
		-e 's#/wiki/modern/#wiki/htdocs/modern/#g' \
rb@3688
    36
		-e 's#/wiki/rightsidebar/#wiki/htdocs/rightsidebar/#g' \
rb@3688
    37
        build/UPDATE.html >docs/UPDATE.html
rb@3688
    38
	-rm build/UPDATE.html
tw-public@0
    39
	-rmdir build
tw-public@0
    40
tw-public@0
    41
interwiki:
tw@4039
    42
	wget -U MoinMoin/Makefile -O $(share)/data/intermap.txt "http://master18.moinmo.in/InterWikiMap?action=raw"
tw-public@0
    43
	chmod 664 $(share)/data/intermap.txt
tw-public@0
    44
tw-public@0
    45
check-tabs:
tw-public@0
    46
	@python -c 'import tabnanny ; tabnanny.check("MoinMoin")'
tw-public@0
    47
tw-public@0
    48
# Create documentation
tw@491
    49
epydoc: patchlevel
tw@4039
    50
	@epydoc -o ../html-1.8 --name=MoinMoin --url=http://moinmo.in/ --graph=all --graph-font=Arial MoinMoin
tw-public@0
    51
tw-public@0
    52
# Create new underlay directory from MoinMaster
tw-public@0
    53
# Should be used only on TW machine
tw-public@0
    54
underlay:
tw@504
    55
	rm -rf $(share)/underlay
tw@4039
    56
	MoinMoin/script/moin.py --config-dir=/srv/moin/cfg/1.8 --wiki-url=master18.moinmo.in/ maint globaledit
tw@4039
    57
	MoinMoin/script/moin.py --config-dir=/srv/moin/cfg/1.8 --wiki-url=master18.moinmo.in/ maint reducewiki --target-dir=$(share)/underlay
tw@3681
    58
	rm -rf $(share)/underlay/pages/InterWikiMap
tw@3681
    59
	rm -rf $(share)/underlay/pages/MoinPagesEditorGroup
tw@3381
    60
	cd $(share); rm -f underlay.tar; tar cf underlay.tar underlay
tw-public@0
    61
tw@315
    62
pagepacks:
alex@2006
    63
	@python MoinMoin/_tests/maketestwiki.py
tw@4096
    64
	@MoinMoin/script/moin.py --config-dir=MoinMoin/_tests maint mkpagepacks
tw@315
    65
	cd $(share) ; rm -rf underlay
tw@315
    66
	cp -a $(testwiki)/underlay $(share)/
tw@315
    67
	
tw@315
    68
dist:
tw@315
    69
	-rm MANIFEST
tw@315
    70
	python setup.py sdist
tw@315
    71
tw-public@0
    72
# Create patchlevel module
tw-public@0
    73
patchlevel:
tw@596
    74
	@echo -e patchlevel = "\"`hg identify`\"\n" >MoinMoin/patchlevel.py
tw@730
    75
	@MoinMoin/version.py update
tw-public@0
    76
tw-public@0
    77
# Report translations status
tw-public@0
    78
check-i18n:
rb@3769
    79
	MoinMoin/i18n/tools/check_i18n.py
tw-public@0
    80
tw@731
    81
# Update the workdir from the default pull repo
tw-public@0
    82
update:
tw@597
    83
	hg pull -u
tw-public@0
    84
	$(MAKE) patchlevel
tw-public@0
    85
tw-public@0
    86
# Update underlay directory from the tarball
tw-public@0
    87
update-underlay:
tw@3381
    88
	cd $(share); rm -rf underlay; tar xf underlay.tar
tw-public@0
    89
alex@2006
    90
test:
alex@2006
    91
	@echo Testing is now done using \`py.test\`. py.test can be installed by downloading from http://codespeak.net/py/dist/download.html
alex@2006
    92
	@echo Writing tests is explained on http://codespeak.net/py/dist/test.html
tw-public@0
    93
alex@886
    94
coverage:
alex@2006
    95
	@python MoinMoin/_tests/maketestwiki.py
alex@886
    96
	@python -u -m trace --count --coverdir=cover --missing tests/runtests.py
alex@886
    97
tw@1920
    98
pylint:
tw@3175
    99
	@pylint --disable-msg=W0142,W0511,W0612,W0613,C0103,C0111,C0302,C0321,C0322 --disable-msg-cat=R MoinMoin
alex@886
   100
tw-public@0
   101
clean: clean-testwiki clean-pyc
tw-public@0
   102
	rm -rf build
tw-public@0
   103
tw-public@0
   104
clean-testwiki:
tw-public@0
   105
	rm -rf $(testwiki)/*
tw-public@0
   106
tw-public@0
   107
clean-pyc:
tw-public@0
   108
	find . -name "*.pyc" -exec rm -rf "{}" \; 
tw-public@0
   109
tw-public@0
   110
.PHONY: all dist install-docs check-tabs epydoc underlay patchlevel \
tw@597
   111
	check-i18n update update-underlay test testwiki clean \
tw-public@0
   112
	clean-testwiki clean-pyc
tw-public@0
   113