| 1 | # Documentation builder stuff |
|---|
| 2 | |
|---|
| 3 | HTML = 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 |
|---|
| 4 | PRE = |
|---|
| 5 | CSS = web/css web/js |
|---|
| 6 | IMAGES = web/peppy-web-logo.png web/0.3 web/0.6 web/0.7 web/*.png |
|---|
| 7 | WEBSITE = $(CSS) $(HTML) $(PRE) $(IMAGES) |
|---|
| 8 | AUX_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 |
|---|
| 11 | TAR = tar |
|---|
| 12 | TAROPTS = --exclude=.git --exclude=.svn --exclude='*.pyc' --exclude='*~' |
|---|
| 13 | COMPRESS = bzip2 -f |
|---|
| 14 | |
|---|
| 15 | PACKAGE := peppy |
|---|
| 16 | VERSION := $(shell python make-changelog.py --version) |
|---|
| 17 | |
|---|
| 18 | EPYDOC = epydoc -v -v -v --no-sourcecode --debug |
|---|
| 19 | |
|---|
| 20 | srcdir = . |
|---|
| 21 | top_srcdir = . |
|---|
| 22 | top_builddir = . |
|---|
| 23 | |
|---|
| 24 | distdir := $(PACKAGE)-$(VERSION) |
|---|
| 25 | top_distdir := $(distdir) |
|---|
| 26 | |
|---|
| 27 | APPMAIN = peppy.py |
|---|
| 28 | WINBATCH = peppy.bat |
|---|
| 29 | SCRIPTMAIN = scripts/peppy |
|---|
| 30 | DISTMAIN = peppy/__init__.py |
|---|
| 31 | |
|---|
| 32 | DISTFILES := 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 | |
|---|
| 48 | all: doc |
|---|
| 49 | |
|---|
| 50 | README: README.pre.in ChangeLog |
|---|
| 51 | ./make-doc.py -m peppy -o README README.pre.in |
|---|
| 52 | |
|---|
| 53 | INSTALL: INSTALL.pre.in ChangeLog |
|---|
| 54 | ./make-doc.py -m peppy -o INSTALL INSTALL.pre.in |
|---|
| 55 | |
|---|
| 56 | doc: README INSTALL |
|---|
| 57 | |
|---|
| 58 | html: $(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 | |
|---|
| 64 | web/thanks.html.in: |
|---|
| 65 | python peppy.py --no-server --no-splash --thanks > web/thanks.html.in |
|---|
| 66 | web/screenshots.html.in: web/0.* |
|---|
| 67 | (cd web; photo-album.py --nodatedir 0.*; photo-index.py -a -b -r -o screenshots.html.in) |
|---|
| 68 | web/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 | |
|---|
| 73 | publish_html: html |
|---|
| 74 | rsync -avuz $(WEBSITE) robm351@www.flipturn.org:peppy.flipturn.org/ |
|---|
| 75 | |
|---|
| 76 | publish_api: api |
|---|
| 77 | rsync -avuz api robm351@www.flipturn.org:peppy.flipturn.org/ |
|---|
| 78 | |
|---|
| 79 | release: dist |
|---|
| 80 | -mkdir -p archive |
|---|
| 81 | mv $(distdir).tar.bz2 archive |
|---|
| 82 | |
|---|
| 83 | splash: |
|---|
| 84 | img2py -u graphics/peppy-splash.png peppy/splash_image.py |
|---|
| 85 | |
|---|
| 86 | publish: api html |
|---|
| 87 | rsync -avuz $(WEBSITE) archive robm351@www.flipturn.org:peppy.flipturn.org/ |
|---|
| 88 | |
|---|
| 89 | locale-full-rebuild: |
|---|
| 90 | i18n.in/make-podict.py -a i18n.in -o peppy/i18n i18n.in/messages.pot $(AUX_LOCALE_DIRS) |
|---|
| 91 | |
|---|
| 92 | locale: |
|---|
| 93 | i18n.in/make-podict.py -f -a i18n.in -o peppy/i18n i18n.in/messages.pot |
|---|
| 94 | |
|---|
| 95 | dist: 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 | |
|---|
| 103 | eggs: |
|---|
| 104 | ./plugins/egg-utils.py -d ./plugins/build -k egg |
|---|
| 105 | |
|---|
| 106 | distdir: |
|---|
| 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 | |
|---|
| 123 | nsis: |
|---|
| 124 | ./make-doc.py -m peppy -o $(distdir)/win-installer.nsi win-installer.nsi.in |
|---|
| 125 | |
|---|
| 126 | api: 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 | |
|---|
| 133 | clean: |
|---|
| 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 | |
|---|
| 138 | print-%: ; @ echo $* = $($*) |
|---|
| 139 | |
|---|