fixed issues with using command line options added by plugins Ex. --skip-broken ...
[yumex.git] / po / Makefile
blobac650b7701fee77b9413059fac5cbcf47af29e2b
1 INSTALL= /usr/bin/install -c
2 INSTALL_PROGRAM= ${INSTALL}
3 INSTALL_DATA= ${INSTALL} -m 644
4 INSTALLNLSDIR=$(DESTDIR)/usr/share/locale
5 top_srcdir = "."
8 MSGMERGE = intltool-update -x --gettext-package=$(NLSPACKAGE) --dist
10 NLSPACKAGE = yumex
12 CATALOGS = $(shell ls *.po)
13 FMTCATALOGS = $(patsubst %.po,%.mo,$(CATALOGS))
15 PYFILES = $(wildcard ../src/*.py) $(wildcard ../src/yumex/*.py) $(wildcard ../src/yumgui/*.py)
16 GLADEFILES = $(wildcard ../src/*.glade)
17 POTFILES = $(PYFILES) $(GLADEFILES)
19 all: $(NLSPACKAGE).pot $(FMTCATALOGS)
21 POTFILES.in:
22 for file in $(POTFILES); do \
23 echo "$${file#../}" ; \
24 done > $@
26 $(NLSPACKAGE).pot: $(POTFILES) POTFILES.in
27 intltool-update --gettext-package=$(NLSPACKAGE) --pot
29 update-po: Makefile $(NLSPACKAGE).pot refresh-po
31 refresh-po: Makefile POTFILES.in
32 catalogs='$(CATALOGS)'; \
33 for cat in $$catalogs; do \
34 lang=`basename $$cat .po`; \
35 cp $$lang.po $$lang.old.po; \
36 if $(MSGMERGE) $$lang ; then \
37 rm -f $$lang.old.po ; \
38 echo "$(MSGMERGE) of $$lang succeeded" ; \
39 else \
40 echo "$(MSGMERGE) of $$lang failed" ; \
41 mv $$lang.old.po $$lang.po ; \
42 fi \
43 done
45 report:
46 @for cat in *.po ; do \
47 echo -n "$$cat: "; \
48 msgfmt --statistics -o /dev/null $$cat; \
49 done
51 clean:
52 @rm -fv *mo *~ .depend *.autosave
54 distclean: clean
55 rm -f *mo .depend Makefile $(NLSPACKAGE).pot POTFILES.in
57 depend:
59 install: all
60 mkdir -p $(PREFIX)/$(INSTALLNLSDIR)
61 for n in $(CATALOGS); do \
62 l=`basename $$n .po`; \
63 mo=$$l.mo; \
64 if [ ! -f $$mo ]; then continue; fi; \
65 $(INSTALL) -m 755 -d $(PREFIX)/$(INSTALLNLSDIR)/$$l; \
66 $(INSTALL) -m 755 -d $(PREFIX)/$(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
67 $(INSTALL) -m 644 $$mo \
68 $(PREFIX)/$(INSTALLNLSDIR)/$$l/LC_MESSAGES/$(NLSPACKAGE).mo; \
69 done
71 %.mo: %.po
72 msgfmt -o $@ $<