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
14 nodocs
: htdocs
/always.php built-po
17 all: htdocs
/always.php built-docs built-po
19 built-docs
: docs
/api
/phpdoc.ini htdocs
/*.php inc
/*.php docs
/translation.rst
20 phpdoc
-c docs
/api
/phpdoc.ini || echo
"NOTICE: Failed to build optional API docs"
21 rst2pdf docs
/translation.rst || echo
"NOTICE: Failed to build ReST docs"
24 built-po
: htdocs
/always.php scripts
/po
/rebuild-translations.sh po
/*.po
25 scripts
/po
/rebuild-translations.sh
29 # Insert the current version number into always.php
31 htdocs
/always.php
: inc
/always.php.in scripts
/build-always.sh VERSION dba
/davical.sql
32 scripts
/build-always.sh
<$< >$@
35 # Build a release .tar.gz file in the directory above us
38 release
: built-docs VERSION
39 -ln
-s .
$(package
)-$(version
)
40 sed
's:@@VERSION@@:$(majorversion):' davical.spec.in | \
41 sed
's:@@ISSNAPSHOT@@:$(issnapshot):' | \
42 sed
's:@@GITREV@@:$(gitrev):' > davical.spec
43 echo
"git ls-files |grep -v '.git'|sed -e s:^:$(package)-$(version)/:"
44 tar czf ..
/$(package
)-$(version
).
tar.gz \
45 --no-recursion
--dereference
$(package
)-$(version
) \
46 $(shell git ls-files |grep
-v
'.git'|sed
-e s
:^
:$(package
)-$(version
)/:) \
47 $(shell find
$(package
)-$(version
)/docs
/api
/ ! -name
"phpdoc.ini" ) \
49 rm $(package
)-$(version
)
56 rm -f built-docs built-po
57 -find .
-name
"*~" -delete
58 -rm docs
/translation.pdf
63 -find docs
/api
/* ! -name
"phpdoc.ini" ! -name
".gitignore" -delete