aboutsummaryrefslogtreecommitdiffstats
path: root/po/Makefile
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-01-02 22:42:09 +0000
committerBill Nottingham <notting@redhat.com>2001-01-02 22:42:09 +0000
commit7ed6e7f4fbbde532e3cc0c9f5ccaa0a114dfbee8 (patch)
tree8fe8e14c01f63f321ab529edd56023ec15748633 /po/Makefile
parentcb5252165b2406727af56dc1710329eec744c65c (diff)
downloadinitscripts-7ed6e7f4fbbde532e3cc0c9f5ccaa0a114dfbee8.tar
initscripts-7ed6e7f4fbbde532e3cc0c9f5ccaa0a114dfbee8.tar.gz
initscripts-7ed6e7f4fbbde532e3cc0c9f5ccaa0a114dfbee8.tar.bz2
initscripts-7ed6e7f4fbbde532e3cc0c9f5ccaa0a114dfbee8.tar.xz
initscripts-7ed6e7f4fbbde532e3cc0c9f5ccaa0a114dfbee8.zip
Big i18n commit. From Conectiva, originally.
Diffstat (limited to 'po/Makefile')
-rw-r--r--po/Makefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/po/Makefile b/po/Makefile
new file mode 100644
index 00000000..a918c983
--- /dev/null
+++ b/po/Makefile
@@ -0,0 +1,60 @@
+INSTALL= /usr/bin/install -c
+INSTALL_PROGRAM= ${INSTALL}
+INSTALL_DATA= ${INSTALL} -m 644
+INSTALLNLSDIR=/usr/share/locale
+
+MSGMERGE = msgmerge
+
+NLSPACKAGE = initscripts
+
+CATALOGS = $(shell ls *.po)
+FMTCATALOGS = $(patsubst %.po,%.mo,$(CATALOGS))
+
+POTFILES = ../rc.d/init.d/* ../rc.d/rc.* ../sysconfig/network-scripts/*
+
+all: $(NLSPACKAGE).pot $(FMTCATALOGS)
+
+$(NLSPACKAGE).pot: $(POTFILES)
+ ./xgettext_sh --initscripts $(POTFILES) > $(NLSPACKAGE).po
+ 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=`basename $$cat .po`; \
+ if $(MSGMERGE) $$lang.po $(NLSPACKAGE).pot > $$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 -f *mo $(NLSPACKAGE).pot
+
+distclean: clean
+ rm -f .depend Makefile
+
+depend:
+
+install: all
+ mkdir -p $(PREFIX)/$(INSTALLNLSDIR)
+ for n in $(CATALOGS); do \
+ l=`basename $$n .po`; \
+ mo=$$l.mo; \
+ $(INSTALL) -m 755 -d $(PREFIX)/$(INSTALLNLSDIR)/$$l; \
+ $(INSTALL) -m 755 -d $(PREFIX)/$(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
+ $(INSTALL) -m 644 $$mo \
+ $(PREFIX)/$(INSTALLNLSDIR)/$$l/LC_MESSAGES/$(NLSPACKAGE).mo; \
+ done
+
+%.mo: %.po
+ msgfmt -o $@ $<