srcdir = @srcdir@ VPATH = $(srcdir) include ../Makefile.inc INSTALL= @INSTALL@ INSTALL_PROGRAM= @INSTALL_PROGRAM@ INSTALL_DATA= @INSTALL_DATA@ CC = @CC@ installprefix = $(DESTDIR) MSGMERGE = msgmerge NLSPACKAGE = rpm CATALOGS = cz.mo de.mo fi.mo fr.mo pt_BR.mo ru.mo sr.mo sv.mo tr.mo POTFILES = \ ../build.c ../checksig.c ../ftp.c \ ../install.c ../query.c ../rpm.c \ ../url.c ../verify.c \ ../rpm2cpio.c ../convertdb.c ../oldrpmdb.c \ ../build/build.c ../build/expression.c ../build/files.c \ ../build/misc.c ../build/myftw.c ../build/names.c ../build/pack.c \ ../build/parseBuildInstallClean.c ../build/parseChangelog.c \ ../build/parseDescription.c ../build/parseFiles.c \ ../build/parsePreamble.c ../build/parsePrep.c \ ../build/parseReqs.c ../build/parseScript.c ../build/parseSpec.c \ ../build/reqprov.c ../build/spec.c \ ../lib/cpio.c ../lib/dbindex.c ../lib/depends.c ../lib/falloc.c \ ../lib/formats.c ../lib/fs.c ../lib/header.c ../lib/install.c \ ../lib/lookup.c ../lib/macro.c ../lib/md5.c ../lib/md5sum.c \ ../lib/messages.c ../lib/misc.c ../lib/oldheader.c ../lib/package.c \ ../lib/rebuilddb.c ../lib/rpmdb.c ../lib/rpmerr.c ../lib/rpmlead.c \ ../lib/rpmrc.c ../lib/signature.c ../lib/stringbuf.c ../lib/tagtable.c \ ../lib/tread.c ../lib/uninstall.c ../lib/verify.c all: $(NLSPACKAGE).pot $(CATALOGS) $(NLSPACKAGE).pot: $(POTFILES) xgettext --default-domain=$(NLSPACKAGE) \ --add-comments --keyword=_ --keyword=N_ $(POTFILES) if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \ rm -f $(NLSPACKAGE).po; \ else \ mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \ fi update-po: Makefile @$(MAKE) $(NLSPACKAGE).pot @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ lang=`echo $$cat | sed 's/.mo//'`; \ if $(MSGMERGE) $$lang.po $(NLSPACKAGE).pot > $$lang.pox ; then \ echo "$(MSGMERGE) of $$lang succeeded" ; \ mv $$lang.pox $$lang.po ; \ else \ echo "$(MSGMERGE) of $$lang failed" ; \ rm -f $$lang.pox ; \ fi \ done clean: rm -f *mo $(NLSPACKAGE).pot distclean: clean rm -f .depend Makefile depend: install: for n in $(CATALOGS); do \ l=`basename $$n .mo`; \ $(INSTALL) -m 755 -d $(installprefix)/$(RPMNLSDIR)/$$l; \ $(INSTALL) -m 755 -d $(installprefix)/$(RPMNLSDIR)/$$l/LC_MESSAGES; \ $(INSTALL) -m 644 $$n $(installprefix)/$(RPMNLSDIR)/$$l/LC_MESSAGES/rpm.mo; \ done %.mo: %.po msgfmt -o $@ $<