davical/Makefile
Andrew McMillan 5debe92237 Move from extract.pl to standard xgettext
So far we have used extract.pl which originated in Horde to generate the
PO files. This process took a long time to run.

But xgettext is able to handle PHP by itself.

In the source translate() and i18n() are used instead of _() therefore
we have to pass a keyword parameter.

From now on Translators: is the keyword to provide content to the
translators on Transifex.

Conflicts:

	scripts/po/extract.pl
2011-02-21 22:39:40 +13:00

45 lines
1.3 KiB
Makefile
Executable File

#!/usr/bin/make -f
#
package=davical
version=$(shell cat VERSION)
snapshot : version = $(shell sed -n 's:\([0-9\.]*\)[-a-f0-9-]*:\1:p' VERSION)-git$(shell git rev-parse --short HEAD)
all: htdocs/always.php built-docs built-po
built-docs: docs/api/phpdoc.ini htdocs/*.php inc/*.php
phpdoc -c docs/api/phpdoc.ini || echo "NOTICE: Failed to build optional API docs"
touch built-docs
built-po: htdocs/always.php scripts/po/rebuild-translations.sh po/*.po
scripts/po/rebuild-translations.sh
touch built-po
#
# Insert the current version number into always.php
#
htdocs/always.php: scripts/build-always.sh VERSION dba/davical.sql inc/always.php.in
scripts/build-always.sh <inc/always.php.in >htdocs/always.php
#
# Build a release .tar.gz file in the directory above us
#
release: built-docs VERSION
-ln -s . $(package)-$(version)
tar czf ../$(package)-$(version).tar.gz \
--no-recursion --dereference $(package)-$(version) \
$(shell git ls-files |grep -v '.git'|sed -e s:^:$(package)-$(version)/:) \
$(shell find $(package)-$(version)/docs/api/ ! -name "phpdoc.ini" )
rm $(package)-$(version)
snapshot: release
clean:
rm -f built-docs built-po
-find . -name "*~" -delete
clean-all: clean
-find docs/api/* ! -name "phpdoc.ini" ! -name ".gitignore" -delete
.PHONY: all clean release