4 PKG_DIST
= diogenes-
$(VERSION
)
5 LIB_DIST
= libdiogenes-
$(VERSION
)
7 PKG_FILES
= AUTHORS ChangeLog COPYING README Makefile \
10 PKG_DIRS
= config htdocs
include locale po plugins styles templates
13 LIB_BASE
= include/diogenes
15 VCS_FILTER
= \
( -name .arch-ids
-o
-name CVS
-o
-name .svn \
) -prune
19 build
: pkg-build lib-build
21 dist: clean pkg-dist lib-dist
24 rm -rf locale
include/diogenes.globals.inc.php
25 for ext in php tpl css po
; \
27 find
-type f
-name
*.
$$ext~
-exec
rm -f
{} \
; ; \
31 sed
-e
's,@VERSION@,$(VERSION),g' $< > $@
34 # diogenes package targets
36 pkg-build
: include/diogenes.globals.inc.php
40 rm -rf
$(PKG_DIST
) $(PKG_DIST
).
tar.gz
42 cp
-a
$(PKG_FILES
) $(PKG_DIST
)
43 for
dir in
`find $(PKG_DIRS) $(VCS_FILTER) -o -type d -print`; \
45 mkdir
-p
$(PKG_DIST
)/$$dir; \
46 find
$$dir -maxdepth
1 -type f
-exec cp
{} $(PKG_DIST
)/$$dir \
; ; \
48 tar czf
$(PKG_DIST
).
tar.gz
$(PKG_DIST
)
52 # diogenes library targets
59 cp
-a
$(LIB_FILES
) $(LIB_DIST
)
60 for
dir in
`cd $(LIB_BASE) && find . $(VCS_FILTER) -o -type d -print`; \
62 mkdir
-p
$(LIB_DIST
)/$$dir; \
63 find
$(LIB_BASE
)/$$dir -maxdepth
1 -type f
-exec cp
{} $(LIB_DIST
)/$$dir \
; ; \
65 tar czf
$(LIB_DIST
).
tar.gz
$(LIB_DIST
)
69 .PHONY
: build
dist clean pkg-build pkg-dist lib-build lib-dist