3 VERSION
=$(shell grep VERSION Changelog | head
-1 | sed
-e
"s/VERSION //;s/\t.*//")
4 PKG_DIST
= banana-
$(VERSION
)
6 PKG_FILES
= AUTHORS Changelog COPYING README Makefile TODO
8 PKG_DIRS
= banana po css examples img javascript
10 VCS_FILTER
= ! -name .svn
16 # build for development (prepare spool
17 devel
: spool spool
/templates_c
24 rm -rf locale banana
/banana.inc.php
25 rm javascript
/jquery.js
27 make
-C mbox-helper
clean
31 sed
-e
's,@VERSION@,$(VERSION) The Bearded Release,g' $< > $@
34 wget
"http://jquery.com/src/jquery-latest.pack.js" -O
$@
36 spool spool
/templates_c
:
40 # banana package targets
42 pkg-build
: banana
/banana.inc.php javascript
/jquery.js
48 rm -rf
$(PKG_DIST
) $(PKG_DIST
).
tar.gz
50 cp
-a
$(PKG_FILES
) $(PKG_DIST
)
51 for
dir in
`find $(PKG_DIRS) -type d $(VCS_FILTER)`; \
53 mkdir
-p
$(PKG_DIST
)/$$dir; \
54 find
$$dir -type f
$(VCS_FILTER
) -maxdepth
1 -exec cp
{} $(PKG_DIST
)/$$dir \
; ; \
56 tar czf
$(PKG_DIST
).
tar.gz
$(PKG_DIST
)
61 .PHONY
: build
dist clean pkg-build pkg-dist lib-build lib-dist