Release diogenes-0.9.22
[diogenes.git] / Makefile
CommitLineData
6855525e
JL
1# definitions
2
2c3f8ce2 3VERSION = 0.9.22
6855525e
JL
4PKG_DIST = diogenes-$(VERSION)
5LIB_DIST = libdiogenes-$(VERSION)
6
7PKG_FILES = AUTHORS ChangeLog COPYING README Makefile \
341d323e 8 cvs.pl Doxyfile.in
6855525e 9
7d7400ea 10PKG_DIRS = config htdocs include locale po plugins scripts styles templates
6855525e
JL
11
12LIB_FILES = COPYING
13LIB_BASE = include/diogenes
14
7533d675 15VCS_FILTER = \( -name .arch-ids -o -name CVS -o -name .svn \) -prune
6855525e
JL
16
17# global targets
18
19build: pkg-build lib-build
20
21dist: clean pkg-dist lib-dist
22
23clean:
24 rm -rf locale include/diogenes.globals.inc.php
25 for ext in php tpl css po; \
26 do \
27 find -type f -name *.$$ext~ -exec rm -f {} \; ; \
28 done
29
30%: %.in Makefile
31 sed -e 's,@VERSION@,$(VERSION),g' $< > $@
32
33
34# diogenes package targets
35
341d323e 36pkg-build: include/diogenes.globals.inc.php Doxyfile
6855525e
JL
37 make -C po
38
39pkg-dist: pkg-build
40 rm -rf $(PKG_DIST) $(PKG_DIST).tar.gz
41 mkdir $(PKG_DIST)
42 cp -a $(PKG_FILES) $(PKG_DIST)
7533d675 43 for dir in `find $(PKG_DIRS) $(VCS_FILTER) -o -type d -print`; \
6855525e 44 do \
3b34a345 45 mkdir -p $(PKG_DIST)/$$dir; \
6855525e
JL
46 find $$dir -maxdepth 1 -type f -exec cp {} $(PKG_DIST)/$$dir \; ; \
47 done
48 tar czf $(PKG_DIST).tar.gz $(PKG_DIST)
49 rm -rf $(PKG_DIST)
50
51
52# diogenes library targets
53
54lib-build:
55
56lib-dist: lib-build
57 rm -rf $(LIB_DIST)
58 mkdir $(LIB_DIST)
59 cp -a $(LIB_FILES) $(LIB_DIST)
7533d675 60 for dir in `cd $(LIB_BASE) && find . $(VCS_FILTER) -o -type d -print`; \
6855525e
JL
61 do \
62 mkdir -p $(LIB_DIST)/$$dir; \
63 find $(LIB_BASE)/$$dir -maxdepth 1 -type f -exec cp {} $(LIB_DIST)/$$dir \; ; \
64 done
65 tar czf $(LIB_DIST).tar.gz $(LIB_DIST)
66 rm -rf $(LIB_DIST)
67
68
69.PHONY: build dist clean pkg-build pkg-dist lib-build lib-dist
70