summaryrefslogtreecommitdiff
path: root/intl/Makefile
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2012-08-17 14:32:19 -0600
committerJeff Law <law@redhat.com>2012-08-17 14:32:19 -0600
commitd1f0938405168df23e24f3446480f96b62e523b5 (patch)
tree4c975959313b1e736b686b0e1950fe5031f5f7ef /intl/Makefile
parentc31fdb83d239de6f5196c6b676e9200a1f7cefe6 (diff)
2012-08-17 Jeff Law <law@redhat.com>
* intl/Makefile (codeset_mo): New variable. ($(codeset_mo)): New target. (tst-codeset.out): Depend on that. Remove explicit rule. (tst-gettext3.out, tst-gettext5.out): Likewise. (LOCPATH-ENV, tst-codeset-ENV): New variables. (tst-gettext3-ENV, tst-gettext5-ENV): Likewise. * intl/tst-codeset.sh: Remove. * intl/tst-gettext3.sh: Likewise. * intl/tst-gettext5.sh: Likewise.
Diffstat (limited to 'intl/Makefile')
-rw-r--r--intl/Makefile25
1 files changed, 19 insertions, 6 deletions
diff --git a/intl/Makefile b/intl/Makefile
index e95f519822..d63ffe4fc0 100644
--- a/intl/Makefile
+++ b/intl/Makefile
@@ -61,6 +61,16 @@ ifneq (no,$(PERL))
tests: $(objpfx)mtrace-tst-gettext
endif
endif
+
+# Multiple tests use this data. Create it once to avoid racing and
+# spurious test failures.
+codeset_mo = $(objpfx)domaindir/de_DE/LC_MESSAGES/codeset.mo
+
+$(codeset_mo):
+ $(make-target-directory)
+ msgfmt -o $@T tstcodeset.po
+ mv -f $@T $@
+
$(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
$(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
@@ -70,16 +80,14 @@ $(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
$(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
$(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
$(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
-$(objpfx)tst-codeset.out: tst-codeset.sh $(objpfx)tst-codeset
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
-$(objpfx)tst-gettext3.out: tst-gettext3.sh $(objpfx)tst-gettext3
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
$(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
-$(objpfx)tst-gettext5.out: tst-gettext5.sh $(objpfx)tst-gettext5
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
$(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
+
+$(objpfx)tst-codeset.out: $(codeset_mo)
+$(objpfx)tst-gettext3.out: $(codeset_mo)
+$(objpfx)tst-gettext5.out: $(codeset_mo)
endif
endif
@@ -96,6 +104,11 @@ CFLAGS-tst-gettext4.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext5.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext6.c = -DOBJPFX=\"$(objpfx)\"
+LOCPATH-ENV = LOCPATH=$(common-objpfx)localedata
+tst-codeset-ENV = $(LOCPATH-ENV)
+tst-gettext3-ENV = $(LOCPATH-ENV)
+tst-gettext5-ENV = $(LOCPATH-ENV)
+
ifeq ($(have-thread-library),yes)
ifeq (yes,$(build-shared))
$(addprefix $(objpfx),$(multithread-test-srcs)): $(shared-thread-library)