Handle htmlspecialchars() differences between PHP < 5.4 vs >= 5.4
[awl.git] / Makefile
blob205fdb27a59b934772840c6bc60251296a86abe2
1 #!/usr/bin/make -f
2 #
4 package=awl
5 majorversion = $(shell sed -n 's:\([0-9\.]*\)[-a-f0-9-]*:\1:p' VERSION)
6 gitrev = 0
7 version = $(majorversion)
8 issnapshot = 0
9 snapshot : gitrev = $(shell git rev-parse --short HEAD)
10 snapshot : version = $(majorversion)-git$(gitrev)
11 snapshot : issnapshot = 1
13 all: built-docs
15 built-docs: docs/api/phpdoc.ini inc/*.php
16 phpdoc -c docs/api/phpdoc.ini || echo "WARNING: the docs could not be built"
17 touch built-docs
20 # Insert the current version number into AWLUtilities.php
22 inc/AWLUtilities.php: scripts/build-AWLUtilities.sh VERSION inc/AWLUtilities.php.in
23 scripts/build-AWLUtilities.sh <inc/AWLUtilities.php.in >inc/AWLUtilities.php
27 # Build a release .tar.gz file in the directory above us
29 release: built-docs
30 -ln -s . $(package)-$(version)
31 sed 's:@@VERSION@@:$(majorversion):' php-awl.spec.in | \
32 sed 's:@@ISSNAPSHOT@@:$(issnapshot):' | \
33 sed 's:@@GITREV@@:$(gitrev):' > php-awl.spec
34 tar czf ../$(package)-$(version).tar.gz \
35 --no-recursion --dereference $(package)-$(version) \
36 $(shell git ls-files |grep -v '.git'|sed -e s:^:$(package)-$(version)/:) \
37 $(shell find $(package)-$(version)/docs/api/ ! -name "phpdoc.ini" ) php-awl.spec
38 rm $(package)-$(version)
40 snapshot: release
42 clean:
43 rm -f built-docs
44 -find . -name "*~" -delete
45 rm -f php-awl.spec
47 clean-all: clean
48 -find docs/api/* ! -name "phpdoc.ini" ! -name ".gitignore" -delete
50 .PHONY: all clean release