diff options
Diffstat (limited to 'timezone/Makefile')
-rw-r--r-- | timezone/Makefile | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/timezone/Makefile b/timezone/Makefile index 24c93c6051..dee7568c7e 100644 --- a/timezone/Makefile +++ b/timezone/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2015 Free Software Foundation, Inc. +# Copyright (C) 1998-2016 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -22,42 +22,32 @@ subdir := timezone include ../Makeconfig -extra-objs := scheck.o ialloc.o - others := zdump zic tests := test-tz tst-timezone tst-tzset -# pacificnew doesn't compile; if it is to be used, it should be included in -# northamerica. -tzbases := africa antarctica asia australasia europe northamerica \ - southamerica etcetera factory \ - solar87 solar88 solar89 -tzlinks := backward systemv -tzfiles := $(tzbases) $(tzlinks) - -generated += $(addprefix z.,$(tzfiles)) -install-sbin := zic zdump - generated-dirs += testdata -install-bin-script = tzselect generated += tzselect testdata = $(objpfx)testdata +ifeq ($(enable-timezone-tools),yes) +install-sbin := zic zdump +install-bin-script = tzselect +endif + ifeq ($(run-built-tests),yes) # List zones generated by separate commands running zic on the host. # Each such zic run counts as a separate test. test-zones := America/New_York Etc/UTC UTC Europe/Berlin \ - Australia/Melbourne America/Sao_Paulo Asia/Tokyo + Australia/Melbourne America/Sao_Paulo Asia/Tokyo \ + $(posixrules-file) tests-special += $(addprefix $(testdata)/, $(test-zones)) endif include ../Rules -$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o - $(objpfx)zic.o $(objpfx)zdump.o: $(objpfx)version.h $(objpfx)version.h: $(common-objpfx)config.make @@ -68,13 +58,14 @@ $(objpfx)version.h: $(common-objpfx)config.make tz-cflags = -DTZDIR='"$(zonedir)"' \ -DTZDEFAULT='"$(localtime-file)"' \ -DTZDEFRULES='"$(posixrules-file)"' \ - -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone + -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone \ + -DHAVE_GETTEXT -DUSE_LTZ=0 -Wno-maybe-uninitialized -CFLAGS-zdump.c = -fwrapv -Wno-strict-prototypes -DNOID $(tz-cflags) \ - -DHAVE_GETTEXT -CFLAGS-zic.c = -Wno-strict-prototypes -DNOID $(tz-cflags) -DHAVE_GETTEXT -CFLAGS-ialloc.c = -Wno-strict-prototypes -DNOID -DHAVE_GETTEXT -CFLAGS-scheck.c = -Wno-strict-prototypes -DNOID -DHAVE_GETTEXT +# The -Wno-unused-variable flag is used to prevent GCC 6 +# from warning about time_t_min and time_t_max which are +# defined in private.h but not used. +CFLAGS-zdump.c = $(tz-cflags) +CFLAGS-zic.c = $(tz-cflags) -Wno-unused-variable # We have to make sure the data for testing the tz functions is available. # Don't add leapseconds here since test-tz made checks that work only without @@ -101,6 +92,8 @@ zic-deps = $(objpfx)zic $(leapseconds) yearistype $(testdata)/America/New_York: northamerica $(zic-deps) $(build-testdata) +$(testdata)/$(posixrules-file): $(testdata)/America/New_York + $(make-link); $(evaluate-test) $(testdata)/Etc/UTC: etcetera $(zic-deps) $(build-testdata) # Use a pattern rule to indicate the command produces both targets at once. @@ -123,6 +116,7 @@ $(testdata)/Asia/Tokyo: asia $(zic-deps) $(build-testdata) $(testdata)/XT%: testdata/XT% + $(make-target-directory) cp $< $@ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make |