Current code.
[capital-apms.git] / Makefile
blob1380b8a80c2f4f7bd4641c4eea92f31502e8ca25
1 #!/usr/bin/make -f
4 package=apms
5 version=$(shell cat VERSION)
7 default: inc/always.php
9 all: inc/always.php built-docs
11 built-docs: phpdoc.ini html/*.php inc/*.php inc/action/process/*.php inc/action/screen/*.php inc/browse/*.php inc/edit/*.php inc/view/*.php
12 phpdoc -c phpdoc.ini
13 touch built-docs
16 # Insert the current version number into always.php
18 inc/always.php: VERSION inc/in.always.php
19 sed -e "/^ *.c->version_string *= *'[^']*' *;/ s/^ *.c->version_string *= *'[^']*' *;/\$$c->version_string = '`head -n1 VERSION`';/" <inc/in.always.php >inc/always.php
22 # Build a release .tar.gz file in the directory above us
24 release: built-docs inc/always.php
25 -ln -s . $(package)-$(version)
26 tar czf ../$(package)-$(version).tar.gz \
27 --no-recursion --dereference $(package)-$(version) \
28 $(shell git ls-files |grep -v '.git'|sed -e s:^:$(package)-$(version)/:) \
29 $(shell find $(package)-$(version)/docs/api/ ! -name "phpdoc.ini" )
30 rm $(package)-$(version)
32 clean:
33 rm -f built-docs
34 -find docs/api/* ! -name "phpdoc.ini" ! -name ".gitignore" -delete
35 -find . -name "*~" -delete
38 .PHONY: all clean release