summaryrefslogtreecommitdiffstats
path: root/po/Makefile
blob: 8e25445b888049769b76923ee9d19c28f464d226 (plain)
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
POFILES	= $(wildcard *.po)
TEXTS	= $(addsuffix .tr,$(basename $(wildcard *.po)))
PGOAL: bootloader

PRODUCT ?= "SUSE Linux 10.1"

all: text.inc $(TEXTS)

# the po2txt script requires that the po file has no fuzzy entries
# and the same comments as the pot file; so we do a msgfmt/msgunfmt/msgmerge
# to ensure that
%.tr: %.po text.inc
	msgfmt $< -o - | msgunfmt | \
	msgmerge --no-fuzzy-matching - $(PGOAL).pot > tmpfile.po && \
	bin/po2txt --product=$(PRODUCT) tmpfile.po >$@
	echo rm -f tmpfile.po

# en.tr uses msgids from $(PGOAL).pot
en.tr text.inc: $(PGOAL).pot
	bin/po2txt --product=$(PRODUCT) $< >en.tr

clean:
	rm -f text.inc *.tr *~


merge: $(PGOAL).pot
	for n in *.po; do \
	  echo "Merging $$n"; \
	  msgmerge -C $$n $$n $(PGOAL).pot > "$$n"t ; \
	  mv -f "$$n"t $$n ; \
	done