~ubuntu-branches/ubuntu/saucy/tzdata/saucy-proposed

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2014-03-13 17:44:33 UTC
  • mfrom: (1.8.31)
  • Revision ID: package-import@ubuntu.com-20140313174433-urs7t78ctzdn04id
Tags: 2014a-0ubuntu0.13.10
* New upstream release, with updated Turkish DST (LP: #1290193)
* Remove solar87, solar88, solar89, following upstream removal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
PACKAGE=        tzcode
7
7
 
8
8
# Version numbers of the code and data distributions.
9
 
VERSION=        2013g
 
9
VERSION=        2014a
10
10
 
11
11
# Email address for bug reports.
12
12
BUGEMAIL=       tz@iana.org
72
72
# Library functions are put in an archive in LIBDIR.
73
73
 
74
74
LIBDIR=         $(TOPDIR)/lib
75
 
TZLIB=          $(LIBDIR)/libtz.a
76
75
 
77
76
# If you always want time values interpreted as "seconds since the epoch
78
77
# (not counting leap seconds)", use
137
136
        -Wbad-function-cast -Wcast-align -Wcast-qual \
138
137
        -Wformat=2 -Winit-self \
139
138
        -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes \
140
 
        -Wnested-externs \
 
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.
199
198
#
200
 
# If you'll never want to handle solar-time-based time zones, add
201
 
#       -DNOSOLAR
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.
207
 
#
208
199
# If you want to allocate state structures in localtime, add
209
200
#       -DALL_STATE
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.
248
239
AWK=            awk
249
240
 
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
253
248
 
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
259
 
 
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
262
256
 
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
298
292
cc=             cc
299
293
CC=             $(cc) -DTZDIR=\"$(TZDIR)\"
300
294
 
301
 
TZCSRCS=        zic.c localtime.c asctime.c scheck.c ialloc.c
 
295
AR=             ar
 
296
 
 
297
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
 
298
RANLIB=         :
 
299
 
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 \
340
335
 
341
336
SHELL=          /bin/sh
342
337
 
343
 
all:            tzselect zic zdump $(LIBOBJS) $(TABDATA)
 
338
all:            tzselect zic zdump libtz.a $(TABDATA)
344
339
 
345
340
ALL:            all date
346
341
 
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/.
367
356
 
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/.
375
361
 
376
362
version.h:
377
363
                (echo 'static char const PKGVERSION[]="($(PACKAGE)) ";' && \
426
412
 
427
413
zones:          $(REDO)
428
414
 
429
 
$(DESTDIR)$(TZLIB): $(LIBOBJS)
430
 
                -mkdir -p $(DESTDIR)$(TOPDIR) $(DESTDIR)$(LIBDIR)
431
 
                ar ru $@ $(LIBOBJS)
432
 
                if [ -x /usr/ucb/ranlib ] || [ -x /usr/bin/ranlib ]; \
433
 
                        then ranlib $@ ; fi
 
415
libtz.a:        $(LIBOBJS)
 
416
                $(AR) ru $@ $(LIBOBJS)
 
417
                $(RANLIB) $@
434
418
 
435
419
date:           $(DATEOBJS)
436
420
                $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS)
459
443
 
460
444
clean_misc:
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
464
 
                rm -f -r tzpublic
 
448
                rm -fr tzpublic
465
449
 
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
470
454
 
471
455
names:
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)
498
482
                rm -f $@
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; \
505
 
                  else \
506
 
                    echo >&2 "$$file: warning: does not match repository"; \
507
 
                  fi || exit; \
508
 
                done
 
483
                if files=`git ls-files $(ENCHILADA)` && \
 
484
                   touch -md @1 test.out; then \
 
485
                  rm -f test.out && \
 
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; \
 
490
                    else \
 
491
                      echo >&2 "$$file: warning: does not match repository"; \
 
492
                    fi || exit; \
 
493
                  done; \
 
494
                fi
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; \
525
511
                done
526
512
                $(zic) -v -d tzpublic $(TDATA)
527
 
                rm -f -r tzpublic
 
513
                rm -fr tzpublic
528
514
 
529
515
# Check that the code works under various alternative
530
516
# implementations of time_t.
531
517
check_time_t_alternatives:
532
 
                mkdir tzpublic
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'" \
553
538
                  diff -u tzpublic/int64_t.out tzpublic/$$type.out \
554
539
                    || exit; \
555
540
                done
556
 
                rm -f -r tzpublic
 
541
                rm -fr tzpublic
557
542
 
558
543
tarballs:       tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
559
544