Makefile (46c599340f187db577b9212ab18022f3c7380c68) | Makefile (a979394afeb5c20fc58c5f5b005d51eb8f92f666) |
---|---|
1# Make and install tzdb code and data. 2# This file is in the public domain, so clarified as of 3# 2009-05-17 by Arthur David Olson. 4# Request POSIX conformance; this must be the first non-comment line. 5.POSIX: | 1# Make and install tzdb code and data. 2# This file is in the public domain, so clarified as of 3# 2009-05-17 by Arthur David Olson. 4# Request POSIX conformance; this must be the first non-comment line. 5.POSIX: |
6# On older platforms you may need to scrounge for a POSIX-conforming 'make'. 7# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or 8# /usr/xpg4/bin/make, not /usr/ccs/bin/make. | 6# On older platforms you may need to scrounge for POSIX conformance. 7# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007), 8# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'. |
9 10# To affect how this Makefile works, you can run a shell script like this: 11# 12# #!/bin/sh | 9 10# To affect how this Makefile works, you can run a shell script like this: 11# 12# #!/bin/sh |
13# make CC='gcc -std=gnu11' "$@" | 13# make CC='gcc -std=gnu23' "$@" |
14# | 14# |
15# This example script is appropriate for a pre-2017 GNU/Linux system 16# where a non-default setting is needed to support this package's use of C99. | 15# This example script is appropriate for a circa 2024 GNU/Linux system 16# where a non-default setting enables this package's optional use of C23. |
17# 18# Alternatively, you can simply edit this Makefile to tailor the following 19# macro definitions. 20 21############################################################################### 22# Start of macros that one plausibly might want to tailor. 23 24# Package name for the code distribution. --- 23 unchanged lines hidden (view full) --- 48# Alternatively, if you discover you've got the wrong timezone, you can just 49# 'zic -l -' to remove it, or 'zic -l rightzone' to change it. 50# Use the command 51# make zonenames 52# to get a list of the values you can use for LOCALTIME. 53 54LOCALTIME= Factory 55 | 17# 18# Alternatively, you can simply edit this Makefile to tailor the following 19# macro definitions. 20 21############################################################################### 22# Start of macros that one plausibly might want to tailor. 23 24# Package name for the code distribution. --- 23 unchanged lines hidden (view full) --- 48# Alternatively, if you discover you've got the wrong timezone, you can just 49# 'zic -l -' to remove it, or 'zic -l rightzone' to change it. 50# Use the command 51# make zonenames 52# to get a list of the values you can use for LOCALTIME. 53 54LOCALTIME= Factory 55 |
56# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ | 56# The POSIXRULES macro controls interpretation of POSIX-like TZ |
57# settings like TZ='EET-2EEST' that lack DST transition rules. 58# If POSIXRULES is '-', no template is installed; this is the default. 59# Any other value for POSIXRULES is obsolete and should not be relied on, as: 60# * It does not work correctly in popular implementations such as GNU/Linux. 61# * It does not work even in tzcode, except for historical timestamps 62# that precede the last explicit transition in the POSIXRULES file. 63# Hence it typically does not work for current and future timestamps. 64# If, despite the above, you want a template for handling these settings, --- 62 unchanged lines hidden (view full) --- 127MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man 128 129# Library functions are put in an archive in LIBDIR. 130LIBDIR = $(TOPDIR)/$(USRDIR)/lib 131 132 133# Types to try, as an alternative to time_t. 134TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) | 57# settings like TZ='EET-2EEST' that lack DST transition rules. 58# If POSIXRULES is '-', no template is installed; this is the default. 59# Any other value for POSIXRULES is obsolete and should not be relied on, as: 60# * It does not work correctly in popular implementations such as GNU/Linux. 61# * It does not work even in tzcode, except for historical timestamps 62# that precede the last explicit transition in the POSIXRULES file. 63# Hence it typically does not work for current and future timestamps. 64# If, despite the above, you want a template for handling these settings, --- 62 unchanged lines hidden (view full) --- 127MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man 128 129# Library functions are put in an archive in LIBDIR. 130LIBDIR = $(TOPDIR)/$(USRDIR)/lib 131 132 133# Types to try, as an alternative to time_t. 134TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) |
135TIME_T_ALTERNATIVES_HEAD = int_least64_t 136TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t | 135TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck 136TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \ 137 uint_least64_t.ck |
137 138# What kind of TZif data files to generate. (TZif is the binary time 139# zone data format that zic generates; see Internet RFC 8536.) 140# If you want only POSIX time, with time values interpreted as 141# seconds since the epoch (not counting leap seconds), use 142# REDO= posix_only 143# below. If you want only "right" time, with values interpreted 144# as seconds since the epoch (counting leap seconds), use --- 69 unchanged lines hidden (view full) --- 214# "-DFOO" is equivalent to "-DFOO=1". 215# -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime 216# formats that generate only the last two digits of year numbers 217# -DEPOCH_LOCAL if the 'time' function returns local time not UT 218# -DEPOCH_OFFSET=N if the 'time' function returns a value N greater 219# than what POSIX specifies, assuming local time is UT. 220# For example, N is 252460800 on AmigaOS. 221# -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r | 138 139# What kind of TZif data files to generate. (TZif is the binary time 140# zone data format that zic generates; see Internet RFC 8536.) 141# If you want only POSIX time, with time values interpreted as 142# seconds since the epoch (not counting leap seconds), use 143# REDO= posix_only 144# below. If you want only "right" time, with values interpreted 145# as seconds since the epoch (counting leap seconds), use --- 69 unchanged lines hidden (view full) --- 215# "-DFOO" is equivalent to "-DFOO=1". 216# -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime 217# formats that generate only the last two digits of year numbers 218# -DEPOCH_LOCAL if the 'time' function returns local time not UT 219# -DEPOCH_OFFSET=N if the 'time' function returns a value N greater 220# than what POSIX specifies, assuming local time is UT. 221# For example, N is 252460800 on AmigaOS. 222# -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r |
223# on POSIX platforms predating POSIX.1-2024 |
|
222# -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ' 223# -DHAVE_DECL_TIMEGM=0 if <time.h> does not declare timegm 224# -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows) 225# -DHAVE__GENERIC=0 if _Generic does not work* 226# -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux), 227# -DHAVE_GETRANDOM=0 to avoid using getrandom 228# -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris), 229# where LDLIBS also needs to contain -lintl on some hosts; 230# -DHAVE_GETTEXT=0 to avoid using gettext 231# -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares | 224# -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ' 225# -DHAVE_DECL_TIMEGM=0 if <time.h> does not declare timegm 226# -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows) 227# -DHAVE__GENERIC=0 if _Generic does not work* 228# -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux), 229# -DHAVE_GETRANDOM=0 to avoid using getrandom 230# -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris), 231# where LDLIBS also needs to contain -lintl on some hosts; 232# -DHAVE_GETTEXT=0 to avoid using gettext 233# -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares |
232# ctime_r and asctime_r incompatibly with the POSIX standard | 234# ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier |
233# (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). 234# -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*+ 235# -DHAVE_LINK=0 if your system lacks a link function 236# -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function 237# -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz 238# localtime_rz can make zdump significantly faster, but is nonstandard. 239# -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure. 240# -DHAVE_POSIX_DECLS=0 if your system's include files do not declare --- 15 unchanged lines hidden (view full) --- 256# -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+ 257# Typically it is better to use a later standard. For example, 258# with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'. 259# Even with -DPORT_TO_C89, the code needs at least one C99 260# feature (integers at least 64 bits wide) and maybe more. 261# -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers 262# with external linkage, e.g., applications cannot define 'localtime'. 263# -Dssize_t=long on hosts like MS-Windows that lack ssize_t | 235# (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). 236# -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*+ 237# -DHAVE_LINK=0 if your system lacks a link function 238# -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function 239# -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz 240# localtime_rz can make zdump significantly faster, but is nonstandard. 241# -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure. 242# -DHAVE_POSIX_DECLS=0 if your system's include files do not declare --- 15 unchanged lines hidden (view full) --- 258# -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+ 259# Typically it is better to use a later standard. For example, 260# with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'. 261# Even with -DPORT_TO_C89, the code needs at least one C99 262# feature (integers at least 64 bits wide) and maybe more. 263# -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers 264# with external linkage, e.g., applications cannot define 'localtime'. 265# -Dssize_t=long on hosts like MS-Windows that lack ssize_t |
264# -DSUPPORT_C89 if the tzcode library should support C89 callers+ 265# However, this might trigger latent bugs in C99-or-later callers. | 266# -DSUPPORT_C89=0 if the tzcode library should not support C89 callers 267# Although -DSUPPORT_C89=0 might work around latent bugs in callers, 268# it does not conform to POSIX. 269# -DSUPPORT_POSIX2008 if the library should support older POSIX callers+ 270# However, this might cause problems in POSIX.1-2024-or-later callers. |
266# -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has 267# security implications and is not recommended for general use 268# -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; 269# not needed by the main-program tz code, which is single-threaded. 270# Append other compiler flags as needed, e.g., -pthread on GNU/Linux. 271# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t 272# This is intended for internal use only; it mangles external names. 273# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz" 274# -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; 275# the default is system-supplied, typically "/usr/lib/locale" 276# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified | 271# -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has 272# security implications and is not recommended for general use 273# -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; 274# not needed by the main-program tz code, which is single-threaded. 275# Append other compiler flags as needed, e.g., -pthread on GNU/Linux. 276# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t 277# This is intended for internal use only; it mangles external names. 278# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz" 279# -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; 280# the default is system-supplied, typically "/usr/lib/locale" 281# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified |
277# DST transitions for POSIX.1-2017-style TZ strings lacking them, | 282# DST transitions for proleptic format TZ strings lacking them, |
278# in the usual case where POSIXRULES is '-'. If not specified, 279# TZDEFRULESTRING defaults to US rules for future DST transitions. 280# This mishandles some past timestamps, as US DST rules have changed. 281# It also mishandles settings like TZ='EET-2EEST' for eastern Europe, 282# as Europe and US DST rules differ. 283# -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 255) 284# -DUNINIT_TRAP if reading uninitialized storage can cause problems 285# other than simply getting garbage data --- 11 unchanged lines hidden (view full) --- 297# -g to generate symbolic debugging info 298# -Idir to include from directory 'dir' 299# -O0 to disable optimization; other -O options to enable more optimization 300# -Uname to remove any definition of the macro 'name' 301# $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking 302# 303# * Options marked "*" can be omitted if your compiler is C23 compatible. 304# * Options marked "+" are obsolescent and are planned to be removed | 283# in the usual case where POSIXRULES is '-'. If not specified, 284# TZDEFRULESTRING defaults to US rules for future DST transitions. 285# This mishandles some past timestamps, as US DST rules have changed. 286# It also mishandles settings like TZ='EET-2EEST' for eastern Europe, 287# as Europe and US DST rules differ. 288# -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 255) 289# -DUNINIT_TRAP if reading uninitialized storage can cause problems 290# other than simply getting garbage data --- 11 unchanged lines hidden (view full) --- 302# -g to generate symbolic debugging info 303# -Idir to include from directory 'dir' 304# -O0 to disable optimization; other -O options to enable more optimization 305# -Uname to remove any definition of the macro 'name' 306# $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking 307# 308# * Options marked "*" can be omitted if your compiler is C23 compatible. 309# * Options marked "+" are obsolescent and are planned to be removed |
305# once the code assumes C99 or later, say in the year 2029. | 310# once the code assumes C99 or later (say in the year 2029) 311# and POSIX.1-2024 or later (say in the year 2034). |
306# 307# Select instrumentation via "make GCC_INSTRUMENT='whatever'". 308GCC_INSTRUMENT = \ 309 -fsanitize=undefined -fsanitize-address-use-after-scope \ 310 -fsanitize-undefined-trap-on-error -fstack-protector 311# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. | 312# 313# Select instrumentation via "make GCC_INSTRUMENT='whatever'". 314GCC_INSTRUMENT = \ 315 -fsanitize=undefined -fsanitize-address-use-after-scope \ 316 -fsanitize-undefined-trap-on-error -fstack-protector 317# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. |
312GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ | 318GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ |
313 $(GCC_INSTRUMENT) \ 314 -Wall -Wextra \ 315 -Walloc-size-larger-than=100000 -Warray-bounds=2 \ 316 -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \ 317 -Wdeclaration-after-statement -Wdouble-promotion \ | 319 $(GCC_INSTRUMENT) \ 320 -Wall -Wextra \ 321 -Walloc-size-larger-than=100000 -Warray-bounds=2 \ 322 -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \ 323 -Wdeclaration-after-statement -Wdouble-promotion \ |
318 -Wduplicated-branches -Wduplicated-cond \ | 324 -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \ |
319 -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ 320 -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \ | 325 -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ 326 -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \ |
321 -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ | 327 -Wmissing-declarations -Wmissing-prototypes \ 328 -Wmissing-variable-declarations -Wnested-externs \ |
322 -Wnull-dereference \ 323 -Wold-style-definition -Woverlength-strings -Wpointer-arith \ 324 -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ 325 -Wstrict-prototypes -Wstringop-overflow=4 \ 326 -Wstringop-truncation -Wsuggest-attribute=cold \ 327 -Wsuggest-attribute=const -Wsuggest-attribute=format \ 328 -Wsuggest-attribute=malloc \ 329 -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ | 329 -Wnull-dereference \ 330 -Wold-style-definition -Woverlength-strings -Wpointer-arith \ 331 -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ 332 -Wstrict-prototypes -Wstringop-overflow=4 \ 333 -Wstringop-truncation -Wsuggest-attribute=cold \ 334 -Wsuggest-attribute=const -Wsuggest-attribute=format \ 335 -Wsuggest-attribute=malloc \ 336 -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ |
330 -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \ | 337 -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ |
331 -Wvariadic-macros -Wvla -Wwrite-strings \ | 338 -Wvariadic-macros -Wvla -Wwrite-strings \ |
332 -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ 333 -Wno-type-limits | 339 -Wno-format-nonliteral -Wno-sign-compare |
334# 335# If your system has a "GMT offset" field in its "struct tm"s 336# (or if you decide to add such a field in your system's "time.h" file), 337# add the name to a define such as 338# -DTM_GMTOFF=tm_gmtoff 339# to the end of the "CFLAGS=" line. If not defined, the code attempts to 340# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this. 341# Similarly, if your system has a "zone abbreviation" field, define 342# -DTM_ZONE=tm_zone 343# and define NO_TM_ZONE to suppress any guessing. | 340# 341# If your system has a "GMT offset" field in its "struct tm"s 342# (or if you decide to add such a field in your system's "time.h" file), 343# add the name to a define such as 344# -DTM_GMTOFF=tm_gmtoff 345# to the end of the "CFLAGS=" line. If not defined, the code attempts to 346# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this. 347# Similarly, if your system has a "zone abbreviation" field, define 348# -DTM_ZONE=tm_zone 349# and define NO_TM_ZONE to suppress any guessing. |
344# Although these two fields are not required by POSIX.1-2017, 345# POSIX 202x/D4 requires them and they are widely available 346# on GNU/Linux and BSD systems. | 350# Although POSIX.1-2024 requires these fields and they are widely available 351# on GNU/Linux and BSD systems, some older systems lack them. |
347# 348# The next batch of options control support for external variables 349# exported by tzcode. In practice these variables are less useful 350# than TM_GMTOFF and TM_ZONE. However, most of them are standardized. 351# # 352# # To omit or support the external variable "tzname", add one of: 353# # -DHAVE_TZNAME=0 # do not support "tzname" 354# # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library 355# # -DHAVE_TZNAME=2 # support and define "tzname" | 352# 353# The next batch of options control support for external variables 354# exported by tzcode. In practice these variables are less useful 355# than TM_GMTOFF and TM_ZONE. However, most of them are standardized. 356# # 357# # To omit or support the external variable "tzname", add one of: 358# # -DHAVE_TZNAME=0 # do not support "tzname" 359# # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library 360# # -DHAVE_TZNAME=2 # support and define "tzname" |
356# # to the "CFLAGS=" line. "tzname" is required by POSIX.1-1988 and later. | 361# # to the "CFLAGS=" line. Although "tzname" is required by POSIX.1-1988 362# # and later, its contents are unspecified if you use a geographical TZ 363# # and the variable is planned to be removed in a future POSIX edition. |
357# # If not defined, the code attempts to guess HAVE_TZNAME from other macros. 358# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause 359# # crashes when combined with some platforms' standard libraries, 360# # presumably due to memory allocation issues. 361# # 362# # To omit or support the external variables "timezone" and "daylight", add 363# # -DUSG_COMPAT=0 # do not support 364# # -DUSG_COMPAT=1 # support, and variables are defined by system library 365# # -DUSG_COMPAT=2 # support and define variables 366# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix | 364# # If not defined, the code attempts to guess HAVE_TZNAME from other macros. 365# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause 366# # crashes when combined with some platforms' standard libraries, 367# # presumably due to memory allocation issues. 368# # 369# # To omit or support the external variables "timezone" and "daylight", add 370# # -DUSG_COMPAT=0 # do not support 371# # -DUSG_COMPAT=1 # support, and variables are defined by system library 372# # -DUSG_COMPAT=2 # support and define variables 373# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix |
367# # Systems Group code and are required by POSIX.1-2008 and later (with XSI). | 374# # Systems Group code and are required by POSIX.1-2008 and later (with XSI), 375# # although their contents are unspecified if you use a geographical TZ 376# # and the variables are planned to be removed in a future edition of POSIX. |
368# # If not defined, the code attempts to guess USG_COMPAT from other macros. 369# # 370# # To support the external variable "altzone", add 371# # -DALTZONE=0 # do not support 372# # -DALTZONE=1 # support "altzone", which is defined by system library 373# # -DALTZONE=2 # support and define "altzone" 374# # to the end of the "CFLAGS=" line; although "altzone" appeared in 375# # System V Release 3.1 it has not been standardized. --- 47 unchanged lines hidden (view full) --- 423# POSIX says CFLAGS defaults to "-O 1". 424# Uncomment the following line and edit its contents as needed. 425 426#CFLAGS= -O 1 427 428 429# The name of a POSIX-like library archiver, its flags, C compiler, 430# linker flags, and 'make' utility. Ordinarily the defaults suffice. | 377# # If not defined, the code attempts to guess USG_COMPAT from other macros. 378# # 379# # To support the external variable "altzone", add 380# # -DALTZONE=0 # do not support 381# # -DALTZONE=1 # support "altzone", which is defined by system library 382# # -DALTZONE=2 # support and define "altzone" 383# # to the end of the "CFLAGS=" line; although "altzone" appeared in 384# # System V Release 3.1 it has not been standardized. --- 47 unchanged lines hidden (view full) --- 432# POSIX says CFLAGS defaults to "-O 1". 433# Uncomment the following line and edit its contents as needed. 434 435#CFLAGS= -O 1 436 437 438# The name of a POSIX-like library archiver, its flags, C compiler, 439# linker flags, and 'make' utility. Ordinarily the defaults suffice. |
431# The commented-out values are the defaults specified by POSIX.1-202x/D4. | 440# The commented-out values are the defaults specified by POSIX.1-2024. |
432#AR = ar 433#ARFLAGS = -rv 434#CC = c17 435#LDFLAGS = 436#MAKE = make 437 | 441#AR = ar 442#ARFLAGS = -rv 443#CC = c17 444#LDFLAGS = 445#MAKE = make 446 |
438# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in 439# submake command lines. The default is no leap seconds. 440 441LEAPSECONDS= 442 | |
443# Where to fetch leap-seconds.list from. 444leaplist_URI = \ 445 https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list 446# The file is generated by the IERS Earth Orientation Centre, in Paris. 447leaplist_TZ = Europe/Paris 448 449# The zic command and its arguments. 450 --- 5 unchanged lines hidden (view full) --- 456# To grow the files and work around bugs in older applications, 457# possibly at the expense of introducing bugs in newer ones, 458# append "-b fat"; see ZIC_BLOAT_DEFAULT above. 459# See the zic man page for more about -b and -r. 460ZFLAGS= 461 462# How to use zic to install TZif files. 463 | 447# Where to fetch leap-seconds.list from. 448leaplist_URI = \ 449 https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list 450# The file is generated by the IERS Earth Orientation Centre, in Paris. 451leaplist_TZ = Europe/Paris 452 453# The zic command and its arguments. 454 --- 5 unchanged lines hidden (view full) --- 460# To grow the files and work around bugs in older applications, 461# possibly at the expense of introducing bugs in newer ones, 462# append "-b fat"; see ZIC_BLOAT_DEFAULT above. 463# See the zic man page for more about -b and -r. 464ZFLAGS= 465 466# How to use zic to install TZif files. 467 |
464ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) | 468ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' |
465 466# The name of a POSIX-compliant 'awk' on your system. 467# mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work. 468# Also, it is better (though not essential) if 'awk' supports UTF-8, 469# and unfortunately mawk and busybox awk do not support UTF-8. 470# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems. 471AWK= awk 472 473# The full path name of a POSIX-compliant shell, preferably one that supports 474# the Korn shell's 'select' statement as an extension. 475# These days, Bash is the most popular. 476# It should be OK to set this to /bin/sh, on platforms where /bin/sh 477# lacks 'select' or doesn't completely conform to POSIX, but /bin/bash 478# is typically nicer if it works. 479KSHELL= /bin/bash 480 481# Name of curl <https://curl.haxx.se/>, used for HTML validation 482# and to fetch leap-seconds.list from upstream. | 469 470# The name of a POSIX-compliant 'awk' on your system. 471# mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work. 472# Also, it is better (though not essential) if 'awk' supports UTF-8, 473# and unfortunately mawk and busybox awk do not support UTF-8. 474# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems. 475AWK= awk 476 477# The full path name of a POSIX-compliant shell, preferably one that supports 478# the Korn shell's 'select' statement as an extension. 479# These days, Bash is the most popular. 480# It should be OK to set this to /bin/sh, on platforms where /bin/sh 481# lacks 'select' or doesn't completely conform to POSIX, but /bin/bash 482# is typically nicer if it works. 483KSHELL= /bin/bash 484 485# Name of curl <https://curl.haxx.se/>, used for HTML validation 486# and to fetch leap-seconds.list from upstream. |
487# Set CURL=: to disable use of the Internet. |
|
483CURL= curl 484 485# Name of GNU Privacy Guard <https://gnupg.org/>, used to sign distributions. 486GPG= gpg 487 488# This expensive test requires USE_LTZ. 489# To suppress it, define this macro to be empty. 490CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives --- 37 unchanged lines hidden (view full) --- 528# this is so that comments can contain non-ASCII characters. 529# OK_LINE matches a line of OK characters. 530SAFE_LINE= '^'$(SAFE_CHAR)'*$$' 531SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$' 532OK_LINE= '^'$(OK_CHAR)'*$$' 533 534# Flags to give 'tar' when making a distribution. 535# Try to use flags appropriate for GNU tar. | 488CURL= curl 489 490# Name of GNU Privacy Guard <https://gnupg.org/>, used to sign distributions. 491GPG= gpg 492 493# This expensive test requires USE_LTZ. 494# To suppress it, define this macro to be empty. 495CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives --- 37 unchanged lines hidden (view full) --- 533# this is so that comments can contain non-ASCII characters. 534# OK_LINE matches a line of OK characters. 535SAFE_LINE= '^'$(SAFE_CHAR)'*$$' 536SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$' 537OK_LINE= '^'$(OK_CHAR)'*$$' 538 539# Flags to give 'tar' when making a distribution. 540# Try to use flags appropriate for GNU tar. |
536GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \ | 541GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \ |
537 --numeric-owner --owner=0 --group=0 \ 538 --mode=go+u,go-w --sort=name | 542 --numeric-owner --owner=0 --group=0 \ 543 --mode=go+u,go-w --sort=name |
539TARFLAGS= `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \ 540 then echo $(GNUTARFLAGS); \ 541 else :; \ 542 fi` | 544SETUP_TAR= \ 545 export LC_ALL=C && \ 546 if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \ 547 TAR='tar $(GNUTARFLAGS)'; \ 548 else \ 549 TAR=tar; \ 550 fi |
543 544# Flags to give 'gzip' when making a distribution. 545GZIPFLAGS= -9n 546 547# When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported. 548# This makes it easier to see which Zone has been affected. | 551 552# Flags to give 'gzip' when making a distribution. 553GZIPFLAGS= -9n 554 555# When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported. 556# This makes it easier to see which Zone has been affected. |
549DIFF_TZS= diff -u$$(! diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1 \ 550 || echo ' -F^TZ=') | 557SETUP_DIFF_TZS = \ 558 if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \ 559 DIFF_TZS='diff -u -F^TZ='; \ 560 else \ 561 DIFF_TZS='diff -u'; \ 562 fi |
551 552# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. 553RANLIB= : 554 555# POSIX prohibits defining or using SHELL. However, csh users on systems 556# that use the user shell for Makefile commands may need to define SHELL. 557#SHELL= /bin/sh 558 559# End of macros that one plausibly might want to tailor. 560############################################################################### 561 562 563TZCOBJS= zic.o | 563 564# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. 565RANLIB= : 566 567# POSIX prohibits defining or using SHELL. However, csh users on systems 568# that use the user shell for Makefile commands may need to define SHELL. 569#SHELL= /bin/sh 570 571# End of macros that one plausibly might want to tailor. 572############################################################################### 573 574 575TZCOBJS= zic.o |
564TZDOBJS= zdump.o localtime.o asctime.o strftime.o 565DATEOBJS= date.o localtime.o strftime.o asctime.o | 576TZDOBJS= zdump.o localtime.o strftime.o 577DATEOBJS= date.o localtime.o strftime.o |
566LIBSRCS= localtime.c asctime.c difftime.c strftime.c 567LIBOBJS= localtime.o asctime.o difftime.o strftime.o 568HEADERS= tzfile.h private.h 569NONLIBSRCS= zic.c zdump.c 570NEWUCBSRCS= date.c 571SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ 572 tzselect.ksh workman.sh 573MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ 574 tzfile.5 tzselect.8 zic.8 zdump.8 575MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ 576 time2posix.3.txt \ 577 tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \ 578 date.1.txt 579COMMON= calendars CONTRIBUTING LICENSE Makefile \ 580 NEWS README SECURITY theory.html version 581WEB_PAGES= tz-art.html tz-how-to.html tz-link.html | 578LIBSRCS= localtime.c asctime.c difftime.c strftime.c 579LIBOBJS= localtime.o asctime.o difftime.o strftime.o 580HEADERS= tzfile.h private.h 581NONLIBSRCS= zic.c zdump.c 582NEWUCBSRCS= date.c 583SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ 584 tzselect.ksh workman.sh 585MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ 586 tzfile.5 tzselect.8 zic.8 zdump.8 587MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ 588 time2posix.3.txt \ 589 tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \ 590 date.1.txt 591COMMON= calendars CONTRIBUTING LICENSE Makefile \ 592 NEWS README SECURITY theory.html version 593WEB_PAGES= tz-art.html tz-how-to.html tz-link.html |
582CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ 583 check_tz-how-to.html check_tz-link.html | 594CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck |
584DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) 585PRIMARY_YDATA= africa antarctica asia australasia \ 586 europe northamerica southamerica 587YDATA= $(PRIMARY_YDATA) etcetera 588NDATA= factory 589TDATA_TO_CHECK= $(YDATA) $(NDATA) backward 590TDATA= $(YDATA) $(NDATA) $(BACKWARD) 591ZONETABLES= zone.tab zone1970.tab zonenow.tab --- 44 unchanged lines hidden (view full) --- 636 637install: all $(DATA) $(REDO) $(MANS) 638 mkdir -p '$(DESTDIR)$(BINDIR)' \ 639 '$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \ 640 '$(DESTDIR)$(LIBDIR)' \ 641 '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ 642 '$(DESTDIR)$(MANDIR)/man8' 643 $(ZIC_INSTALL) -l $(LOCALTIME) \ | 595DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) 596PRIMARY_YDATA= africa antarctica asia australasia \ 597 europe northamerica southamerica 598YDATA= $(PRIMARY_YDATA) etcetera 599NDATA= factory 600TDATA_TO_CHECK= $(YDATA) $(NDATA) backward 601TDATA= $(YDATA) $(NDATA) $(BACKWARD) 602ZONETABLES= zone.tab zone1970.tab zonenow.tab --- 44 unchanged lines hidden (view full) --- 647 648install: all $(DATA) $(REDO) $(MANS) 649 mkdir -p '$(DESTDIR)$(BINDIR)' \ 650 '$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \ 651 '$(DESTDIR)$(LIBDIR)' \ 652 '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ 653 '$(DESTDIR)$(MANDIR)/man8' 654 $(ZIC_INSTALL) -l $(LOCALTIME) \ |
644 `case '$(POSIXRULES)' in ?*) echo '-p';; esac \ 645 ` $(POSIXRULES) \ | 655 -p $(POSIXRULES) \ |
646 -t '$(DESTDIR)$(TZDEFAULT)' 647 cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' 648 cp tzselect '$(DESTDIR)$(BINDIR)/.' 649 cp zdump '$(DESTDIR)$(ZDUMPDIR)/.' 650 cp zic '$(DESTDIR)$(ZICDIR)/.' 651 cp libtz.a '$(DESTDIR)$(LIBDIR)/.' 652 $(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a' 653 cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.' --- 6 unchanged lines hidden (view full) --- 660 cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.' 661 662# Calculate version number from git, if available. 663# Otherwise, use $(VERSION) unless it is "unknown" and there is already 664# a 'version' file, in which case reuse the existing 'version' contents 665# and append "-dirty" if the contents do not already end in "-dirty". 666version: $(VERSION_DEPS) 667 { (type git) >/dev/null 2>&1 && \ | 656 -t '$(DESTDIR)$(TZDEFAULT)' 657 cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' 658 cp tzselect '$(DESTDIR)$(BINDIR)/.' 659 cp zdump '$(DESTDIR)$(ZDUMPDIR)/.' 660 cp zic '$(DESTDIR)$(ZICDIR)/.' 661 cp libtz.a '$(DESTDIR)$(LIBDIR)/.' 662 $(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a' 663 cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.' --- 6 unchanged lines hidden (view full) --- 670 cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.' 671 672# Calculate version number from git, if available. 673# Otherwise, use $(VERSION) unless it is "unknown" and there is already 674# a 'version' file, in which case reuse the existing 'version' contents 675# and append "-dirty" if the contents do not already end in "-dirty". 676version: $(VERSION_DEPS) 677 { (type git) >/dev/null 2>&1 && \ |
668 V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ 669 --abbrev=7 --dirty` || \ 670 if test '$(VERSION)' = unknown && V=`cat $@`; then \ 671 case $$V in *-dirty);; *) V=$$V-dirty;; esac; \ | 678 V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ 679 --abbrev=7 --dirty) || \ 680 if test '$(VERSION)' = unknown && read -r V <$@; then \ 681 V=$${V%-dirty}-dirty; \ |
672 else \ 673 V='$(VERSION)'; \ 674 fi; } && \ 675 printf '%s\n' "$$V" >$@.out 676 mv $@.out $@ 677 678# These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST. 679vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) 680 $(AWK) \ | 682 else \ 683 V='$(VERSION)'; \ 684 fi; } && \ 685 printf '%s\n' "$$V" >$@.out 686 mv $@.out $@ 687 688# These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST. 689vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) 690 $(AWK) \ |
681 -v DATAFORM=`expr $@ : '\(.*\).zi'` \ | 691 -v DATAFORM=$(@:.zi=) \ |
682 -v PACKRATDATA='$(PACKRATDATA)' \ 683 -v PACKRATLIST='$(PACKRATLIST)' \ 684 -f ziguard.awk \ 685 $(TDATA) $(PACKRATDATA) >$@.out 686 mv $@.out $@ 687# This file has a version comment that attempts to capture any tailoring 688# via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO. 689tzdata.zi: $(DATAFORM).zi version zishrink.awk | 692 -v PACKRATDATA='$(PACKRATDATA)' \ 693 -v PACKRATLIST='$(PACKRATLIST)' \ 694 -f ziguard.awk \ 695 $(TDATA) $(PACKRATDATA) >$@.out 696 mv $@.out $@ 697# This file has a version comment that attempts to capture any tailoring 698# via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO. 699tzdata.zi: $(DATAFORM).zi version zishrink.awk |
690 version=`sed 1q version` && \ | 700 read -r version <version && \ |
691 LC_ALL=C $(AWK) \ 692 -v dataform='$(DATAFORM)' \ 693 -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \ 694 -v redo='$(REDO)' \ 695 -v version="$$version" \ 696 -f zishrink.awk \ 697 $(DATAFORM).zi >$@.out 698 mv $@.out $@ --- 4 unchanged lines hidden (view full) --- 703 '# define TZDEFAULT "$(TZDEFAULT)" /* default zone */' \ 704 '#endif' \ 705 '#ifndef TZDIR' \ 706 '# define TZDIR "$(TZDIR)" /* TZif directory */' \ 707 '#endif' 708 mv $@.out $@ 709 710version.h: version | 701 LC_ALL=C $(AWK) \ 702 -v dataform='$(DATAFORM)' \ 703 -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \ 704 -v redo='$(REDO)' \ 705 -v version="$$version" \ 706 -f zishrink.awk \ 707 $(DATAFORM).zi >$@.out 708 mv $@.out $@ --- 4 unchanged lines hidden (view full) --- 713 '# define TZDEFAULT "$(TZDEFAULT)" /* default zone */' \ 714 '#endif' \ 715 '#ifndef TZDIR' \ 716 '# define TZDIR "$(TZDIR)" /* TZif directory */' \ 717 '#endif' 718 mv $@.out $@ 719 720version.h: version |
711 VERSION=`cat version` && printf '%s\n' \ | 721 read -r VERSION <version && printf '%s\n' \ |
712 'static char const PKGVERSION[]="($(PACKAGE)) ";' \ 713 "static char const TZVERSION[]=\"$$VERSION\";" \ 714 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \ 715 >$@.out 716 mv $@.out $@ 717 718zdump: $(TZDOBJS) 719 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS) --- 23 unchanged lines hidden (view full) --- 743 744# Fetch leap-seconds.list from upstream and commit it to the local repository. 745commit-leap-seconds.list: fetch-leap-seconds.list 746 author=$$($(AWK) '$(EXTRACT_AUTHOR)' leap-seconds.list) && \ 747 date=$$(TZ=$(leaplist_TZ) stat -c%y leap-seconds.list) && \ 748 git commit --author="$$author" --date="$$date" -m'make $@' \ 749 leap-seconds.list 750 | 722 'static char const PKGVERSION[]="($(PACKAGE)) ";' \ 723 "static char const TZVERSION[]=\"$$VERSION\";" \ 724 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \ 725 >$@.out 726 mv $@.out $@ 727 728zdump: $(TZDOBJS) 729 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS) --- 23 unchanged lines hidden (view full) --- 753 754# Fetch leap-seconds.list from upstream and commit it to the local repository. 755commit-leap-seconds.list: fetch-leap-seconds.list 756 author=$$($(AWK) '$(EXTRACT_AUTHOR)' leap-seconds.list) && \ 757 date=$$(TZ=$(leaplist_TZ) stat -c%y leap-seconds.list) && \ 758 git commit --author="$$author" --date="$$date" -m'make $@' \ 759 leap-seconds.list 760 |
751# Arguments to pass to submakes of install_data. | 761# Arguments to pass to submakes. |
752# They can be overridden by later submake arguments. 753INSTALLARGS = \ 754 BACKWARD='$(BACKWARD)' \ 755 DESTDIR='$(DESTDIR)' \ | 762# They can be overridden by later submake arguments. 763INSTALLARGS = \ 764 BACKWARD='$(BACKWARD)' \ 765 DESTDIR='$(DESTDIR)' \ |
756 LEAPSECONDS='$(LEAPSECONDS)' \ | |
757 PACKRATDATA='$(PACKRATDATA)' \ 758 PACKRATLIST='$(PACKRATLIST)' \ 759 TZDEFAULT='$(TZDEFAULT)' \ 760 TZDIR='$(TZDIR)' \ 761 ZIC='$(ZIC)' 762 763INSTALL_DATA_DEPS = zic leapseconds tzdata.zi 764 | 766 PACKRATDATA='$(PACKRATDATA)' \ 767 PACKRATLIST='$(PACKRATLIST)' \ 768 TZDEFAULT='$(TZDEFAULT)' \ 769 TZDIR='$(TZDIR)' \ 770 ZIC='$(ZIC)' 771 772INSTALL_DATA_DEPS = zic leapseconds tzdata.zi 773 |
765# 'make install_data' installs one set of TZif files. 766install_data: $(INSTALL_DATA_DEPS) | 774posix_only: $(INSTALL_DATA_DEPS) |
767 $(ZIC_INSTALL) tzdata.zi 768 | 775 $(ZIC_INSTALL) tzdata.zi 776 |
769posix_only: $(INSTALL_DATA_DEPS) 770 $(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data 771 | |
772right_only: $(INSTALL_DATA_DEPS) | 777right_only: $(INSTALL_DATA_DEPS) |
773 $(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \ 774 install_data | 778 $(ZIC_INSTALL) -L leapseconds tzdata.zi |
775 776# In earlier versions of this makefile, the other two directories were 777# subdirectories of $(TZDIR). However, this led to configuration errors. 778# For example, with posix_right under the earlier scheme, 779# TZ='right/Australia/Adelaide' got you localtime with leap seconds, 780# but gmtime without leap seconds, which led to problems with applications 781# like sendmail that subtract gmtime from localtime. 782# Therefore, the other two directories are now siblings of $(TZDIR). --- 14 unchanged lines hidden (view full) --- 797zones: $(REDO) 798 799# dummy.zd is not a real file; it is mentioned here only so that the 800# top-level 'make' does not have a syntax error. 801ZDS = dummy.zd 802# Rule used only by submakes invoked by the $(TZS_NEW) rule. 803# It is separate so that GNU 'make -j' can run instances in parallel. 804$(ZDS): zdump | 779 780# In earlier versions of this makefile, the other two directories were 781# subdirectories of $(TZDIR). However, this led to configuration errors. 782# For example, with posix_right under the earlier scheme, 783# TZ='right/Australia/Adelaide' got you localtime with leap seconds, 784# but gmtime without leap seconds, which led to problems with applications 785# like sendmail that subtract gmtime from localtime. 786# Therefore, the other two directories are now siblings of $(TZDIR). --- 14 unchanged lines hidden (view full) --- 801zones: $(REDO) 802 803# dummy.zd is not a real file; it is mentioned here only so that the 804# top-level 'make' does not have a syntax error. 805ZDS = dummy.zd 806# Rule used only by submakes invoked by the $(TZS_NEW) rule. 807# It is separate so that GNU 'make -j' can run instances in parallel. 808$(ZDS): zdump |
805 ./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@ : '\(.*\).zd') \ 806 >$@ | 809 ./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@:.zd=)" >$@ |
807 808TZS_NEW_DEPS = tzdata.zi zdump zic 809$(TZS_NEW): $(TZS_NEW_DEPS) 810 rm -fr tzs$(TZS_YEAR).dir 811 mkdir tzs$(TZS_YEAR).dir 812 $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi 813 $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ 814 tzdata.zi | LC_ALL=C sort >$@.out | 810 811TZS_NEW_DEPS = tzdata.zi zdump zic 812$(TZS_NEW): $(TZS_NEW_DEPS) 813 rm -fr tzs$(TZS_YEAR).dir 814 mkdir tzs$(TZS_YEAR).dir 815 $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi 816 $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ 817 tzdata.zi | LC_ALL=C sort >$@.out |
815 wd=`pwd` && \ 816 x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ | 818 x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ |
817 tzdata.zi \ | 819 tzdata.zi \ |
818 | LC_ALL=C sort -t . -k 2,2` && \ | 820 | LC_ALL=C sort -t . -k 2,2) && \ |
819 set x $$x && \ 820 shift && \ 821 ZDS=$$* && \ | 821 set x $$x && \ 822 shift && \ 823 ZDS=$$* && \ |
822 $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ | 824 $(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ |
823 ZDS="$$ZDS" $$ZDS && \ 824 sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out 825 rm -fr tzs$(TZS_YEAR).dir 826 mv $@.out $@ 827 | 825 ZDS="$$ZDS" $$ZDS && \ 826 sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out 827 rm -fr tzs$(TZS_YEAR).dir 828 mv $@.out $@ 829 |
828# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the | 830# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the |
829# failed output and fix the inconsistency, perhaps by running 'make force_tzs'. 830$(TZS): 831 touch $@ 832 833force_tzs: $(TZS_NEW) 834 cp $(TZS_NEW) $(TZS) 835 836libtz.a: $(LIBOBJS) 837 rm -f $@ 838 $(AR) $(ARFLAGS) $@ $(LIBOBJS) 839 $(RANLIB) $@ 840 841date: $(DATEOBJS) 842 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) 843 844tzselect: tzselect.ksh version | 831# failed output and fix the inconsistency, perhaps by running 'make force_tzs'. 832$(TZS): 833 touch $@ 834 835force_tzs: $(TZS_NEW) 836 cp $(TZS_NEW) $(TZS) 837 838libtz.a: $(LIBOBJS) 839 rm -f $@ 840 $(AR) $(ARFLAGS) $@ $(LIBOBJS) 841 $(RANLIB) $@ 842 843date: $(DATEOBJS) 844 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) 845 846tzselect: tzselect.ksh version |
845 VERSION=`cat version` && sed \ | 847 read -r VERSION <version && sed \ |
846 -e "s'#!/bin/bash'#!"'$(KSHELL)'\' \ 847 -e s\''\(AWK\)=[^}]*'\''\1=\'\''$(AWK)\'\'\' \ 848 -e s\''\(PKGVERSION\)=.*'\''\1=\'\''($(PACKAGE)) \'\'\' \ 849 -e s\''\(REPORT_BUGS_TO\)=.*'\''\1=\'\''$(BUGEMAIL)\'\'\' \ 850 -e s\''\(TZDIR\)=[^}]*'\''\1=\'\''$(TZDIR)\'\'\' \ 851 -e s\''\(TZVERSION\)=.*'\''\1=\'"'$$VERSION\\''" \ 852 <$@.ksh >$@.out 853 chmod +x $@.out 854 mv $@.out $@ 855 | 848 -e "s'#!/bin/bash'#!"'$(KSHELL)'\' \ 849 -e s\''\(AWK\)=[^}]*'\''\1=\'\''$(AWK)\'\'\' \ 850 -e s\''\(PKGVERSION\)=.*'\''\1=\'\''($(PACKAGE)) \'\'\' \ 851 -e s\''\(REPORT_BUGS_TO\)=.*'\''\1=\'\''$(BUGEMAIL)\'\'\' \ 852 -e s\''\(TZDIR\)=[^}]*'\''\1=\'\''$(TZDIR)\'\'\' \ 853 -e s\''\(TZVERSION\)=.*'\''\1=\'"'$$VERSION\\''" \ 854 <$@.ksh >$@.out 855 chmod +x $@.out 856 mv $@.out $@ 857 |
856check: check_back check_mild 857check_mild: check_character_set check_white_space check_links \ 858 check_name_lengths check_now \ 859 check_slashed_abbrs check_sorted \ 860 check_tables check_web check_ziguard check_zishrink check_tzs | 858check: check_mild back.ck 859check_mild: check_web check_zishrink \ 860 character-set.ck white-space.ck links.ck mainguard.ck \ 861 name-lengths.ck now.ck slashed-abbrs.ck sorted.ck \ 862 tables.ck ziguard.ck tzs.ck |
861 862# True if UTF8_LOCALE does not work; 863# otherwise, false but with LC_ALL set to $(UTF8_LOCALE). 864UTF8_LOCALE_MISSING = \ 865 { test ! '$(UTF8_LOCALE)' \ 866 || ! printf 'A\304\200B\n' \ 867 | LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 \ | 863 864# True if UTF8_LOCALE does not work; 865# otherwise, false but with LC_ALL set to $(UTF8_LOCALE). 866UTF8_LOCALE_MISSING = \ 867 { test ! '$(UTF8_LOCALE)' \ 868 || ! printf 'A\304\200B\n' \ 869 | LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 \ |
868 || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; } | 870 || { export LC_ALL='$(UTF8_LOCALE)'; false; }; } |
869 | 871 |
870check_character_set: $(ENCHILADA) | 872character-set.ck: $(ENCHILADA) |
871 $(UTF8_LOCALE_MISSING) || { \ 872 sharp='#' && \ 873 ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ 874 $(MISC) $(SOURCES) $(WEB_PAGES) \ 875 CONTRIBUTING LICENSE README SECURITY \ 876 version tzdata.zi && \ 877 ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ 878 Makefile && \ 879 ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \ 880 leapseconds zone.tab && \ 881 ! grep -Env $(OK_LINE) $(ENCHILADA); \ 882 } 883 touch $@ 884 | 873 $(UTF8_LOCALE_MISSING) || { \ 874 sharp='#' && \ 875 ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ 876 $(MISC) $(SOURCES) $(WEB_PAGES) \ 877 CONTRIBUTING LICENSE README SECURITY \ 878 version tzdata.zi && \ 879 ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ 880 Makefile && \ 881 ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \ 882 leapseconds zone.tab && \ 883 ! grep -Env $(OK_LINE) $(ENCHILADA); \ 884 } 885 touch $@ 886 |
885check_white_space: $(ENCHILADA) | 887white-space.ck: $(ENCHILADA) |
886 $(UTF8_LOCALE_MISSING) || { \ | 888 $(UTF8_LOCALE_MISSING) || { \ |
887 patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ | 889 enchilada='$(ENCHILADA)' && \ 890 patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \ |
888 ! grep -En "$$pat|[$s]\$$" \ | 891 ! grep -En "$$pat|[$s]\$$" \ |
889 $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \ | 892 $${enchilada%leap-seconds.list*} \ 893 $${enchilada#*leap-seconds.list}; \ |
890 } 891 touch $@ 892 893PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+ 894FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15} 895 | 894 } 895 touch $@ 896 897PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+ 898FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15} 899 |
896check_name_lengths: $(TDATA_TO_CHECK) backzone 897 ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ | 900name-lengths.ck: $(TDATA_TO_CHECK) backzone 901 :;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ |
898 $(TDATA_TO_CHECK) backzone 899 touch $@ 900 | 902 $(TDATA_TO_CHECK) backzone 903 touch $@ 904 |
905mainguard.ck: main.zi 906 test '$(PACKRATLIST)' || \ 907 cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi 908 touch $@ 909 |
|
901PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+ 902STDOFF = [-+]?[0-9:.]+ 903RULELESS_SAVE = (-|$(STDOFF)[sd]?) 904RULELESS_SLASHED_ABBRS = \ 905 $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/ 906 | 910PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+ 911STDOFF = [-+]?[0-9:.]+ 912RULELESS_SAVE = (-|$(STDOFF)[sd]?) 913RULELESS_SLASHED_ABBRS = \ 914 $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/ 915 |
907check_slashed_abbrs: $(TDATA_TO_CHECK) 908 ! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) | 916slashed-abbrs.ck: $(TDATA_TO_CHECK) 917 :;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK) |
909 touch $@ 910 911CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } 912 | 918 touch $@ 919 920CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } 921 |
913check_sorted: backward backzone | 922sorted.ck: backward backzone |
914 $(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \ 915 backward | LC_ALL=C sort -cu | 923 $(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \ 924 backward | LC_ALL=C sort -cu |
916 $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu | 925 $(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu |
917 touch $@ 918 | 926 touch $@ 927 |
919check_back: checklinks.awk $(TDATA_TO_CHECK) | 928back.ck: checklinks.awk $(TDATA_TO_CHECK) |
920 $(AWK) \ 921 -v DATAFORM=$(DATAFORM) \ 922 -v backcheck=backward \ 923 -f checklinks.awk $(TDATA_TO_CHECK) 924 touch $@ 925 | 929 $(AWK) \ 930 -v DATAFORM=$(DATAFORM) \ 931 -v backcheck=backward \ 932 -f checklinks.awk $(TDATA_TO_CHECK) 933 touch $@ 934 |
926check_links: checklinks.awk tzdata.zi | 935links.ck: checklinks.awk tzdata.zi |
927 $(AWK) \ 928 -v DATAFORM=$(DATAFORM) \ 929 -f checklinks.awk tzdata.zi 930 touch $@ 931 932# Check timestamps from now through 28 years from now, to make sure 933# that zonenow.tab contains all sequences of planned timestamps, 934# without any duplicate sequences. In theory this might require | 936 $(AWK) \ 937 -v DATAFORM=$(DATAFORM) \ 938 -f checklinks.awk tzdata.zi 939 touch $@ 940 941# Check timestamps from now through 28 years from now, to make sure 942# that zonenow.tab contains all sequences of planned timestamps, 943# without any duplicate sequences. In theory this might require |
935# 2800 years but that would take a long time to check. 936CHECK_NOW_TIMESTAMP = `./date +%s` | 944# 2800+ years but that would take a long time to check. 945CHECK_NOW_TIMESTAMP = $$(./date +%s) |
937CHECK_NOW_FUTURE_YEARS = 28 | 946CHECK_NOW_FUTURE_YEARS = 28 |
938CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60 939check_now: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab 940 rm -fr $@.dir 941 mkdir $@.dir 942 ./zic -d $@.dir tzdata.zi | 947CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60 948now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab 949 rm -fr $@d 950 mkdir $@d 951 ./zic -d $@d tzdata.zi |
943 now=$(CHECK_NOW_TIMESTAMP) && \ | 952 now=$(CHECK_NOW_TIMESTAMP) && \ |
944 future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \ | 953 future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \ |
945 ./zdump -i -t $$now,$$future \ | 954 ./zdump -i -t $$now,$$future \ |
946 $$(find $$PWD/$@.dir/????*/ -type f) \ 947 >$@.dir/zdump.tab | 955 $$(find "$$PWD/$@d"/????*/ -type f) \ 956 >$@d/zdump-now.tab && \ 957 ./zdump -i -t 0,$$future \ 958 $$(find "$$PWD/$@d" -name Etc -prune \ 959 -o -type f ! -name '*.tab' -print) \ 960 >$@d/zdump-1970.tab |
948 $(AWK) \ | 961 $(AWK) \ |
949 -v zdump_table=$@.dir/zdump.tab \ | 962 -v zdump_table=$@d/zdump-now.tab \ |
950 -f checknow.awk zonenow.tab | 963 -f checknow.awk zonenow.tab |
951 rm -fr $@.dir | 964 $(AWK) \ 965 'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \ 966 $(PRIMARY_YDATA) backward factory | \ 967 $(AWK) \ 968 -v zdump_table=$@d/zdump-1970.tab \ 969 -f checknow.awk 970 rm -fr $@d |
952 touch $@ 953 | 971 touch $@ 972 |
954check_tables: checktab.awk $(YDATA) backward zone.tab zone1970.tab | 973tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab |
955 for tab in $(ZONETABLES); do \ 956 test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \ 957 $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \ 958 || exit; \ 959 done 960 touch $@ 961 | 974 for tab in $(ZONETABLES); do \ 975 test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \ 976 $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \ 977 || exit; \ 978 done 979 touch $@ 980 |
962check_tzs: $(TZS) $(TZS_NEW) | 981tzs.ck: $(TZS) $(TZS_NEW) |
963 if test -s $(TZS); then \ | 982 if test -s $(TZS); then \ |
964 $(DIFF_TZS) $(TZS) $(TZS_NEW); \ | 983 $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \ |
965 else \ 966 cp $(TZS_NEW) $(TZS); \ 967 fi 968 touch $@ 969 970check_web: $(CHECK_WEB_PAGES) | 984 else \ 985 cp $(TZS_NEW) $(TZS); \ 986 fi 987 touch $@ 988 989check_web: $(CHECK_WEB_PAGES) |
971check_theory.html: theory.html 972check_tz-art.html: tz-art.html 973check_tz-how-to.html: tz-how-to.html 974check_tz-link.html: tz-link.html 975check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html: 976 $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ 977 -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ | 990.SUFFIXES: .ck .html 991.html.ck: 992 { ! ($(CURL) --version) >/dev/null 2>&1 || \ 993 $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ 994 -F file=@$<; } >$@.out && \ |
978 test ! -s $@.out || { cat $@.out; exit 1; } 979 mv $@.out $@ 980 | 995 test ! -s $@.out || { cat $@.out; exit 1; } 996 mv $@.out $@ 997 |
981check_ziguard: rearguard.zi vanguard.zi ziguard.awk | 998ziguard.ck: rearguard.zi vanguard.zi ziguard.awk |
982 $(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \ 983 diff -u rearguard.zi - 984 $(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \ 985 diff -u vanguard.zi - 986 touch $@ 987 988# Check that zishrink.awk does not alter the data, and that ziguard.awk 989# preserves main-format data. | 999 $(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \ 1000 diff -u rearguard.zi - 1001 $(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \ 1002 diff -u vanguard.zi - 1003 touch $@ 1004 1005# Check that zishrink.awk does not alter the data, and that ziguard.awk 1006# preserves main-format data. |
990check_zishrink: check_zishrink_posix check_zishrink_right 991check_zishrink_posix check_zishrink_right: \ | 1007check_zishrink: zishrink-posix.ck zishrink-right.ck 1008zishrink-posix.ck zishrink-right.ck: \ |
992 zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \ 993 $(TDATA) $(DATAFORM).zi tzdata.zi | 1009 zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \ 1010 $(TDATA) $(DATAFORM).zi tzdata.zi |
994 rm -fr $@.dir $@-t.dir $@-shrunk.dir 995 mkdir $@.dir $@-t.dir $@-shrunk.dir | 1011 rm -fr $@d t-$@d shrunk-$@d 1012 mkdir $@d t-$@d shrunk-$@d |
996 case $@ in \ | 1013 case $@ in \ |
997 *_right) leap='-L leapseconds';; \ | 1014 *right*) leap='-L leapseconds';; \ |
998 *) leap=;; \ 999 esac && \ | 1015 *) leap=;; \ 1016 esac && \ |
1000 $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ 1001 $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ | 1017 $(ZIC) $$leap -d $@d $(DATAFORM).zi && \ 1018 $(ZIC) $$leap -d shrunk-$@d tzdata.zi && \ |
1002 case $(DATAFORM),$(PACKRATLIST) in \ 1003 main,) \ | 1019 case $(DATAFORM),$(PACKRATLIST) in \ 1020 main,) \ |
1004 $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ | 1021 $(ZIC) $$leap -d t-$@d $(TDATA) && \ |
1005 $(AWK) '/^Rule/' $(TDATA) | \ | 1022 $(AWK) '/^Rule/' $(TDATA) | \ |
1006 $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ 1007 diff -r $@.dir $@-t.dir;; \ | 1023 $(ZIC) $$leap -d t-$@d - $(PACKRATDATA) && \ 1024 diff -r $@d t-$@d;; \ |
1008 esac | 1025 esac |
1009 diff -r $@.dir $@-shrunk.dir 1010 rm -fr $@.dir $@-t.dir $@-shrunk.dir | 1026 diff -r $@d shrunk-$@d 1027 rm -fr $@d t-$@d shrunk-$@d |
1011 touch $@ 1012 1013clean_misc: | 1028 touch $@ 1029 1030clean_misc: |
1014 rm -fr check_*.dir typecheck_*.dir 1015 rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ 1016 check_* core typecheck_* \ | 1031 rm -fr *.ckd *.dir 1032 rm -f *.ck *.core *.o *.out core core.* \ |
1017 date tzdir.h tzselect version.h zdump zic libtz.a 1018clean: clean_misc | 1033 date tzdir.h tzselect version.h zdump zic libtz.a 1034clean: clean_misc |
1019 rm -fr *.dir tzdb-*/ | 1035 rm -fr tzdb-*/ |
1020 rm -f *.zi $(TZS_NEW) 1021 1022maintainer-clean: clean 1023 @echo 'This command is intended for maintainers to use; it' 1024 @echo 'deletes files that may need special tools to rebuild.' 1025 rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.* 1026 1027names: 1028 @echo $(ENCHILADA) 1029 | 1036 rm -f *.zi $(TZS_NEW) 1037 1038maintainer-clean: clean 1039 @echo 'This command is intended for maintainers to use; it' 1040 @echo 'deletes files that may need special tools to rebuild.' 1041 rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.* 1042 1043names: 1044 @echo $(ENCHILADA) 1045 |
1030public: check check_public $(CHECK_TIME_T_ALTERNATIVES) \ | 1046public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \ |
1031 tarballs signatures 1032 1033date.1.txt: date.1 1034newctime.3.txt: newctime.3 1035newstrftime.3.txt: newstrftime.3 1036newtzset.3.txt: newtzset.3 1037time2posix.3.txt: time2posix.3 1038tzfile.5.txt: tzfile.5 1039tzselect.8.txt: tzselect.8 1040zdump.8.txt: zdump.8 1041zic.8.txt: zic.8 1042 1043$(MANTXTS): workman.sh | 1047 tarballs signatures 1048 1049date.1.txt: date.1 1050newctime.3.txt: newctime.3 1051newstrftime.3.txt: newstrftime.3 1052newtzset.3.txt: newtzset.3 1053time2posix.3.txt: time2posix.3 1054tzfile.5.txt: tzfile.5 1055tzselect.8.txt: tzselect.8 1056zdump.8.txt: zdump.8 1057zic.8.txt: zic.8 1058 1059$(MANTXTS): workman.sh |
1044 LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out | 1060 LC_ALL=C sh workman.sh $(@:.txt=) >$@.out |
1045 mv $@.out $@ 1046 1047# Set file timestamps deterministically if possible, 1048# so that tarballs containing the timestamps are reproducible. 1049# 1050# '$(SET_TIMESTAMP_N) N DEST A B C ...' sets the timestamp of the 1051# file DEST to the maximum of the timestamps of the files A B C ..., 1052# plus N if GNU ls and touch are available. 1053SET_TIMESTAMP_N = sh -c '\ 1054 n=$$0 dest=$$1; shift; \ 1055 <"$$dest" && \ 1056 if test $$n != 0 && \ | 1061 mv $@.out $@ 1062 1063# Set file timestamps deterministically if possible, 1064# so that tarballs containing the timestamps are reproducible. 1065# 1066# '$(SET_TIMESTAMP_N) N DEST A B C ...' sets the timestamp of the 1067# file DEST to the maximum of the timestamps of the files A B C ..., 1068# plus N if GNU ls and touch are available. 1069SET_TIMESTAMP_N = sh -c '\ 1070 n=$$0 dest=$$1; shift; \ 1071 <"$$dest" && \ 1072 if test $$n != 0 && \ |
1057 lsout=`ls -nt --time-style="+%s" "$$@" 2>/dev/null`; then \ | 1073 lsout=$$(ls -nt --time-style="+%s" "$$@" 2>/dev/null); then \ |
1058 set x $$lsout && \ | 1074 set x $$lsout && \ |
1059 timestamp=`expr $$7 + $$n` && \ | 1075 timestamp=$$(($$7 + $$n)) && \ |
1060 echo "+ touch -md @$$timestamp $$dest" && \ 1061 touch -md @$$timestamp "$$dest"; \ 1062 else \ | 1076 echo "+ touch -md @$$timestamp $$dest" && \ 1077 touch -md @$$timestamp "$$dest"; \ 1078 else \ |
1063 newest=`ls -t "$$@" | sed 1q` && \ | 1079 newest=$$(ls -t "$$@" | sed 1q) && \ |
1064 echo "+ touch -mr $$newest $$dest" && \ 1065 touch -mr "$$newest" "$$dest"; \ 1066 fi' 1067# If DEST depends on A B C ... in this Makefile, callers should use 1068# $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any 1069# downstream 'make' that considers equal timestamps to be out of date. 1070# POSIX allows this 'make' behavior, and HP-UX 'make' does it. 1071# If all that matters is that the timestamp be reproducible --- 6 unchanged lines hidden (view full) --- 1078# This uses GNU 'ls --time-style=+%s', which outputs the seconds count, 1079# and GNU 'touch -d@N FILE', where N is the number of seconds since 1970. 1080# If git or GNU is absent, don't bother to sync with git timestamps. 1081# Also, set the timestamp of each prebuilt file like 'leapseconds' 1082# to be the maximum of the files it depends on. 1083set-timestamps.out: $(EIGHT_YARDS) 1084 rm -f $@ 1085 if (type git) >/dev/null 2>&1 && \ | 1080 echo "+ touch -mr $$newest $$dest" && \ 1081 touch -mr "$$newest" "$$dest"; \ 1082 fi' 1083# If DEST depends on A B C ... in this Makefile, callers should use 1084# $(SET_TIMESTAMP_DEP) DEST A B C ..., for the benefit of any 1085# downstream 'make' that considers equal timestamps to be out of date. 1086# POSIX allows this 'make' behavior, and HP-UX 'make' does it. 1087# If all that matters is that the timestamp be reproducible --- 6 unchanged lines hidden (view full) --- 1094# This uses GNU 'ls --time-style=+%s', which outputs the seconds count, 1095# and GNU 'touch -d@N FILE', where N is the number of seconds since 1970. 1096# If git or GNU is absent, don't bother to sync with git timestamps. 1097# Also, set the timestamp of each prebuilt file like 'leapseconds' 1098# to be the maximum of the files it depends on. 1099set-timestamps.out: $(EIGHT_YARDS) 1100 rm -f $@ 1101 if (type git) >/dev/null 2>&1 && \ |
1086 files=`git ls-files $(EIGHT_YARDS)` && \ | 1102 files=$$(git ls-files $(EIGHT_YARDS)) && \ |
1087 touch -md @1 test.out; then \ 1088 rm -f test.out && \ 1089 for file in $$files; do \ 1090 if git diff --quiet $$file; then \ | 1103 touch -md @1 test.out; then \ 1104 rm -f test.out && \ 1105 for file in $$files; do \ 1106 if git diff --quiet $$file; then \ |
1091 time=`TZ=UTC0 git log -1 \ | 1107 time=$$(TZ=UTC0 git log -1 \ |
1092 --format='tformat:%cd' \ 1093 --date='format:%Y-%m-%dT%H:%M:%SZ' \ | 1108 --format='tformat:%cd' \ 1109 --date='format:%Y-%m-%dT%H:%M:%SZ' \ |
1094 $$file` && \ | 1110 $$file) && \ |
1095 echo "+ touch -md $$time $$file" && \ 1096 touch -md $$time $$file; \ 1097 else \ 1098 echo >&2 "$$file: warning: does not match repository"; \ 1099 fi || exit; \ 1100 done; \ 1101 fi 1102 $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS) | 1111 echo "+ touch -md $$time $$file" && \ 1112 touch -md $$time $$file; \ 1113 else \ 1114 echo >&2 "$$file: warning: does not match repository"; \ 1115 fi || exit; \ 1116 done; \ 1117 fi 1118 $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS) |
1103 for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \ 1104 $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \ | 1119 for file in $(MANTXTS); do \ 1120 $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \ |
1105 exit; \ 1106 done 1107 $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS) 1108 $(SET_TIMESTAMP_DEP) tzdata.zi $(TZDATA_ZI_DEPS) 1109 touch $@ 1110set-tzs-timestamp.out: $(TZS) 1111 $(SET_TIMESTAMP_DEP) $(TZS) $(TZS_DEPS) 1112 touch $@ 1113 1114# The zics below ensure that each data file can stand on its own. 1115# We also do an all-files run to catch links to links. 1116 | 1121 exit; \ 1122 done 1123 $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS) 1124 $(SET_TIMESTAMP_DEP) tzdata.zi $(TZDATA_ZI_DEPS) 1125 touch $@ 1126set-tzs-timestamp.out: $(TZS) 1127 $(SET_TIMESTAMP_DEP) $(TZS) $(TZS_DEPS) 1128 touch $@ 1129 1130# The zics below ensure that each data file can stand on its own. 1131# We also do an all-files run to catch links to links. 1132 |
1117check_public: $(VERSION_DEPS) 1118 rm -fr public.dir 1119 mkdir public.dir 1120 ln $(VERSION_DEPS) public.dir 1121 cd public.dir \ | 1133public.ck: $(VERSION_DEPS) 1134 rm -fr $@d 1135 mkdir $@d 1136 ln $(VERSION_DEPS) $@d 1137 cd $@d \ |
1122 && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL | 1138 && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL |
1123 for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ 1124 public.dir/vanguard.zi public.dir/main.zi \ 1125 public.dir/rearguard.zi; \ | 1139 for i in $(TDATA_TO_CHECK) \ 1140 tzdata.zi vanguard.zi main.zi rearguard.zi; \ |
1126 do \ | 1141 do \ |
1127 public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ | 1142 $@d/zic -v -d $@d/zoneinfo $@d/$$i || exit; \ |
1128 done | 1143 done |
1129 public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) | 1144 $@d/zic -v -d $@d/zoneinfo-all $(TDATA_TO_CHECK) |
1130 : 1131 : Also check 'backzone' syntax. | 1145 : 1146 : Also check 'backzone' syntax. |
1132 rm public.dir/main.zi 1133 cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi 1134 public.dir/zic -d public.dir/zoneinfo main.zi 1135 rm public.dir/main.zi 1136 cd public.dir && \ | 1147 rm $@d/main.zi 1148 cd $@d && $(MAKE) PACKRATDATA=backzone main.zi 1149 $@d/zic -d $@d/zoneinfo main.zi 1150 rm $@d/main.zi 1151 cd $@d && \ |
1137 $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi | 1152 $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi |
1138 public.dir/zic -d public.dir/zoneinfo main.zi | 1153 $@d/zic -d $@d/zoneinfo main.zi |
1139 : | 1154 : |
1140 rm -fr public.dir | 1155 rm -fr $@d |
1141 touch $@ 1142 1143# Check that the code works under various alternative 1144# implementations of time_t. 1145check_time_t_alternatives: $(TIME_T_ALTERNATIVES) 1146$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) 1147$(TIME_T_ALTERNATIVES): $(VERSION_DEPS) | 1156 touch $@ 1157 1158# Check that the code works under various alternative 1159# implementations of time_t. 1160check_time_t_alternatives: $(TIME_T_ALTERNATIVES) 1161$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) 1162$(TIME_T_ALTERNATIVES): $(VERSION_DEPS) |
1148 rm -fr $@.dir 1149 mkdir $@.dir 1150 ln $(VERSION_DEPS) $@.dir | 1163 rm -fr $@d 1164 mkdir $@d 1165 ln $(VERSION_DEPS) $@d |
1151 case $@ in \ | 1166 case $@ in \ |
1152 int*32_t) range=-2147483648,2147483648;; \ | 1167 *32_t*) range=-2147483648,2147483648;; \ |
1153 u*) range=0,4294967296;; \ 1154 *) range=-4294967296,4294967296;; \ 1155 esac && \ | 1168 u*) range=0,4294967296;; \ 1169 *) range=-4294967296,4294967296;; \ 1170 esac && \ |
1156 wd=`pwd` && \ 1157 zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \ | 1171 wd=$$PWD && \ 1172 zones=$$($(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab) && \ |
1158 if test $@ = $(TIME_T_ALTERNATIVES_HEAD); then \ 1159 range_target=; \ 1160 else \ 1161 range_target=to$$range.tzs; \ 1162 fi && \ | 1173 if test $@ = $(TIME_T_ALTERNATIVES_HEAD); then \ 1174 range_target=; \ 1175 else \ 1176 range_target=to$$range.tzs; \ 1177 fi && \ |
1163 (cd $@.dir && \ 1164 $(MAKE) TOPDIR="$$wd/$@.dir" \ 1165 CFLAGS='$(CFLAGS) -Dtime_tz='"'$@'" \ | 1178 (cd $@d && \ 1179 $(MAKE) TOPDIR="$$wd/$@d" \ 1180 CFLAGS='$(CFLAGS) -Dtime_tz='"'$(@:.ck=)'" \ |
1166 REDO='$(REDO)' \ | 1181 REDO='$(REDO)' \ |
1167 D=$$wd/$@.dir \ | 1182 D="$$wd/$@d" \ |
1168 TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ 1169 install $$range_target) && \ 1170 test $@ = $(TIME_T_ALTERNATIVES_HEAD) || { \ | 1183 TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ 1184 install $$range_target) && \ 1185 test $@ = $(TIME_T_ALTERNATIVES_HEAD) || { \ |
1171 (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \ 1172 $(MAKE) TOPDIR="$$wd/$@.dir" \ | 1186 (cd $(TIME_T_ALTERNATIVES_HEAD)d && \ 1187 $(MAKE) TOPDIR="$$wd/$@d" \ |
1173 TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ | 1188 TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ |
1174 D=$$wd/$@.dir \ | 1189 D="$$wd/$@d" \ |
1175 to$$range.tzs) && \ | 1190 to$$range.tzs) && \ |
1176 $(DIFF_TZS) $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \ 1177 $@.dir/to$$range.tzs && \ | 1191 $(SETUP_DIFF_TZS) && \ 1192 $$DIFF_TZS $(TIME_T_ALTERNATIVES_HEAD)d/to$$range.tzs \ 1193 $@d/to$$range.tzs && \ |
1178 if diff -q Makefile Makefile 2>/dev/null; then \ 1179 quiet_option='-q'; \ 1180 else \ 1181 quiet_option=''; \ 1182 fi && \ | 1194 if diff -q Makefile Makefile 2>/dev/null; then \ 1195 quiet_option='-q'; \ 1196 else \ 1197 quiet_option=''; \ 1198 fi && \ |
1183 diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \ 1184 $@.dir/etc && \ | 1199 diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \ 1200 $@d/etc && \ |
1185 diff $$quiet_option -r \ | 1201 diff $$quiet_option -r \ |
1186 $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \ 1187 $@.dir/usr/share; \ | 1202 $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \ 1203 $@d/usr/share; \ |
1188 } 1189 touch $@ 1190 1191TRADITIONAL_ASC = \ 1192 tzcode$(VERSION).tar.gz.asc \ 1193 tzdata$(VERSION).tar.gz.asc 1194REARGUARD_ASC = \ 1195 tzdata$(VERSION)-rearguard.tar.gz.asc 1196ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ 1197 tzdb-$(VERSION).tar.lz.asc 1198 1199tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \ 1200signatures rearguard_signatures traditional_signatures: \ 1201 version set-timestamps.out rearguard.zi vanguard.zi | 1204 } 1205 touch $@ 1206 1207TRADITIONAL_ASC = \ 1208 tzcode$(VERSION).tar.gz.asc \ 1209 tzdata$(VERSION).tar.gz.asc 1210REARGUARD_ASC = \ 1211 tzdata$(VERSION)-rearguard.tar.gz.asc 1212ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ 1213 tzdb-$(VERSION).tar.lz.asc 1214 1215tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \ 1216signatures rearguard_signatures traditional_signatures: \ 1217 version set-timestamps.out rearguard.zi vanguard.zi |
1202 VERSION=`cat version` && \ | 1218 read -r VERSION <version && \ |
1203 $(MAKE) AWK='$(AWK)' VERSION="$$VERSION" $@_version 1204 1205# These *_version rules are intended for use if VERSION is set by some 1206# other means. Ordinarily these rules are used only by the above 1207# non-_version rules, which set VERSION on the 'make' command line. 1208tarballs_version: traditional_tarballs_version rearguard_tarballs_version \ 1209 tzdb-$(VERSION).tar.lz 1210rearguard_tarballs_version: \ 1211 tzdata$(VERSION)-rearguard.tar.gz 1212traditional_tarballs_version: \ 1213 tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz 1214tailored_tarballs_version: \ 1215 tzdata$(VERSION)-tailored.tar.gz 1216signatures_version: $(ALL_ASC) 1217rearguard_signatures_version: $(REARGUARD_ASC) 1218traditional_signatures_version: $(TRADITIONAL_ASC) 1219 1220tzcode$(VERSION).tar.gz: set-timestamps.out | 1219 $(MAKE) AWK='$(AWK)' VERSION="$$VERSION" $@_version 1220 1221# These *_version rules are intended for use if VERSION is set by some 1222# other means. Ordinarily these rules are used only by the above 1223# non-_version rules, which set VERSION on the 'make' command line. 1224tarballs_version: traditional_tarballs_version rearguard_tarballs_version \ 1225 tzdb-$(VERSION).tar.lz 1226rearguard_tarballs_version: \ 1227 tzdata$(VERSION)-rearguard.tar.gz 1228traditional_tarballs_version: \ 1229 tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz 1230tailored_tarballs_version: \ 1231 tzdata$(VERSION)-tailored.tar.gz 1232signatures_version: $(ALL_ASC) 1233rearguard_signatures_version: $(REARGUARD_ASC) 1234traditional_signatures_version: $(TRADITIONAL_ASC) 1235 1236tzcode$(VERSION).tar.gz: set-timestamps.out |
1221 LC_ALL=C && export LC_ALL && \ 1222 tar $(TARFLAGS) -cf - \ | 1237 $(SETUP_TAR) && \ 1238 $$TAR -cf - \ |
1223 $(COMMON) $(DOCS) $(SOURCES) | \ 1224 gzip $(GZIPFLAGS) >$@.out 1225 mv $@.out $@ 1226 1227tzdata$(VERSION).tar.gz: set-timestamps.out | 1239 $(COMMON) $(DOCS) $(SOURCES) | \ 1240 gzip $(GZIPFLAGS) >$@.out 1241 mv $@.out $@ 1242 1243tzdata$(VERSION).tar.gz: set-timestamps.out |
1228 LC_ALL=C && export LC_ALL && \ 1229 tar $(TARFLAGS) -cf - $(TZDATA_DIST) | \ | 1244 $(SETUP_TAR) && \ 1245 $$TAR -cf - $(TZDATA_DIST) | \ |
1230 gzip $(GZIPFLAGS) >$@.out 1231 mv $@.out $@ 1232 1233# Create empty files with a reproducible timestamp. 1234CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00 1235 1236# The obsolescent *rearguard* targets and related macros are present 1237# for backwards compatibility with tz releases 2018e through 2022a. --- 8 unchanged lines hidden (view full) --- 1246 rearf=$@.dir/$$f; \ 1247 $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \ 1248 $(SET_TIMESTAMP_DEP) $$rearf ziguard.awk $$f || exit; \ 1249 done 1250 sed '1s/$$/-rearguard/' <version >$@.dir/version 1251 : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. 1252 $(CREATE_EMPTY) $@.dir/pacificnew 1253 touch -mr version $@.dir/version | 1246 gzip $(GZIPFLAGS) >$@.out 1247 mv $@.out $@ 1248 1249# Create empty files with a reproducible timestamp. 1250CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00 1251 1252# The obsolescent *rearguard* targets and related macros are present 1253# for backwards compatibility with tz releases 2018e through 2022a. --- 8 unchanged lines hidden (view full) --- 1262 rearf=$@.dir/$$f; \ 1263 $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \ 1264 $(SET_TIMESTAMP_DEP) $$rearf ziguard.awk $$f || exit; \ 1265 done 1266 sed '1s/$$/-rearguard/' <version >$@.dir/version 1267 : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. 1268 $(CREATE_EMPTY) $@.dir/pacificnew 1269 touch -mr version $@.dir/version |
1254 LC_ALL=C && export LC_ALL && \ | 1270 $(SETUP_TAR) && \ |
1255 (cd $@.dir && \ | 1271 (cd $@.dir && \ |
1256 tar $(TARFLAGS) -cf - \ | 1272 $$TAR -cf - \ |
1257 $(TZDATA_DIST) pacificnew | \ 1258 gzip $(GZIPFLAGS)) >$@.out 1259 mv $@.out $@ 1260 1261# Create a tailored tarball suitable for TZUpdater and compatible tools. 1262# For example, 'make DATAFORM=vanguard tailored_tarballs' makes a tarball 1263# useful for testing whether TZUpdater supports vanguard form. 1264# The generated tarball is not byte-for-byte equivalent to a hand-tailored 1265# traditional tarball, as data entries are put into 'etcetera' even if they 1266# came from some other source file. However, the effect should be the same 1267# for ordinary use, which reads all the source files. 1268tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out 1269 rm -fr $@.dir 1270 mkdir $@.dir 1271 : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. | 1273 $(TZDATA_DIST) pacificnew | \ 1274 gzip $(GZIPFLAGS)) >$@.out 1275 mv $@.out $@ 1276 1277# Create a tailored tarball suitable for TZUpdater and compatible tools. 1278# For example, 'make DATAFORM=vanguard tailored_tarballs' makes a tarball 1279# useful for testing whether TZUpdater supports vanguard form. 1280# The generated tarball is not byte-for-byte equivalent to a hand-tailored 1281# traditional tarball, as data entries are put into 'etcetera' even if they 1282# came from some other source file. However, the effect should be the same 1283# for ordinary use, which reads all the source files. 1284tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out 1285 rm -fr $@.dir 1286 mkdir $@.dir 1287 : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. |
1288 if test $(DATAFORM) = vanguard; then \ 1289 pacificnew=; \ 1290 else \ 1291 pacificnew=pacificnew; \ 1292 fi && \ |
|
1272 cd $@.dir && \ 1273 $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \ | 1293 cd $@.dir && \ 1294 $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \ |
1274 `test $(DATAFORM) = vanguard || echo pacificnew` | 1295 $$pacificnew |
1275 (grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \ 1276 >$@.dir/etcetera 1277 touch -mr tzdata.zi $@.dir/etcetera 1278 sed -n \ 1279 -e '/^# *version *\(.*\)/h' \ 1280 -e '/^# *ddeps */H' \ 1281 -e '$$!d' \ 1282 -e 'g' \ 1283 -e 's/^# *version *//' \ 1284 -e 's/\n# *ddeps */-/' \ 1285 -e 's/ /-/g' \ 1286 -e 'p' \ 1287 <tzdata.zi >$@.dir/version 1288 touch -mr version $@.dir/version 1289 links= && \ 1290 for file in $(TZDATA_DIST); do \ 1291 test -f $@.dir/$$file || links="$$links $$file"; \ 1292 done && \ 1293 ln $$links $@.dir | 1296 (grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \ 1297 >$@.dir/etcetera 1298 touch -mr tzdata.zi $@.dir/etcetera 1299 sed -n \ 1300 -e '/^# *version *\(.*\)/h' \ 1301 -e '/^# *ddeps */H' \ 1302 -e '$$!d' \ 1303 -e 'g' \ 1304 -e 's/^# *version *//' \ 1305 -e 's/\n# *ddeps */-/' \ 1306 -e 's/ /-/g' \ 1307 -e 'p' \ 1308 <tzdata.zi >$@.dir/version 1309 touch -mr version $@.dir/version 1310 links= && \ 1311 for file in $(TZDATA_DIST); do \ 1312 test -f $@.dir/$$file || links="$$links $$file"; \ 1313 done && \ 1314 ln $$links $@.dir |
1294 LC_ALL=C && export LC_ALL && \ | 1315 $(SETUP_TAR) && \ |
1295 (cd $@.dir && \ | 1316 (cd $@.dir && \ |
1296 tar $(TARFLAGS) -cf - * | gzip $(GZIPFLAGS)) >$@.out | 1317 $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@.out |
1297 mv $@.out $@ 1298 1299tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out 1300 rm -fr tzdb-$(VERSION) 1301 mkdir tzdb-$(VERSION) 1302 ln $(ENCHILADA) tzdb-$(VERSION) 1303 $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/* | 1318 mv $@.out $@ 1319 1320tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out 1321 rm -fr tzdb-$(VERSION) 1322 mkdir tzdb-$(VERSION) 1323 ln $(ENCHILADA) tzdb-$(VERSION) 1324 $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/* |
1304 LC_ALL=C && export LC_ALL && \ 1305 tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out | 1325 $(SETUP_TAR) && \ 1326 $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@.out |
1306 mv $@.out $@ 1307 1308tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz 1309tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz 1310tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz 1311tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz 1312$(ALL_ASC): 1313 $(GPG) --armor --detach-sign $? 1314 1315TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T | 1327 mv $@.out $@ 1328 1329tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz 1330tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz 1331tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz 1332tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz 1333$(ALL_ASC): 1334 $(GPG) --armor --detach-sign $? 1335 1336TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T |
1316typecheck: typecheck_long_long typecheck_unsigned 1317typecheck_long_long typecheck_unsigned: $(VERSION_DEPS) 1318 rm -fr $@.dir 1319 mkdir $@.dir 1320 ln $(VERSION_DEPS) $@.dir 1321 cd $@.dir && \ | 1337typecheck: long-long.ck unsigned.ck 1338long-long.ck unsigned.ck: $(VERSION_DEPS) 1339 rm -fr $@d 1340 mkdir $@d 1341 ln $(VERSION_DEPS) $@d 1342 cd $@d && \ |
1322 case $@ in \ | 1343 case $@ in \ |
1323 *_long_long) i="long long";; \ 1324 *_unsigned ) i="unsigned" ;; \ | 1344 long-long.*) i="long long";; \ 1345 unsigned.* ) i="unsigned" ;; \ |
1325 esac && \ | 1346 esac && \ |
1326 typecheck_cflags='' && \ | |
1327 $(MAKE) \ 1328 CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ | 1347 $(MAKE) \ 1348 CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ |
1329 TOPDIR="`pwd`" \ | 1349 TOPDIR="$$PWD" \ |
1330 install | 1350 install |
1331 $@.dir/zdump -i -c 1970,1971 Europe/Rome | 1351 $@d/zdump -i -c 1970,1971 Europe/Rome |
1332 touch $@ 1333 1334zonenames: tzdata.zi 1335 @$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi 1336 1337asctime.o: private.h tzfile.h 1338date.o: private.h 1339difftime.o: private.h 1340localtime.o: private.h tzfile.h tzdir.h 1341strftime.o: private.h tzfile.h 1342zdump.o: version.h 1343zic.o: private.h tzfile.h tzdir.h version.h 1344 1345.PHONY: ALL INSTALL all 1346.PHONY: check check_mild check_time_t_alternatives 1347.PHONY: check_web check_zishrink 1348.PHONY: clean clean_misc commit-leap-seconds.list dummy.zd 1349.PHONY: fetch-leap-seconds.list force_tzs | 1352 touch $@ 1353 1354zonenames: tzdata.zi 1355 @$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi 1356 1357asctime.o: private.h tzfile.h 1358date.o: private.h 1359difftime.o: private.h 1360localtime.o: private.h tzfile.h tzdir.h 1361strftime.o: private.h tzfile.h 1362zdump.o: version.h 1363zic.o: private.h tzfile.h tzdir.h version.h 1364 1365.PHONY: ALL INSTALL all 1366.PHONY: check check_mild check_time_t_alternatives 1367.PHONY: check_web check_zishrink 1368.PHONY: clean clean_misc commit-leap-seconds.list dummy.zd 1369.PHONY: fetch-leap-seconds.list force_tzs |
1350.PHONY: install install_data maintainer-clean names | 1370.PHONY: install maintainer-clean names |
1351.PHONY: posix_only posix_right public 1352.PHONY: rearguard_signatures rearguard_signatures_version 1353.PHONY: rearguard_tarballs rearguard_tarballs_version 1354.PHONY: right_only right_posix signatures signatures_version 1355.PHONY: tarballs tarballs_version 1356.PHONY: traditional_signatures traditional_signatures_version 1357.PHONY: traditional_tarballs traditional_tarballs_version 1358.PHONY: tailored_tarballs tailored_tarballs_version 1359.PHONY: typecheck 1360.PHONY: zonenames zones 1361.PHONY: $(ZDS) | 1371.PHONY: posix_only posix_right public 1372.PHONY: rearguard_signatures rearguard_signatures_version 1373.PHONY: rearguard_tarballs rearguard_tarballs_version 1374.PHONY: right_only right_posix signatures signatures_version 1375.PHONY: tarballs tarballs_version 1376.PHONY: traditional_signatures traditional_signatures_version 1377.PHONY: traditional_tarballs traditional_tarballs_version 1378.PHONY: tailored_tarballs tailored_tarballs_version 1379.PHONY: typecheck 1380.PHONY: zonenames zones 1381.PHONY: $(ZDS) |