Add a 'next unread message' button
[banana.git] / Makefile
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
8 PKG_DIRS = banana po css examples img
9
10 VCS_FILTER = ! -name .arch-ids ! -name .arch-inventory
11
12 # global targets
13
14 build: pkg-build
15
16 dist: clean pkg-dist
17
18 clean:
19 rm -rf locale banana/include/banana.inc.php
20 make -C po clean
21
22 %: %.in Makefile
23 sed -e 's,@VERSION@,$(VERSION) The Bearded Release,g' $< > $@
24
25
26 # banana package targets
27
28 pkg-build: banana/banana.inc.php
29 make -C po
30 make -C po clean
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; \
39 find $$dir -type f $(VCS_FILTER) -maxdepth 1 -exec cp {} $(PKG_DIST)/$$dir \; ; \
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