4cc7f778 |
1 | # definitions |
2 | |
3 | VERSION=$(shell grep VERSION Changelog | head -1 | sed -e "s/VERSION //;s/\t.*//") |
4 | PKG_DIST = banana-$(VERSION) |
5 | |
6 | PKG_FILES = AUTHORS Changelog COPYING README Makefile TODO |
7 | |
2a09fb07 |
8 | PKG_DIRS = banana po css examples img |
4cc7f778 |
9 | |
ded41180 |
10 | VCS_FILTER = ! -name .svn |
4cc7f778 |
11 | |
12 | # global targets |
13 | |
14 | build: pkg-build |
15 | |
16 | dist: clean pkg-dist |
17 | |
18 | clean: |
ded41180 |
19 | rm -rf locale banana/banana.inc.php |
40114245 |
20 | make -C po clean |
4cc7f778 |
21 | |
22 | %: %.in Makefile |
664e4b2b |
23 | sed -e 's,@VERSION@,$(VERSION) The Bearded Release,g' $< > $@ |
4cc7f778 |
24 | |
25 | |
26 | # banana package targets |
27 | |
605f785e |
28 | pkg-build: banana/banana.inc.php |
4cc7f778 |
29 | make -C po |
2a09fb07 |
30 | make -C po clean |
4cc7f778 |
31 | |
32 | pkg-dist: pkg-build |
33 | rm -rf $(PKG_DIST) $(PKG_DIST).tar.gz |
34 | mkdir $(PKG_DIST) |
35 | cp -a $(PKG_FILES) $(PKG_DIST) |
36 | for dir in `find $(PKG_DIRS) -type d $(VCS_FILTER)`; \ |
37 | do \ |
38 | mkdir -p $(PKG_DIST)/$$dir; \ |
2a09fb07 |
39 | find $$dir -type f $(VCS_FILTER) -maxdepth 1 -exec cp {} $(PKG_DIST)/$$dir \; ; \ |
4cc7f778 |
40 | done |
41 | tar czf $(PKG_DIST).tar.gz $(PKG_DIST) |
42 | rm -rf $(PKG_DIST) |
43 | |
44 | |
45 | |
46 | .PHONY: build dist clean pkg-build pkg-dist lib-build lib-dist |
47 | |