~ubuntu-branches/ubuntu/trusty/tzdata/trusty

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-12-05 11:46:12 UTC
  • mfrom: (1.10.1)
  • mto: This revision was merged to the branch mainline in revision 94.
  • Revision ID: package-import@ubuntu.com-20131205114612-3e95dtzd6vqytfdb
Tags: upstream-2013h
ImportĀ upstreamĀ versionĀ 2013h

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=        2013h
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
247
246
# The name of a Posix-compliant `awk' on your system.
248
247
AWK=            awk
249
248
 
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.
 
249
# The full path name of a Posix-compliant shell, preferably one that supports
 
250
# the Korn shell's 'select' statement as an extension.
 
251
# These days, Bash is the most popular.
 
252
# It should be OK to set this to /bin/sh, on platforms where /bin/sh
 
253
# lacks 'select' or doesn't completely conform to Posix, but /bin/bash
 
254
# is typically nicer if it works.
252
255
KSHELL=         /bin/bash
253
256
 
254
257
# The path where SGML DTDs are kept.
298
301
cc=             cc
299
302
CC=             $(cc) -DTZDIR=\"$(TZDIR)\"
300
303
 
301
 
TZCSRCS=        zic.c localtime.c asctime.c scheck.c ialloc.c
 
304
AR=             ar
 
305
 
 
306
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
 
307
RANLIB=         :
 
308
 
302
309
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
 
310
TZDOBJS=        zdump.o localtime.o ialloc.o asctime.o
306
311
DATEOBJS=       date.o localtime.o strftime.o asctime.o
307
312
LIBSRCS=        localtime.c asctime.c difftime.c
308
313
LIBOBJS=        localtime.o asctime.o difftime.o
324
329
NDATA=          systemv factory
325
330
SDATA=          solar87 solar88 solar89
326
331
TDATA=          $(YDATA) $(NDATA) $(SDATA)
327
 
TABDATA=        iso3166.tab zone.tab
 
332
TABDATA=        iso3166.tab zone.tab leapseconds
328
333
LEAP_DEPS=      leapseconds.awk leap-seconds.list
329
334
DATA=           $(YDATA) $(NDATA) $(SDATA) $(TABDATA) \
330
 
                        leapseconds $(LEAP_DEPS) yearistype.sh
 
335
                        $(LEAP_DEPS) yearistype.sh
331
336
WEB_PAGES=      tz-art.htm tz-link.htm
332
337
AWK_SCRIPTS=    checktab.awk leapseconds.awk
333
338
MISC=           usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \
340
345
 
341
346
SHELL=          /bin/sh
342
347
 
343
 
all:            tzselect zic zdump $(LIBOBJS) $(TABDATA)
 
348
all:            tzselect zic zdump libtz.a $(TABDATA)
344
349
 
345
350
ALL:            all date
346
351
 
347
 
install:        all $(DATA) $(REDO) $(DESTDIR)$(TZLIB) $(MANS)
 
352
install:        all $(DATA) $(REDO) $(MANS)
 
353
                mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
 
354
                        $(DESTDIR)$(LIBDIR) \
 
355
                        $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
 
356
                        $(DESTDIR)$(MANDIR)/man8
348
357
                $(ZIC) -y $(YEARISTYPE) \
349
358
                        -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)
 
359
                cp -f iso3166.tab zone.tab $(DESTDIR)$(TZDIR)/.
354
360
                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/.
 
361
                cp libtz.a $(DESTDIR)$(LIBDIR)/.
 
362
                $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
 
363
                cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
 
364
                cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
 
365
                cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
367
366
 
368
367
INSTALL:        ALL install date.1
369
 
                -mkdir $(DESTDIR)$(TOPDIR) $(DESTDIR)$(BINDIR)
 
368
                mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
370
369
                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/.
 
370
                cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.
375
371
 
376
372
version.h:
377
373
                (echo 'static char const PKGVERSION[]="($(PACKAGE)) ";' && \
426
422
 
427
423
zones:          $(REDO)
428
424
 
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
 
425
libtz.a:        $(LIBOBJS)
 
426
                $(AR) ru $@ $(LIBOBJS)
 
427
                $(RANLIB) $@
434
428
 
435
429
date:           $(DATEOBJS)
436
430
                $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS)
459
453
 
460
454
clean_misc:
461
455
                rm -f core *.o *.out \
462
 
                  date leapseconds tzselect version.h zdump zic yearistype
 
456
                  date tzselect version.h zdump zic yearistype
463
457
clean:          clean_misc
464
 
                rm -f -r tzpublic
 
458
                rm -fr tzpublic
465
459
 
466
460
maintainer-clean: clean
467
461
                @echo 'This command is intended for maintainers to use; it'
468
462
                @echo 'deletes files that may need special tools to rebuild.'
469
 
                rm -f $(MANTXTS) *.asc *.tar.gz
 
463
                rm -f leapseconds $(MANTXTS) *.asc *.tar.gz
470
464
 
471
465
names:
472
466
                @echo $(ENCHILADA)
491
485
# and if the files have not changed since then.
492
486
# This uses GNU 'touch' syntax 'touch -d@N FILE',
493
487
# where N is the number of seconds since 1970.
494
 
# If git or GNU 'touch' is absent, do nothing and fail.
 
488
# If git or GNU 'touch' is absent, don't bother to sync with git timestamps.
495
489
# Also, set the timestamp of each prebuilt file like 'leapseconds'
496
490
# to be the maximum of the files it depends on.
497
491
set-timestamps.out: $(ENCHILADA)
498
492
                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
 
493
                if files=`git ls-files $(ENCHILADA)` && \
 
494
                   touch -md @1 test.out; then \
 
495
                  rm -f test.out && \
 
496
                  for file in $$files; do \
 
497
                    if git diff --quiet $$file; then \
 
498
                      time=`git log -1 --format='tformat:%ct' $$file` && \
 
499
                      touch -cmd @$$time $$file; \
 
500
                    else \
 
501
                      echo >&2 "$$file: warning: does not match repository"; \
 
502
                    fi || exit; \
 
503
                  done; \
 
504
                fi
509
505
                touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds
510
506
                for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \
511
507
                  touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \
524
520
                  $(zic) -v -d tzpublic $$i 2>&1 || exit; \
525
521
                done
526
522
                $(zic) -v -d tzpublic $(TDATA)
527
 
                rm -f -r tzpublic
 
523
                rm -fr tzpublic
528
524
 
529
525
# Check that the code works under various alternative
530
526
# implementations of time_t.
531
527
check_time_t_alternatives:
532
 
                mkdir tzpublic
533
528
                zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone.tab` && \
534
529
                for type in $(TIME_T_ALTERNATIVES); do \
535
 
                  mkdir tzpublic/$$type && \
 
530
                  mkdir -p tzpublic/$$type && \
536
531
                  make clean_misc && \
537
532
                  make TOPDIR=`pwd`/tzpublic/$$type \
538
533
                    CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
553
548
                  diff -u tzpublic/int64_t.out tzpublic/$$type.out \
554
549
                    || exit; \
555
550
                done
556
 
                rm -f -r tzpublic
 
551
                rm -fr tzpublic
557
552
 
558
553
tarballs:       tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
559
554