prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ top_srcdir = @top_srcdir@ srcdir = @top_srcdir@/po TOP = .. PACKAGE = @PACKAGE@ VERSION = @VERSION@ INSTALL = @INSTALL@ INSTALL = /usr/bin/install -c INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 INSTALL_SCRIPT = ${INSTALL_PROGRAM} # What is this package? NLSPACKAGE = $(PACKAGE) POTFILE = $(NLSPACKAGE).pot INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DIR = $(INSTALL) -d # destination directory INSTALL_NLS_DIR = @datadir@/locale # PO catalog handling MSGMERGE = msgmerge -v PYGETTEXT = python ./pygettext.py --default-domain=$(NLSPACKAGE) \ --verbose --output-file=$(NLSPACKAGE).po XGETTEXT = xgettext --default-domain=$(NLSPACKAGE) \ --add-comments MSGFMT = msgfmt --statistics --verbose # What do we need to do POFILES = $(wildcard *.po) MOFILES = $(patsubst %.po,%.mo,$(POFILES)) PYSRC = $(wildcard ../*.py) SRCFILES = $(PYSRC) ../bin/yum ../bin/yum-arch all:: update-po $(MOFILES) $(POTFILE): $(SRCFILES) $(PYGETTEXT) --keyword=_ --keyword=N_ $(SRCFILES) @if cmp -s $(NLSPACKAGE).po $(POTFILE); then \ rm -f $(NLSPACKAGE).po; \ else \ mv -f $(NLSPACKAGE).po $(POTFILE); \ fi; \ update-po: Makefile $(POTFILE) refresh-po refresh-po: Makefile for cat in $(POFILES); do \ lang=`basename $$cat .po`; \ if $(MSGMERGE) $$lang.po $(POTFILE) > $$lang.pot ; then \ mv -f $$lang.pot $$lang.po ; \ echo "$(MSGMERGE) of $$lang succeeded" ; \ else \ echo "$(MSGMERGE) of $$lang failed" ; \ rm -f $$lang.pot ; \ fi \ done clean: $(RM) -fv *mo *~ .depend distclean: $(RM) $(srcdir)/Makefile $(RM) -rf .libs $(RM) -f core $(RM) -fv *mo *~ .depend mostlyclean: $(MAKE) clean maintainer-clean: $(MAKE) distclean distfiles: distdir=$(PACKAGE)-$(VERSION); \ mkdir $(top_srcdir)/.disttmp/$$distdir/po;\ cp \ $(srcdir)/Makefile.in \ $(srcdir)/pygettext.py\ $(srcdir)/*.po \ $(srcdir)/yum.pot \ $(top_srcdir)/.disttmp/$$distdir/po dailyfiles: distdir=$(PACKAGE); \ mkdir $(top_srcdir)/.disttmp/$$distdir/po;\ cp \ $(srcdir)/Makefile.in \ $(srcdir)/pygettext.py\ $(srcdir)/*.po \ $(srcdir)/yum.pot \ $(top_srcdir)/.disttmp/$$distdir/po install: $(MOFILES) @for n in $(MOFILES); do \ l=`basename $$n .mo`; \ $(INSTALL_DIR) $(DESTDIR)$(INSTALL_NLS_DIR)/$$l/LC_MESSAGES; \ $(INSTALL_DATA) --verbose $$n $(DESTDIR)$(INSTALL_NLS_DIR)/$$l/LC_MESSAGES/$(NLSPACKAGE).mo; \ done %.mo: %.po $(MSGFMT) -o $@ $< # msgcat $< timeconfig/$< | msgfmt --check -o $@ - .PHONY: missing depend