Update of /cvsroot/po4a/po4a/po/bin
In directory haydn:/tmp/cvs-serv8721
Modified Files:
Makefile
Log Message:
Various cleanups [Jordi]
Index: Makefile
===================================================================
RCS file: /cvsroot/po4a/po4a/po/bin/Makefile,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Makefile 26 May 2004 19:04:37 -0000 1.12
+++ Makefile 29 Jun 2004 19:35:06 -0000 1.13
@@ -1,26 +1,24 @@
# List here all source files with translatable strings.
MODULE=po4a
-POTFILES=$(wildcard ../../lib/Locale/Po4a/*.pm) \
+PODFILES=$(wildcard ../../lib/Locale/Po4a/*.pm) \
../../po4a-gettextize ../../po4a-normalize ../../po4a-translate ../../po4a-updatepo
-POFILES=$(wildcard *.po)
-MOFILES=$(POFILES:.po=.mo)
+LANGS=$(basename $(wildcard *.po))
-all: $(MODULE).pot $(MOFILES)
+all: $(MODULE).pot $(addsuffix .mo,$(LANGS))
install: all
- for file in $(MOFILES); do \
- lang=`echo $$file | sed 's/\.mo//'`; \
+ for lang in $(LANGS); do \
install -d $(DESTDIR)/usr/share/locale/$$lang/LC_MESSAGES/; \
- install -m 0644 $$file $(DESTDIR)/usr/share/locale/$$lang/LC_MESSAGES/$(MODULE).mo; \
+ install -m 0644 $$lang.mo $(DESTDIR)/usr/share/locale/$$lang/LC_MESSAGES/$(MODULE).mo;
\
done
-$(MODULE).pot: $(POTFILES)
+$(MODULE).pot: $(PODFILES)
# xgettext can mostly handle perl files as C files, though it gets a bit
# confused about single quotes in comments, and the gettext() calls have to
# use double-quoted strings or it will ignore them.
@echo "Rebuilding the pot file"
- xgettext -L Perl $(POTFILES) -o $@.new 2>/dev/null
+ xgettext -L Perl $(PODFILES) -o $@.new 2>/dev/null
@if [ -e $@ ] ; then \
if diff -q -I'#:' -I'POT-Creation-Date:'
-I'PO-Revision-Date:' $@ $@.new>/dev/null ; then \
rm -f $@.new; \
@@ -33,7 +31,7 @@
fi
clean:
- rm -f $(MOFILES) messages *.mo *~
+ rm -f messages *.mo *~
%.mo: %.po
msgfmt -o $@ $<
@@ -52,10 +50,9 @@
@msgfmt --statistics $@
check:
- @for file in $(POFILES); do \
- lang=`echo $$file | sed 's/\.po//'`; \
+ @for lang in $(LANGS); do \
printf "$$lang: "; \
msgfmt -o /dev/null -c -v --statistics $$lang.po;\
done
-update: $(MODULE).pot $(POFILES)
+update: $(MODULE).pot $(addsuffix .po,$(LANGS))