summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po/Makefile
blob: 8c7948b42ba7b975f3b7a1aa608660f2cbc0ba87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
PMSFILES = $(shell find .. -name "*.pm" | grep -v "^../po")
POFILES = $(wildcard *.po)
FROMPOFILES = $(POFILES:%.po=%.pm)

all: $(FROMPOFILES)

clean:
	rm -f $(FROMPOFILES)

$(FROMPOFILES): %.pm: %.po
	./po2perl < $< > $@

%.po: $(PMSFILES)
	touch $@
	for i in $(PMSFILES); do \
		sed -e 's/#\(.*\)/\/*\1*\//' -e 's/$$/\\n\\/' < $$i > $${i}c; \
		xgettext -j -F -Lc -n --omit-header --keyword=_ --keyword=__ -o $@ $${i}c; \
		rm $${i}c; \
	done

FORCE: