1SRC=$(wildcard *.po)
2OBJ= $(SRC:.po=.mo)
3INST= $(SRC:.po=.inst)
4
5translations: $(OBJ)
6
7%.mo: %.po
8	msgfmt -o $@  $<
9
10clean:
11	rm -f *.mo *~
12
13# hack to automate installation dynamicaly, without previous knowledge of
14# the po/mo file list (we fool make by pretending the need for .inst files).
15install: $(OBJ) $(INST)
16
17%.inst: %.mo
18	mkdir -p $(DESTDIR)$(LOCALESDIR)/$*/LC_MESSAGES/
19	-cp -f $< $(DESTDIR)$(LOCALESDIR)/$*/LC_MESSAGES/powertop.mo
20
21uptrans: $(LG).po
22
23$(LG).po: powertop.pot
24ifdef LG
25	msgmerge -U $@ $<
26else
27	@echo "Usage : make uptrans LG=xx # with xx = de, es, fi ..."
28	@exit 1
29endif
30
31