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 | |
19 | headers: |
20 | headache -c install.d/platal-dev/templates/header.conf -h install.d/platal-dev/templates/header \ |
21 | `find templates -name '*.tpl' ! -path 'templates/xnet/skin.tpl' ! -path 'templates/skin/*.tpl' ! -name 'vcard.tpl' ` |
22 | |
23 | build: pkg-build |
24 | |
25 | dist: clean pkg-dist |
26 | |
27 | bzdist: clean pkg-bzdist |
28 | |
29 | clean: |
30 | rm -rf include/platal/globals.inc.php |
fee731e3 |
31 | rm -f htdocs/banana/banana.css htdocs/valid.html include/banana htdocs/banana/img |
0337d704 |
32 | |
33 | %: %.in Makefile |
34 | sed -e 's,@VERSION@,$(VERSION),g' $< > $@ |
35 | |
36 | ################################################################################ |
37 | # devel targets |
38 | templates_c: |
39 | mkdir templates_c |
40 | chmod o+w templates_c |
41 | |
42 | htdocs/valid.html: |
43 | touch templates_c/valid.html |
44 | ln -sf ../templates_c/valid.html htdocs/valid.html |
45 | |
46 | devel: build templates_c htdocs/valid.html |
47 | |
48 | |
49 | ################################################################################ |
50 | # diogenes package targets |
51 | |
52 | pkg-build: include/platal/globals.inc.php |
53 | |
54 | $(PKG_DIST): pkg-build |
55 | mkdir $(PKG_DIST) |
56 | cp -a $(PKG_FILES) $(PKG_DIST) |
57 | for dir in `find $(PKG_DIRS) -type d $(VCS_FILTER)`; \ |
58 | do \ |
59 | mkdir -p $(PKG_DIST)/$$dir; \ |
60 | find $$dir -type f -maxdepth 1 -exec cp {} $(PKG_DIST)/$$dir \; ; \ |
61 | done |
62 | |
63 | pkg-dist: $(PKG_DIST) |
64 | rm -f $(PKG_DIST).tar.gz |
65 | tar czf $(PKG_DIST).tar.gz $(PKG_DIST) |
66 | rm -rf $(PKG_DIST) |
67 | |
68 | pkg-bzdist: $(PKG_DIST) |
69 | rm -f $(PKG_DIST).tar.bz2 |
70 | tar cjf $(PKG_DIST).tar.bz2 $(PKG_DIST) |
71 | rm -rf $(PKG_DIST) |
72 | |
73 | .PHONY: build dist clean pkg-build pkg-dist |
74 | |