| 1 | # $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $ |
| 2 | ################################################################################ |
| 3 | # definitions |
| 4 | |
| 5 | VERSION := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/\t.*//") |
| 6 | |
| 7 | PKG_NAME = platal |
| 8 | PKG_DIST = $(PKG_NAME)-$(VERSION) |
| 9 | PKG_FILES = AUTHORS ChangeLog COPYING README Makefile |
| 10 | PKG_DIRS = configs htdocs include install.d plugins po scripts templates upgrade |
| 11 | |
| 12 | VCS_FILTER = ! -name .arch-ids ! -name CVS |
| 13 | |
| 14 | ################################################################################ |
| 15 | # global targets |
| 16 | |
| 17 | all: build |
| 18 | |
| 19 | devel: build htdocs/valid.html |
| 20 | |
| 21 | headers: |
| 22 | headache -c install.d/platal-dev/templates/header.conf -h install.d/platal-dev/templates/header \ |
| 23 | `find templates -name '*.tpl' ! -path 'templates/xnet/skin.tpl' ! -path 'templates/skin/*.tpl' ! -name 'vcard.tpl' ` |
| 24 | |
| 25 | build: spool/templates_c wiki |
| 26 | |
| 27 | clean: |
| 28 | rm -rf include/platal/globals.inc.php |
| 29 | |
| 30 | %: %.in Makefile |
| 31 | sed -e 's,@VERSION@,$(VERSION),g' $< > $@ |
| 32 | |
| 33 | ################################################################################ |
| 34 | # targets |
| 35 | spool/templates_c spool/uploads spool/wiki.d:: |
| 36 | mkdir -p $@ |
| 37 | chmod o+w $@ |
| 38 | |
| 39 | htdocs/valid.html: |
| 40 | touch templates_c/valid.html |
| 41 | cd htdocs && ln -sf ../templates_c/valid.html |
| 42 | |
| 43 | htdocs/uploads: |
| 44 | cd htdocs && ln -sf ../spool/uploads |
| 45 | |
| 46 | htdocs/wikipub: |
| 47 | cd htdocs && ln -sf ../wiki/pub wikipub |
| 48 | |
| 49 | wiki/local/pmwiki.config.php: |
| 50 | cd wiki/local/ && ln -sf ../../plugins/pmwiki.config.php |
| 51 | |
| 52 | wiki/pub/skins/empty: |
| 53 | cd wiki/pub/skins/ && ln -sf ../../../install.d/wiki/empty |
| 54 | |
| 55 | wiki: build-wiki spool/uploads htdocs/uploads htdocs/wikipub |
| 56 | @test -d wiki || wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz |
| 57 | |
| 58 | spool/wiki.d:: |
| 59 | cd $@ && ln -s ../../install.d/wiki/wiki.d/* . |
| 60 | |
| 61 | build-wiki: wiki/local/pmwiki.config.php wiki/pub/skins/empty spool/wiki.d |
| 62 | |
| 63 | ################################################################################ |
| 64 | |
| 65 | .PHONY: build dist clean wiki build-wiki |
| 66 | |