]> git.saurik.com Git - apt.git/commitdiff
stop building l10n if strings are unchanged
authorDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 31 May 2013 16:19:09 +0000 (18:19 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 9 Jun 2013 13:12:32 +0000 (15:12 +0200)
The buildsystem tried to build l10n for test applications which never
produced the output it expected causing it to try building it all the
time.

buildlib/copy.mak
buildlib/podomain.mak
doc/makefile
po/makefile
test/interactive-helper/makefile
test/libapt/makefile

index e8fe43deb5443faf780747649e2f5cc9c3d54dcc..3ae11a7eb9fec54d317881ed62c96cb43f511a6e 100644 (file)
@@ -21,7 +21,7 @@ veryclean: veryclean/$(LOCAL)
 
 MKDIRS += $(dir $($(LOCAL)-LIST))
 
-$($(LOCAL)-LIST) : $(TO)/% : % dirs
+$($(LOCAL)-LIST) : $(TO)/% : %
        echo Installing $< to $(@D)
        cp $< $(@D)
 
index cca7d55beb386f9c7182cd52cc24ccbdb754c731..265359abc35860a7c20f0ec50df8af1a176887e3 100644 (file)
@@ -4,6 +4,8 @@
 # declared domain of the make file. It also arranges to set the DOMAIN 
 # CPPFLAG for the compilation.
 
+ifneq ($(APT_DOMAIN),none)
+
 MY_DOMAIN := $(PACKAGE)
 ifdef APT_DOMAIN
 $($(LOCAL)-OBJS): CPPFLAGS := $(CPPFLAGS) -DAPT_DOMAIN='"$(APT_DOMAIN)"'
@@ -13,10 +15,13 @@ endif
 MKDIRS += $(PO_DOMAINS)/$(MY_DOMAIN)
 $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: SRC := $(addprefix $(SUBDIR)/,$(SOURCE))
 $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: makefile dirs
-       (echo $(SRC) | xargs -n1 echo) > $@
+       (echo $(SRC) | xargs -n1 echo) > $@.tmp
+       cmp --silent $@.tmp $@ || mv $@.tmp $@
 startup binary program clean update-po: $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list
 
 veryclean: veryclean/$(LOCAL)
 veryclean/po/$(LOCAL): LIST := $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list
 veryclean/po/$(LOCAL):
        rm -f $(LIST)
+
+endif
index 44a22a597df59cff0cb959612a96fb1638c5de55..274fbc2783d8c8b20298bd81cbe4c08bb049f946 100644 (file)
@@ -36,7 +36,7 @@ $(DOCDIRLIST) :: %/makefile : lang.makefile
        test -d $(dir $@) || mkdir $(dir $@)
        sed "s#@@LANG@@#$(subst /,,$(dir $@))#" $< > $@
 
-debiandoc/subdirs manpages/subdirs clean/subdirs veryclean/subdirs: dirs
+debiandoc/subdirs manpages/subdirs clean/subdirs veryclean/subdirs:
        for dir in en $(dir $(DOCDIRLIST)); do \
                $(MAKE) -C $$dir $(patsubst %/subdirs,%,$@); \
        done
index ebf6c06d08c2975ae3248cc21cff3fe3f59d9c45..5a3c7fb678552de44bb2cc07a610c09e1e4ebeb0 100644 (file)
@@ -30,17 +30,23 @@ GETDOMAIN = $(word 1,$(subst /, ,$(1)))
 # and produce the .pot file.
 $(POTFILES) : $(PO)/%.pot :
        echo "Generating POT file $@"
-       echo $@ : $(wildcard $(PO)/domains/$*/*.*list) $(addprefix $(BASE)/,$(shell cat $(wildcard $(PO)/domains/$*/*.srclist))) > $@.d
+       echo $@ : $(wildcard $(PO)/domains/$*/*.*list) $(addprefix $(BASE)/,$(shell cat $(wildcard $(PO)/domains/$*/*.srclist))) > $@.d.tmp
+       cmp --silent $@.d.tmp $@.d || mv $@.d.tmp $@.d
 # From sh source
-       cat $(PO)/domains/$*/*.shlist 2> /dev/null | (cd $(BASE) && xargs -n1 bash --dump-po-strings) > $(PO)/domains/$*/sh.pot
+       cat $(PO)/domains/$*/*.shlist 2> /dev/null | (cd $(BASE) && xargs -n1 bash --dump-po-strings) > $(PO)/domains/$*/sh.pot.tmp
+       cmp --silent $(PO)/domains/$*/sh.pot.tmp $(PO)/domains/$*/sh.pot || \
+               mv $(PO)/domains/$*/sh.pot.tmp $(PO)/domains/$*/sh.pot
 # From C/C++ source
        cat $(PO)/domains/$*/*.srclist > $(PO)/POTFILES_$*.in
        $(XGETTEXT) --default-domain=$* --directory=$(BASE) \
          --add-comments --foreign --keyword=_ --keyword=N_ \
          --keyword=P_:1,2 \
-         --files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot
+         --files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot.tmp
+       cmp --silent $(PO)/domains/$*/c.pot.tmp $(PO)/domains/$*/c.pot || \
+               mv $(PO)/domains/$*/c.pot.tmp $(PO)/domains/$*/c.pot
        rm -f $(PO)/POTFILES_$*.in
-       $(MSGCOMM) --omit-header --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=$@.tmp
+       cmp --silent $@ $@.tmp || mv $@.tmp $@
        # copy into the domain dirs to make rosetta happy
        rm -f $(PO)/domains/$*/*.pot
        cp $@ $(PO)/domains/$*
@@ -93,4 +99,5 @@ ifneq ($(words $(The_DFiles)),0)
 include $(The_DFiles)
 endif
 
+# otherwise the output is completely screwed
 .NOTPARALLEL:
index 10d1e44ece0d9617d1df8dcd065e1c0304e0f8a6..fa4f5fecba434c845024d22a6286f604d268ff96 100644 (file)
@@ -1,6 +1,7 @@
 # -*- make -*-
 BASE=../..
 SUBDIR=test/interactive-helper
+APT_DOMAIN=none
 
 # Bring in the default rules
 include ../../buildlib/defaults.mak
index 953e455e0498078b1c0a1eaeed415bdb84c3a420..1b67cba9d82b0e6c2fc8e9c50eff3195ca80cf56 100644 (file)
@@ -2,6 +2,7 @@
 BASE=../..
 SUBDIR=test/libapt
 BASENAME=_libapt_test
+APT_DOMAIN=none
 
 # Bring in the default rules
 include ../../buildlib/defaults.mak