diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2013-05-31 18:19:09 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2013-06-09 15:12:32 +0200 |
commit | 57da1b4bd21aceced30f658993fb811a5232cff7 (patch) | |
tree | 59d24dd51b69af65f15906d0a675e5e48f480ae8 | |
parent | 564fcbf93c78deb48fa44a9a63b5602eedfa53a9 (diff) | |
download | apt-57da1b4bd21aceced30f658993fb811a5232cff7.tar.gz |
stop building l10n if strings are unchanged
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.
-rw-r--r-- | buildlib/copy.mak | 2 | ||||
-rw-r--r-- | buildlib/podomain.mak | 7 | ||||
-rw-r--r-- | doc/makefile | 2 | ||||
-rw-r--r-- | po/makefile | 15 | ||||
-rw-r--r-- | test/interactive-helper/makefile | 1 | ||||
-rw-r--r-- | test/libapt/makefile | 1 |
6 files changed, 21 insertions, 7 deletions
diff --git a/buildlib/copy.mak b/buildlib/copy.mak index e8fe43de..3ae11a7e 100644 --- a/buildlib/copy.mak +++ b/buildlib/copy.mak @@ -21,7 +21,7 @@ veryclean: veryclean/$(LOCAL) MKDIRS += $(dir $($(LOCAL)-LIST)) -$($(LOCAL)-LIST) : $(TO)/% : % dirs +$($(LOCAL)-LIST) : $(TO)/% : % echo Installing $< to $(@D) cp $< $(@D) diff --git a/buildlib/podomain.mak b/buildlib/podomain.mak index cca7d55b..265359ab 100644 --- a/buildlib/podomain.mak +++ b/buildlib/podomain.mak @@ -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 diff --git a/doc/makefile b/doc/makefile index 44a22a59..274fbc27 100644 --- a/doc/makefile +++ b/doc/makefile @@ -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 diff --git a/po/makefile b/po/makefile index ebf6c06d..5a3c7fb6 100644 --- a/po/makefile +++ b/po/makefile @@ -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: diff --git a/test/interactive-helper/makefile b/test/interactive-helper/makefile index 10d1e44e..fa4f5fec 100644 --- a/test/interactive-helper/makefile +++ b/test/interactive-helper/makefile @@ -1,6 +1,7 @@ # -*- make -*- BASE=../.. SUBDIR=test/interactive-helper +APT_DOMAIN=none # Bring in the default rules include ../../buildlib/defaults.mak diff --git a/test/libapt/makefile b/test/libapt/makefile index 953e455e..1b67cba9 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -2,6 +2,7 @@ BASE=../.. SUBDIR=test/libapt BASENAME=_libapt_test +APT_DOMAIN=none # Bring in the default rules include ../../buildlib/defaults.mak |