0337d704 |
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 | |
b66268df |
19 | devel: build htdocs/valid.html |
20 | |
0337d704 |
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 | |
7faf6e6a |
25 | build: spool/templates_c wiki |
0337d704 |
26 | |
27 | clean: |
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 | |
36 | spool/templates_c spool/uploads: |
37 | mkdir -p $@ |
38 | chmod o+w $@ |
39 | |
40 | spool/wiki.d: |
b66268df |
41 | mkdir -p $@ |
42 | chmod o+w $@ |
91f37c81 |
43 | cd $@ && ln -sf ../../install.d/wiki/wiki.d/* . |
44 | |
0337d704 |
45 | |
46 | htdocs/valid.html: |
796aea34 |
47 | touch spool/templates_c/valid.html |
48 | cd htdocs && ln -sf ../spool/templates_c/valid.html |
b66268df |
49 | |
50 | htdocs/uploads: |
7faf6e6a |
51 | cd htdocs && ln -sf ../spool/uploads |
0337d704 |
52 | |
b66268df |
53 | htdocs/wikipub: |
54 | cd htdocs && ln -sf ../wiki/pub wikipub |
0337d704 |
55 | |
796aea34 |
56 | wiki/local/farmconfig.php: |
57 | cd wiki/local/ && ln -sf ../../plugins/pmwiki.config.php farmconfig.php |
b66268df |
58 | |
59 | wiki/pub/skins/empty: |
60 | cd wiki/pub/skins/ && ln -sf ../../../install.d/wiki/empty |
61 | |
d207e9f5 |
62 | get-wiki: |
63 | @if ! test -d wiki; then \ |
64 | wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz; \ |
65 | echo "ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ"; \ |
66 | echo "now please untar pmwiki into wiki/ and run make again"; \ |
67 | echo "_____________________________________________________"; \ |
68 | exit 1; \ |
69 | fi |
70 | |
43f637a6 |
71 | build-wiki: wiki/local/farmconfig.php wiki/pub/skins/empty spool/wiki.d |
71ea2622 |
72 | |
91f37c81 |
73 | wiki: get-wiki build-wiki spool/uploads htdocs/uploads htdocs/wikipub |
74 | |
0337d704 |
75 | ################################################################################ |
b66268df |
76 | |
71ea2622 |
77 | .PHONY: build dist clean wiki build-wiki |
0337d704 |
78 | |