summaryrefslogtreecommitdiff
path: root/po
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-02-23 09:16:44 +0000
committerJim Meyering <jim@meyering.net>2002-02-23 09:16:44 +0000
commit0142f9ed84eaff57b9e9f0200feda4c3b63560b2 (patch)
treea4e3df2327f3ec7a51b6957dc9a4689aba474fbd /po
parent63d4f2d50b747fd0f92f087bf43bf6574b0a0dec (diff)
downloadcoreutils-0142f9ed84eaff57b9e9f0200feda4c3b63560b2.tar.xz
(DISTFILES.common): Add remove-potcdate.sin.
(.SUFFIXES): Add .sed and .sin. (.sin.sed): New rule. ($(DOMAIN).pot-update): Depend on remove-potcdate.sed. If the old POT file exists and the new POT file differs from it only in the first POT-Creation-Date line, keep the old POT file. So the PO files don't need to be remade, and automake's "distcheck" target succeeds. (mostlyclean): Remove remove-potcdate.sed and additional temporary files.
Diffstat (limited to 'po')
-rw-r--r--po/Makefile.in.in37
1 files changed, 24 insertions, 13 deletions
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index f68983ca4..2d8baba41 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -42,7 +42,7 @@ POFILES = @POFILES@
GMOFILES = @GMOFILES@
UPDATEPOFILES = @UPDATEPOFILES@
DUMMYPOFILES = @DUMMYPOFILES@
-DISTFILES.common = Makefile.in.in Makevars \
+DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
$(POFILES) $(GMOFILES) \
@@ -55,7 +55,7 @@ CATALOGS = @CATALOGS@
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
-.SUFFIXES: .po .gmo .mo .nop .po-update
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
.po.mo:
$(MSGFMT) -c -o $@ $<
@@ -66,6 +66,10 @@ CATALOGS = @CATALOGS@
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
all: all-@USE_NLS@
@@ -76,19 +80,25 @@ all-no:
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
-$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
--files-from=$(srcdir)/POTFILES.in \
- --copyright-holder='$(COPYRIGHT_HOLDER)' \
- && test ! -f $(DOMAIN).po \
- || ( if diff -u -IPOT-Creation-Date: \
- $(DOMAIN).po $(srcdir)/$(DOMAIN).pot>/dev/null 2>&1;then \
- rm -f $(DOMAIN).po; \
- else \
- rm -f $(srcdir)/$(DOMAIN).pot; \
- mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
- fi )
+ --copyright-holder='$(COPYRIGHT_HOLDER)'
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
$(srcdir)/$(DOMAIN).pot:
$(MAKE) $(DOMAIN).pot-update
@@ -227,7 +237,8 @@ check: all
dvi info tags TAGS ID:
mostlyclean:
- rm -f core core.* $(DOMAIN).po *.new.po
+ rm -f remove-potcdate.sed
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
clean: mostlyclean