--- ./Makefile.orig 2015-06-13 20:57:13.000000000 +0300 +++ ./Makefile 2015-06-17 10:51:30.527948381 +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. @@ -98,7 +98,7 @@ # Non-default libraries needed to link. # Add -lintl if you want to use 'gettext' on Solaris. -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) @@ -235,7 +235,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 tzcode2012h and earlier. @@ -326,8 +326,7 @@ #MAKE= make -cc= cc -CC= $(cc) -DTZDIR=\"$(TZDIR)\" +CC+= -DTZDIR=\"$(TZDIR)\" AR= ar @@ -372,21 +371,21 @@ SHELL= /bin/sh -all: tzselect zic zdump libtz.a $(TABDATA) +all: tzselect 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) -y $(YEARISTYPE) \ -d $(DESTDIR)$(TZDIR) -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)/. + mkdir -p $(DESTDIR)/sbin + cp zic zdump $(DESTDIR)/sbin/. 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/. @@ -432,19 +431,19 @@ # You must replace all of $(TZDIR) to switch from not using leap seconds # to using them, or vice versa. right_posix: right_only leapseconds - rm -fr $(DESTDIR)$(TZDIR)-leaps + rm -fr $(DESTDIR)$(TZDIR)/leaps ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \ - $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \ + $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/leaps \ -L leapseconds $(TDATA) - $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \ + $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/posix \ -L /dev/null $(TDATA) posix_right: posix_only leapseconds - rm -fr $(DESTDIR)$(TZDIR)-posix - ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \ - $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix \ + rm -fr $(DESTDIR)$(TZDIR)/posix + $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/posix \ -L /dev/null $(TDATA) - $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-leaps \ + rm -fr $(DESTDIR)$(TZDIR)/leaps + $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/leaps \ -L leapseconds $(TDATA) posix_packrat: posix_only backzone @@ -576,7 +575,7 @@ check_public: $(MAKE) maintainer-clean $(MAKE) "CFLAGS=$(GCC_DEBUG_FLAGS)" ALL - mkdir tzpublic + mkdir -p tzpublic for i in $(TDATA) ; do \ $(zic) -v -d tzpublic $$i 2>&1 || exit; \ done