5 majorversion
= $(shell sed
-n
's:\([0-9\.]*\)[-a-f0-9-]*:\1:p' VERSION
)
7 version
= $(majorversion
)
9 snapshot
: gitrev
= $(shell git rev-parse
--short HEAD
)
10 snapshot
: version
= $(majorversion
)-git
$(gitrev
)
11 snapshot
: issnapshot
= 1
15 built-docs
: docs
/api
/phpdoc.ini inc
/*.php
16 phpdoc
-c docs
/api
/phpdoc.ini || echo
"WARNING: the docs could not be built"
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
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
)
44 -find .
-name
"*~" -delete
48 -find docs
/api
/* ! -name
"phpdoc.ini" ! -name
".gitignore" -delete
50 .PHONY
: all clean release