about summary refs log tree commit diff
path: root/timezone
diff options
context:
space:
mode:
Diffstat (limited to 'timezone')
-rw-r--r--timezone/Makefile47
1 files changed, 32 insertions, 15 deletions
diff --git a/timezone/Makefile b/timezone/Makefile
index 1b26d1ab4d..3f3f944e8b 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -166,22 +166,39 @@ CFLAGS-ialloc.c = -Wno-strict-prototypes -DNOID
 CFLAGS-scheck.c = -Wno-strict-prototypes -DNOID
 
 # We have to make sure the data for testing the tz functions is available.
-$(objpfx)test-tz.out: $(addprefix $(objpfx)testdata/, America/New_York \
-						      Etc/UTC UTC)
-
-$(objpfx)testdata/America/New_York: northamerica $(objpfx)zic \
-				    $(leapseconds) yearistype
-	$(built-program-cmd) -d $(objpfx)testdata -L $(leapseconds) \
-	  -y yearistype northamerica
-$(objpfx)testdata/Etc/UTC: etcetera $(objpfx)zic $(leapseconds) yearistype
-	$(built-program-cmd) -d $(objpfx)testdata -L $(leapseconds) \
-	  -y yearistype etcetera
-$(objpfx)testdata/UTC: simplebackw $(objpfx)zic $(objpfx)testdata/Etc/UTC \
-		       $(leapseconds) yearistype
-	$(built-program-cmd) -d $(objpfx)testdata -L $(leapseconds) \
-	  -y yearistype simplebackw
+testdata = $(objpfx)testdata
+define build-testdata
+$(built-program-cmd) -d $(testdata) -L $(leapseconds) -y ./yearistype $<
+endef
 
-test-tz-ENV = TZDIR=$(objpfx)testdata
+$(objpfx)test-tz.out: $(addprefix $(testdata)/, America/New_York Etc/UTC UTC)
+$(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
+				       Europe/Berlin Universal \
+				       Australia/Melbourne \
+				       America/Sao_Paulo)
+
+test-tz-ENV = TZDIR=$(testdata)
+tst-timezone-ENV = TZDIR=$(testdata)
+
+$(testdata)/America/New_York: northamerica $(objpfx)zic $(leapseconds) \
+			      yearistype
+	$(build-testdata)
+$(testdata)/Etc/UTC: etcetera $(objpfx)zic $(leapseconds) yearistype
+	$(build-testdata)
+$(testdata)/UTC: simplebackw $(objpfx)zic $(testdata)/Etc/UTC \
+		 $(leapseconds) yearistype
+	$(build-testdata)
+$(testdata)/Europe/Berlin: europe $(objpfx)zic $(leapseconds) yearistype
+	$(build-testdata)
+$(testdata)/Universal: simplebackw $(objpfx)zic $(testdata)/Etc/UTC \
+		       $(leapseconds) yearistype
+	$(build-testdata)
+$(testdata)/Australia/Melbourne: australasia $(objpfx)zic $(leapseconds) \
+				 yearistype
+	$(build-testdata)
+$(testdata)/America/Sao_Paulo: southamerica $(objpfx)zic $(leapseconds) \
+			       yearistype
+	$(build-testdata)
 
 
 $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make