-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (40 loc) · 2.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
VERSION = CAT-2.0.0-alpha2
VV = $(VERSION)/
.PHONY: translation
all: translation
documentation:
rm -R phpdoc
php /home/swinter/packages/linux/phpDocumentor.phar run -d . -i core/phpqrcode.php -i core/PHPMailer/ -i tests/ -t phpdoc/
translation:
echo "****************************************"
echo "*** Generating templates from source ***"
echo "****************************************"
xgettext --from-code=UTF-8 --add-comments=/ -L php core/RADIUSTests.php -o translation/diagnostics.pot
xgettext --from-code=UTF-8 --add-comments=/ -L php $$(ls -1 core/*.php |grep -v RADIUSTests |xargs) -o translation/core.pot
xgettext --from-code=UTF-8 --add-comments=/ -L php devices/*.php devices/apple_mobileconfig/*.php devices/ms/*.php devices/ms/Files/*.inc devices/linux/Linux.php devices/test_module/*.php devices/redirect_dev/*.php devices/xml/*.php -o translation/devices.pot
xgettext --from-code=UTF-8 --add-comments=/ -L php web/admin/*.php web/admin/inc/*.php -o translation/web_admin.pot
xgettext --from-code=UTF-8 --add-comments=/ -L php web/user/*.php web/user/inc/*.php web/user/js/*.php web/*.php -o translation/web_user.pot
for lang in `find translation/ -maxdepth 1 -mindepth 1 -type d | grep -v .svn`; do \
echo "********************************************"; \
echo "*** Now translating in $$lang ***"; \
echo "********************************************"; \
for area in web_admin web_user devices core diagnostics ; do \
mkdir -p $$lang/LC_MESSAGES; \
msgmerge -q -v -U $$lang/$$area.po translation/$$area.pot; \
msgfmt $$lang/$$area.po -o $$lang/LC_MESSAGES/$$area.mo; \
done; \
done; \
echo "********************"; \
echo "*** Syntax check ***"; \
echo "********************"; \
for lang in `find translation/ -maxdepth 1 -mindepth 1 -type d | grep -v .svn`; do \
for area in web_admin web_user devices core diagnostics ; do \
msgfmt --check-header --check-domain $$lang/$$area.po; \
done; \
done; \
rm messages.mo
distribution: all
find . -name \*.po~ -exec rm {} \;
find . -name svn-commit.tmp -exec rm {} \;
rm -R -f NewFolder nbproject config/config.php devices/devices.php generic-data*
tar -cvjf ../$(VERSION).tar.bz2 --show-transformed-names --exclude-vcs --xform 's/^\.\(\/\)/$(VERSION)\1/' .