aboutsummaryrefslogtreecommitdiffstats
path: root/po/Makefile
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2002-08-22 13:18:09 +0000
committerPablo Saratxaga <pablo@mandriva.com>2002-08-22 13:18:09 +0000
commitef4c6c595b0800e97b176f5ef42951bd9142ecdc (patch)
tree5c645a8113b5e01b5ea64929cfa2c824e53e838e /po/Makefile
parent22d871eb8a1e5fe60bc2fbad5caf97e4a25f3cdc (diff)
downloadrpmdrake-ef4c6c595b0800e97b176f5ef42951bd9142ecdc.tar
rpmdrake-ef4c6c595b0800e97b176f5ef42951bd9142ecdc.tar.gz
rpmdrake-ef4c6c595b0800e97b176f5ef42951bd9142ecdc.tar.bz2
rpmdrake-ef4c6c595b0800e97b176f5ef42951bd9142ecdc.tar.xz
rpmdrake-ef4c6c595b0800e97b176f5ef42951bd9142ecdc.zip
Improved makefiles
Diffstat (limited to 'po/Makefile')
-rw-r--r--po/Makefile27
1 files changed, 18 insertions, 9 deletions
diff --git a/po/Makefile b/po/Makefile
index 4292f24d..0876dfd7 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -1,15 +1,21 @@
+# the domain name for gettext
+PGOAL = rpmdrake
+
+# perl files to search translatable strings in
PL_FILES = ../rpmdrake ../edit-urpm-sources.pl ../rpmdrake.pm
-PL_CFILES = $(PL_FILES:%=%_.c)
+# C-like files to search translatable strings in
+#CFILES =
+PL_CFILES = $(PL_FILES:%=%_.c)
POFILES = $(shell ls *.po)
MOFILES = $(POFILES:%.po=%.mo)
LANGS = $(POFILES:%.po=%)
-PREFIX = /usr/local
+PREFIX = $(RPM_BUILD_ROOT)/usr
DATADIR = $(PREFIX)/share
LOCALEDIR=$(DATADIR)/locale
-all: $(MOFILES)
+all: $(PGOAL).pot $(MOFILES)
%.mo: %.po
msgfmt -o $@ $<
@@ -20,22 +26,25 @@ $(PL_CFILES): %_.c: %
%.mo: %.po
msgfmt -o $@ $<
-merge: rpmdrake.pot
+merge: $(PGOAL).pot
@for n in $(POFILES); do \
echo "Merging $$n"; \
msgmerge "$$n" $< > "$$n"t; \
mv -f "$$n"t "$$n"; \
done
-rpmdrake.pot: $(PL_CFILES)
- xgettext -F -n --add-comments='-PO' --keyword=_ --language=C -o $@ $(PL_CFILES)
- rm $(PL_CFILES)
+$(PGOAL).pot: $(PL_CFILES) $(CFILES)
+ xgettext -F -n --add-comments='-PO' \
+ --keyword=_ --keyword=__ --keyword=N_ \
+ --language=C -o $@ $(PL_CFILES) $(CFILES)
+ @rm -rf $(PL_CFILES)
install:
for l in $(LANGS); do \
install -d $(LOCALEDIR)/$$l/LC_MESSAGES; \
- install -m 644 $$l.mo $(LOCALEDIR)/$$l/LC_MESSAGES/rpmdrake.mo; \
+ install -m 644 $$l.mo $(LOCALEDIR)/$$l/LC_MESSAGES/$(PGOAL).mo; \
done
clean:
- @rm -rf *.mo $(POFILES:%=%t) $(PL_CFILES) rpmdrake.pot
+ @rm -rf *.mo $(POFILES:%=%t) $(PL_CFILES) $(PGOAL).pot
+