missing target
[platal.git] / Makefile
CommitLineData
0337d704 1# $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $
2################################################################################
3# definitions
4
a197be60 5VERSION := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/\t.*//;s/ .*//")
0337d704 6
7PKG_NAME = platal
8PKG_DIST = $(PKG_NAME)-$(VERSION)
9PKG_FILES = AUTHORS ChangeLog COPYING README Makefile
10PKG_DIRS = configs htdocs include install.d plugins po scripts templates upgrade
11
12VCS_FILTER = ! -name .arch-ids ! -name CVS
13
14################################################################################
15# global targets
16
17all: build
18
b66268df 19devel: build htdocs/valid.html
20
0337d704 21headers:
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
08e5da80 25build: spool/templates_c wiki include/platal/globals.inc.php htdocs/img
0337d704 26
27clean:
28 rm -rf include/platal/globals.inc.php
0337d704 29
30%: %.in Makefile
31 sed -e 's,@VERSION@,$(VERSION),g' $< > $@
32
33################################################################################
b66268df 34# targets
91f37c81 35
36spool/templates_c spool/uploads:
37 mkdir -p $@
38 chmod o+w $@
39
40spool/wiki.d:
b66268df 41 mkdir -p $@
42 chmod o+w $@
91f37c81 43 cd $@ && ln -sf ../../install.d/wiki/wiki.d/* .
44
4887dc90 45wiki/cookbook/e-protect.php:
46 cd wiki/cookbook && ln -sf ../../install.d/wiki/e-protect.php
0337d704 47
48htdocs/valid.html:
796aea34 49 touch spool/templates_c/valid.html
52165f0e 50 chmod o+w spool/templates_c/valid.html
796aea34 51 cd htdocs && ln -sf ../spool/templates_c/valid.html
b66268df 52
53htdocs/uploads:
7faf6e6a 54 cd htdocs && ln -sf ../spool/uploads
0337d704 55
ce6db91e 56htdocs/img:
57 cd htdocs && ln -sf /usr/share/banana/img
58
9d67a080 59htdocs/wiki:
60 cd htdocs && ln -sf ../wiki/pub wiki
0337d704 61
796aea34 62wiki/local/farmconfig.php:
63 cd wiki/local/ && ln -sf ../../plugins/pmwiki.config.php farmconfig.php
b66268df 64
65wiki/pub/skins/empty:
66 cd wiki/pub/skins/ && ln -sf ../../../install.d/wiki/empty
67
d207e9f5 68get-wiki:
69 @if ! test -d wiki; then \
70 wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz; \
2907d401 71 tar -xzvf pmwiki-latest.tgz; \
72 rm pmwiki-latest.tgz; \
73 mv pmwiki-* wiki; \
d207e9f5 74 fi
75
43f637a6 76build-wiki: wiki/local/farmconfig.php wiki/pub/skins/empty spool/wiki.d
71ea2622 77
4887dc90 78wiki: get-wiki build-wiki spool/uploads htdocs/uploads htdocs/wiki wiki/cookbook/e-protect.php
91f37c81 79
0337d704 80################################################################################
b66268df 81
71ea2622 82.PHONY: build dist clean wiki build-wiki
0337d704 83