]> git.saurik.com Git - apt.git/commitdiff
Makefile, po/makefile: make sure our pot generation datestamp doesn't
authorSteve Langasek <steve.langasek@canonical.com>
Mon, 2 Apr 2012 07:46:52 +0000 (00:46 -0700)
committerSteve Langasek <steve.langasek@canonical.com>
Mon, 2 Apr 2012 07:46:52 +0000 (00:46 -0700)
change at build time, since this makes translations fail to be
co-installable with multiarch.  Based on a patch by David Kalnischkies.
Closes: #659333, LP: #924628.
Makefile
debian/changelog
po/makefile

index 9a47014c3ccb0fb1d840bb619bb5e6479acba539..ee5de1ecc7257f8fbff1bc078ca5174421407fdb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@ all headers library clean veryclean binary program doc dirs test:
 # Some very common aliases
 .PHONY: maintainer-clean dist-clean distclean pristine sanity 
 maintainer-clean dist-clean distclean pristine sanity: veryclean
 # Some very common aliases
 .PHONY: maintainer-clean dist-clean distclean pristine sanity 
 maintainer-clean dist-clean distclean pristine sanity: veryclean
+veryclean: clean
 
 # The startup target builds the necessary configure scripts. It should
 # be used after a CVS checkout.
 
 # The startup target builds the necessary configure scripts. It should
 # be used after a CVS checkout.
index 0b49bf981d3d13bd4bc001434e857eb65b182c5f..e92210052532e65969f8444852896dca84c871f7 100644 (file)
@@ -1,3 +1,12 @@
+apt (0.8.16~exp12ubuntu7) UNRELEASED; urgency=low
+
+  * Makefile, po/makefile:  make sure our pot generation datestamp doesn't
+    change at build time, since this makes translations fail to be
+    co-installable with multiarch.  Based on a patch by David Kalnischkies.
+    Closes: #659333, LP: #924628.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Mon, 02 Apr 2012 07:40:54 +0000
+
 apt (0.8.16~exp12) experimental; urgency=low
 
   [ Michael Vogt ]
 apt (0.8.16~exp12) experimental; urgency=low
 
   [ Michael Vogt ]
index 9f8b7b22e850780747c089bfb9e6cd9cb400c739..43ca12fe316aec9358e07fd8b8c7d6c473bc3a23 100644 (file)
@@ -40,13 +40,23 @@ $(POTFILES) : $(PO)/%.pot :
          --keyword=P_:1,2 \
          --files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot
        rm -f $(PO)/POTFILES_$*.in
          --keyword=P_:1,2 \
          --files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot
        rm -f $(PO)/POTFILES_$*.in
-       $(MSGCOMM) --more-than=0 $(PO)/domains/$*/c.pot $(PO)/domains/$*/sh.pot --output=$@
+       $(MSGCOMM) --omit-header --more-than=0 $(PO)/domains/$*/c.pot $(PO)/domains/$*/sh.pot --output=$@
        # copy into the domain dirs to make rosetta happy
        rm -f $(PO)/domains/$*/*.pot
        cp $@ $(PO)/domains/$*
 
        # copy into the domain dirs to make rosetta happy
        rm -f $(PO)/domains/$*/*.pot
        cp $@ $(PO)/domains/$*
 
-$(PACKAGE)-all.pot: $(POTFILES)
-       $(MSGCOMM) --more-than=0 $(POTFILES) --output=$@
+$(PACKAGE)-all.pot:
+       # we create our partial pot files without a header to avoid 
+       # changing dates in *.mo files, but we want a header for our 
+       # master-pot file, so we use a dummy pot with nothing but the 
+       # header
+       $(XGETTEXT) --default-domain=$(PO)/$(PACKAGE)-dummy.pot --foreign \
+               --language=c -o $(PO)/$(PACKAGE)-dummy.pot --force-po \
+               --package-name=$(PACKAGE) --package-version=$(VERSION) \
+               --msgid-bugs-address=deity@lists.debian.org /dev/null
+       make $(POTFILES)
+       $(MSGCOMM) --more-than=0 $(PO)/$(PACKAGE)-dummy.pot $(POTFILES) --output=$@
+       rm -f $(PO)/$(PACKAGE)-dummy.pot
 
 # Filter the complete translation with the domain specific file to produce
 # only the subtext needed for this domain
 
 # Filter the complete translation with the domain specific file to produce
 # only the subtext needed for this domain
@@ -77,7 +87,11 @@ update-po: $(PACKAGE)-all.pot
        rm -f $$lang.new.po; \
        done
 
        rm -f $$lang.new.po; \
        done
 
-clean: clean/local
+check-pot-deps:
+       echo $(PACKAGE)-all.pot : $(addprefix $(BASE)/,$(shell cat $(wildcard $(PO)/domains/*/*.srclist))) >> $(PO)/apt-all.d
+       make $(PACKAGE)-all.pot
+
+clean: check-pot-deps clean/local
 clean/local: update-po
        rm -f $(MOFILES) $(LANG_POFILES) $(PO)/*.d
 
 clean/local: update-po
        rm -f $(MOFILES) $(LANG_POFILES) $(PO)/*.d