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