root/trunk/Makefile

Revision 1717, 3.9 kB (checked in by rob, 5 weeks ago)

Modified build process to not regenerate eggs every time making a new distribution
* 'make eggs' now forces source code to be included to work around py2exe leaving out .pyc files from the library.zip

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Url Rev Author Date Id"
Line 
1# Documentation builder stuff
2
3HTML = web/index.html web/about.html web/faq.html web/download.html web/thanks.html web/screenshots.html web/README.html web/ChangeLog.html web/manual
4PRE =
5CSS = web/css web/js
6IMAGES = web/peppy-web-logo.png web/0.3 web/0.6 web/0.7 web/*.png
7WEBSITE = $(CSS) $(HTML) $(PRE) $(IMAGES)
8AUX_LOCALE_DIRS = /opt/python/taskcoach/i18n.in /opt/wx/src/wxPython/wx/tools/Editra/locale /opt/python/ulipad/lang /usr/share/locale /usr/kde/3.5/share/locale
9
10# Distribution stuff
11TAR = tar
12TAROPTS = --exclude=.git --exclude=.svn --exclude='*.pyc' --exclude='*~'
13COMPRESS = bzip2 -f
14
15PACKAGE := peppy
16VERSION := $(shell python make-changelog.py  --version)
17
18EPYDOC = epydoc -v -v -v --no-sourcecode --debug
19
20srcdir = .
21top_srcdir = .
22top_builddir = .
23
24distdir := $(PACKAGE)-$(VERSION)
25top_distdir := $(distdir)
26
27APPMAIN = peppy.py
28WINBATCH = peppy.bat
29SCRIPTMAIN = scripts/peppy
30DISTMAIN = peppy/__init__.py
31
32DISTFILES := AUTHORS ChangeLog docs FAQ INSTALL LICENSE.* NEWS README TODO peppy peppy.py peppy.bat setup_mac.py tests
33
34
35
36.SUFFIXES:      .html.in .pre.in .html
37
38.html.in.html: web/template.html.in web/mainmenu.html.in
39        ./make-doc.py -m peppy -o $*.html -n mainMenu web/mainmenu.html.in -n htmlBody $*.html.in -t web/template.html.in
40
41.pre.in.html: web/template.html.in web/mainmenu.html.in
42        ./make-doc.py -m peppy -o $*.html -n mainMenu web/mainmenu.html.in -n preBody $*.pre.in -t web/template.html.in
43
44
45
46
47
48all: doc
49
50README: README.pre.in ChangeLog
51        ./make-doc.py -m peppy -o README README.pre.in
52
53INSTALL: INSTALL.pre.in ChangeLog
54        ./make-doc.py -m peppy -o INSTALL INSTALL.pre.in
55
56doc: README INSTALL
57
58html: $(HTML) $(PRE) README.html doc
59        cp README.html web/
60        (cd manual; make html)
61        mkdir -p web/manual
62        rsync -avuz manual/_build/html/ web/manual/
63
64web/thanks.html.in:
65        python peppy.py --no-server --no-splash --thanks > web/thanks.html.in
66web/screenshots.html.in: web/0.*
67        (cd web; photo-album.py --nodatedir 0.*; photo-index.py -a -b -r -o screenshots.html.in)
68web/ChangeLog.html.in: ChangeLog
69        ./make-doc.py -c -m peppy -o web/ChangeLog.html.in ChangeLog
70
71$(HTML): web/template.html.in web/mainmenu.html.in web/ChangeLog.html.in ChangeLog
72
73publish_html: html
74        rsync -avuz $(WEBSITE) robm351@www.flipturn.org:peppy.flipturn.org/
75
76publish_api: api
77        rsync -avuz api robm351@www.flipturn.org:peppy.flipturn.org/
78
79release: dist
80        -mkdir -p archive
81        mv $(distdir).tar.bz2 archive
82       
83splash:
84        img2py -u graphics/peppy-splash.png peppy/splash_image.py
85
86publish: api html
87        rsync -avuz $(WEBSITE) archive robm351@www.flipturn.org:peppy.flipturn.org/
88
89locale-full-rebuild:
90        i18n.in/make-podict.py -a i18n.in -o peppy/i18n i18n.in/messages.pot $(AUX_LOCALE_DIRS)
91
92locale:
93        i18n.in/make-podict.py -f -a i18n.in -o peppy/i18n i18n.in/messages.pot
94
95dist: distdir
96        -chmod -R a+r $(distdir)
97        rm -f $(distdir)/peppy/icons/iconmap.py
98        rm -f $(distdir)/peppy/py2exe_plugins.py
99        $(TAR) cvf $(distdir).tar $(TAROPTS) $(distdir)
100        $(COMPRESS) $(distdir).tar
101        -rm -rf $(distdir)
102
103eggs:
104        ./plugins/egg-utils.py -d ./plugins/build -k egg
105
106distdir:
107        ./make-changelog.py -m peppy
108        ./make-doc.py -m peppy -o README README.pre.in
109        ./make-doc.py -m peppy -o INSTALL INSTALL.pre.in
110        -rm -rf $(distdir)
111       
112        # Force setup to use MANIFEST.in
113        -rm -f MANIFEST
114        python setup.py sdist -k
115        chmod 644 $(distdir)/tests/*.py
116       
117        mkdir -p $(distdir)/plugins
118        cp ./plugins/build/*.egg $(distdir)/plugins
119       
120        cp win-executable.nsi $(distdir)
121        ./make-doc.py -m peppy -o $(distdir)/win-installer.nsi win-installer.nsi.in
122
123nsis:
124        ./make-doc.py -m peppy -o $(distdir)/win-installer.nsi win-installer.nsi.in
125
126api: distdir
127        (cd $(distdir); $(EPYDOC) -o docs/api --exclude "peppy\.editra\..+" --no-private --url 'http://peppy.flipturn.org/' peppy) 2>&1 | tee epydoc.out
128        rm -rf api
129        mv $(distdir)/docs/api .
130
131
132
133clean:
134        rm -rf *~ *.o *.exe build api README $(HTML) $(PRE) $(distdir)
135
136.PHONY: print-% clean html publish_html api publish_api publish release dist distdir
137
138print-%: ; @ echo $* = $($*)
139
Note: See TracBrowser for help on using the browser.