--- ./Makefile.orig 2016-10-05 01:27:16.000000000 +0300 +++ ./Makefile 2016-10-21 21:09:00.033806064 +0300 @@ -44,14 +44,14 @@ # Everything gets put in subdirectories of. . . -TOPDIR= /usr/local +TOPDIR= /usr # "Compiled" time zone information is placed in the "TZDIR" directory # (and subdirectories). # Use an absolute path name for TZDIR unless you're just testing the software. TZDIR_BASENAME= zoneinfo -TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME) +TZDIR= $(TOPDIR)/share/$(TZDIR_BASENAME) # Types to try, as an alternative to time_t. int64_t should be first. TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t @@ -66,7 +66,7 @@ # Manual pages go in subdirectories of. . . -MANDIR= $(TOPDIR)/man +MANDIR= $(TOPDIR)/share/man # Library functions are put in an archive in LIBDIR. @@ -101,7 +101,7 @@ YEARISTYPE= ./yearistype # Non-default libraries needed to link. -LDLIBS= +LDLIBS=$(LDFLAGS) # Add the following to the end of the "CFLAGS=" line as needed. # -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c) @@ -237,7 +237,7 @@ # before the first Monday in January when a "%V" format is used and January 1 # falls on a Friday, Saturday, or Sunday. -CFLAGS= +CFLAGS+= -std=gnu99 # Linker flags. Default to $(LFLAGS) for backwards compatibility # to release 2012h and earlier. @@ -339,8 +339,7 @@ #MAKE= make -cc= cc -CC= $(cc) -DTZDIR=\"$(TZDIR)\" +CC+= -DTZDIR=\"$(TZDIR)\" AR= ar @@ -410,20 +409,18 @@ SHELL= /bin/sh -all: tzselect yearistype zic zdump libtz.a $(TABDATA) +all: tzselect yearistype zic zdump $(TABDATA) ALL: all date $(ENCHILADA) install: all $(DATA) $(REDO) $(MANS) - mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \ + mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(TZDIR) \ $(DESTDIR)$(LIBDIR) \ $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \ $(DESTDIR)$(MANDIR)/man8 $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES) cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/. - cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/. - cp libtz.a $(DESTDIR)$(LIBDIR)/. - $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a + cp tzselect zic zdump $(DESTDIR)$(BINDIR)/. cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/. cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/. cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/. @@ -496,16 +493,14 @@ # You must replace all of $(TZDIR) to switch from not using leap seconds # to using them, or vice versa. right_posix: right_only - rm -fr $(DESTDIR)$(TZDIR)-leaps - ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \ - $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only - $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only + rm -fr $(DESTDIR)$(TZDIR)/leaps + $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)/leaps right_only + $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)/posix posix_only posix_right: posix_only - rm -fr $(DESTDIR)$(TZDIR)-posix - ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \ - $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only - $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only + rm -fr $(DESTDIR)$(TZDIR)/posix + $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)/posix posix_only + $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)/leaps right_only # This obsolescent rule is present for backwards compatibility with # tz releases 2014g through 2015g. It should go away eventually.