137
136
-Wbad-function-cast -Wcast-align -Wcast-qual \
138
137
-Wformat=2 -Winit-self \
139
138
-Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes \
139
-Wnested-externs -Wno-address -Wno-cast-qual \
141
140
-Wno-format-nonliteral -Wno-sign-compare -Wno-sign-conversion \
142
141
-Wno-type-limits \
143
142
-Wno-unused-parameter -Woverlength-strings -Wpointer-arith \
197
196
# These functions may well disappear in future releases of the time
198
197
# conversion package.
200
# If you'll never want to handle solar-time-based time zones, add
202
# to the end of the "CFLAGS=" line
203
# (and comment out the "SDATA=" line below).
204
# This reduces (slightly) the run-time data-space requirements of
205
# the time conversion functions; it may reduce the acceptability of your system
206
# to folks in oil- and cash-rich places.
208
199
# If you want to allocate state structures in localtime, add
210
201
# to the end of the "CFLAGS=" line. Storage is obtained by calling malloc.
247
238
# The name of a Posix-compliant `awk' on your system.
250
# The full path name of a Posix-compliant shell that supports the Korn shell's
251
# 'select' statement, as an extension. These days, Bash is the most popular.
241
# The full path name of a Posix-compliant shell, preferably one that supports
242
# the Korn shell's 'select' statement as an extension.
243
# These days, Bash is the most popular.
244
# It should be OK to set this to /bin/sh, on platforms where /bin/sh
245
# lacks 'select' or doesn't completely conform to Posix, but /bin/bash
246
# is typically nicer if it works.
252
247
KSHELL= /bin/bash
254
# The path where SGML DTDs are kept.
255
# The default is appropriate for Ubuntu 12.10.
249
# The path where SGML DTDs are kept and the catalog file(s) to use when
250
# validating. The default is appropriate for Ubuntu 13.10.
256
251
SGML_TOPDIR= /usr
257
252
SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
258
253
SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
260
# The catalog file(s) to use when validating.
261
SGML_CATALOG_FILES= HTML4.cat
254
SGML_CATALOG_FILES= \
255
$(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat
263
257
# The name, arguments and environment of a program to validate your web pages.
264
258
# See <http://www.jclark.com/sp/> for a validator, and
299
293
CC= $(cc) -DTZDIR=\"$(TZDIR)\"
301
TZCSRCS= zic.c localtime.c asctime.c scheck.c ialloc.c
297
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
302
300
TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o
303
TZDSRCS= zdump.c localtime.c ialloc.c asctime.o
304
TZDOBJS= zdump.o localtime.o ialloc.o asctime.c
305
DATESRCS= date.c localtime.c strftime.c asctime.c
301
TZDOBJS= zdump.o localtime.o ialloc.o asctime.o
306
302
DATEOBJS= date.o localtime.o strftime.o asctime.o
307
303
LIBSRCS= localtime.c asctime.c difftime.c
308
304
LIBOBJS= localtime.o asctime.o difftime.o
322
318
europe northamerica southamerica
323
319
YDATA= $(PRIMARY_YDATA) pacificnew etcetera backward
324
320
NDATA= systemv factory
325
SDATA= solar87 solar88 solar89
326
TDATA= $(YDATA) $(NDATA) $(SDATA)
327
TABDATA= iso3166.tab zone.tab
321
TDATA= $(YDATA) $(NDATA)
322
TABDATA= iso3166.tab zone.tab leapseconds
328
323
LEAP_DEPS= leapseconds.awk leap-seconds.list
329
DATA= $(YDATA) $(NDATA) $(SDATA) $(TABDATA) \
330
leapseconds $(LEAP_DEPS) yearistype.sh
324
DATA= $(YDATA) $(NDATA) $(TABDATA) \
325
$(LEAP_DEPS) yearistype.sh
331
326
WEB_PAGES= tz-art.htm tz-link.htm
332
327
AWK_SCRIPTS= checktab.awk leapseconds.awk
333
328
MISC= usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \
343
all: tzselect zic zdump $(LIBOBJS) $(TABDATA)
338
all: tzselect zic zdump libtz.a $(TABDATA)
347
install: all $(DATA) $(REDO) $(DESTDIR)$(TZLIB) $(MANS)
342
install: all $(DATA) $(REDO) $(MANS)
343
mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
344
$(DESTDIR)$(LIBDIR) \
345
$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
346
$(DESTDIR)$(MANDIR)/man8
348
347
$(ZIC) -y $(YEARISTYPE) \
349
348
-d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
350
-rm -f $(DESTDIR)$(TZDIR)/iso3166.tab \
351
$(DESTDIR)$(TZDIR)/zone.tab
352
cp iso3166.tab zone.tab $(DESTDIR)$(TZDIR)/.
353
-mkdir $(DESTDIR)$(TOPDIR) $(DESTDIR)$(ETCDIR)
349
cp -f iso3166.tab zone.tab $(DESTDIR)$(TZDIR)/.
354
350
cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
355
-mkdir $(DESTDIR)$(TOPDIR) $(DESTDIR)$(MANDIR) \
356
$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
357
$(DESTDIR)$(MANDIR)/man8
358
-rm -f $(DESTDIR)$(MANDIR)/man3/newctime.3 \
359
$(DESTDIR)$(MANDIR)/man3/newtzset.3 \
360
$(DESTDIR)$(MANDIR)/man5/tzfile.5 \
361
$(DESTDIR)$(MANDIR)/man8/tzselect.8 \
362
$(DESTDIR)$(MANDIR)/man8/zdump.8 \
363
$(DESTDIR)$(MANDIR)/man8/zic.8
364
cp newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
365
cp tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
366
cp tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
351
cp libtz.a $(DESTDIR)$(LIBDIR)/.
352
$(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
353
cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
354
cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
355
cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
368
357
INSTALL: ALL install date.1
369
-mkdir $(DESTDIR)$(TOPDIR) $(DESTDIR)$(BINDIR)
358
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
370
359
cp date $(DESTDIR)$(BINDIR)/.
371
-mkdir $(DESTDIR)$(TOPDIR) $(DESTDIR)$(MANDIR) \
372
$(DESTDIR)$(MANDIR)/man1
373
-rm -f $(DESTDIR)$(MANDIR)/man1/date.1
374
cp date.1 $(DESTDIR)$(MANDIR)/man1/.
360
cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.
377
363
(echo 'static char const PKGVERSION[]="($(PACKAGE)) ";' && \
461
445
rm -f core *.o *.out \
462
date leapseconds tzselect version.h zdump zic yearistype
446
date tzselect version.h zdump zic yearistype
463
447
clean: clean_misc
466
450
maintainer-clean: clean
467
451
@echo 'This command is intended for maintainers to use; it'
468
452
@echo 'deletes files that may need special tools to rebuild.'
469
rm -f $(MANTXTS) *.asc *.tar.gz
453
rm -f leapseconds $(MANTXTS) *.asc *.tar.gz
472
456
@echo $(ENCHILADA)
491
475
# and if the files have not changed since then.
492
476
# This uses GNU 'touch' syntax 'touch -d@N FILE',
493
477
# where N is the number of seconds since 1970.
494
# If git or GNU 'touch' is absent, do nothing and fail.
478
# If git or GNU 'touch' is absent, don't bother to sync with git timestamps.
495
479
# Also, set the timestamp of each prebuilt file like 'leapseconds'
496
480
# to be the maximum of the files it depends on.
497
481
set-timestamps.out: $(ENCHILADA)
499
-files=`git ls-files $(ENCHILADA)` && \
500
touch -md @1 test.out && rm -f test.out && \
501
for file in $$files; do \
502
if git diff --quiet $$file; then \
503
time=`git log -1 --format='tformat:%ct' $$file` && \
504
touch -cmd @$$time $$file; \
506
echo >&2 "$$file: warning: does not match repository"; \
483
if files=`git ls-files $(ENCHILADA)` && \
484
touch -md @1 test.out; then \
486
for file in $$files; do \
487
if git diff --quiet $$file; then \
488
time=`git log -1 --format='tformat:%ct' $$file` && \
489
touch -cmd @$$time $$file; \
491
echo >&2 "$$file: warning: does not match repository"; \
509
495
touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds
510
496
for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \
511
497
touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \
524
510
$(zic) -v -d tzpublic $$i 2>&1 || exit; \
526
512
$(zic) -v -d tzpublic $(TDATA)
529
515
# Check that the code works under various alternative
530
516
# implementations of time_t.
531
517
check_time_t_alternatives:
533
518
zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone.tab` && \
534
519
for type in $(TIME_T_ALTERNATIVES); do \
535
mkdir tzpublic/$$type && \
520
mkdir -p tzpublic/$$type && \
536
521
make clean_misc && \
537
522
make TOPDIR=`pwd`/tzpublic/$$type \
538
523
CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \