-
Notifications
You must be signed in to change notification settings - Fork 156
/
Makefile
57 lines (39 loc) · 1.17 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
46
47
48
49
50
51
52
53
54
55
56
57
# Makefile for PalMA
# Compile all available translations for the PalMA web interface.
.PHONY: all install phpcs phpcbf deb changelog
DISTDIR=docs/dist
LANGUAGES=$(shell cd locale && ls -d *.UTF-8 | sed s/.UTF-8//)
SRC=index.php
SRC+=i12n.php
SRC+=login.php
SRC+=upload.php
SRC+=$(wildcard examples/screensaver/*.php)
SRC+=$(wildcard theme/*/*/*.php)
PO=$(wildcard locale/*.UTF-8/LC_MESSAGES/palma.po)
all: $(patsubst %.po, %.mo, $(PO)) locale/README.md
%.mo: %.po
msgfmt --output-file=$@ $?
palma.po: $(SRC)
xgettext --default-domain=palma --keyword=__ --package-name=palma \
--output-dir=. --from-code=UTF-8 $(SRC)
perl -pi -e s/charset=CHARSET/charset=UTF-8/ $@
$(PO): palma.po
msgmerge --update $@ palma.po
touch $@
locale/README.md: $(PO)
LANG=C.UTF-8 perl $(DISTDIR)/find-untranslated.pl --markdown $(LANGUAGES) >$@
.git/hooks: .git/hooks/pre-push .git/hooks/pre-commit
.git/hooks/%: $(DISTDIR)/%.sh
ln -sf ../../$< $@
clean:
install: all
./install -v deb
changelog:
gbp dch -Dunstable
deb:
debian/rules clean
fakeroot debian/rules binary
phpcs:
-phpcs -n --standard=PSR2 --file-list=.phpcs.list
phpcbf:
-phpcbf -n --standard=PSR2 --file-list=.phpcs.list