patch-Makefile 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --- w-tzdata-2014d-1.orig/Makefile 2014-05-28 06:35:46.000000000 +0200
  2. +++ w-tzdata-2014d-1/Makefile 2014-05-30 09:15:54.792171067 +0200
  3. @@ -45,33 +45,33 @@ POSIXRULES= America/New_York
  4. # Everything gets put in subdirectories of. . .
  5. -TOPDIR= /usr/local
  6. +TZTOPDIR= /usr
  7. # "Compiled" time zone information is placed in the "TZDIR" directory
  8. # (and subdirectories).
  9. # Use an absolute path name for TZDIR unless you're just testing the software.
  10. TZDIR_BASENAME= zoneinfo
  11. -TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME)
  12. +TZDIR= $(TZTOPDIR)/etc/$(TZDIR_BASENAME)
  13. # Types to try, as an alternative to time_t. int64_t should be first.
  14. TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t
  15. # The "tzselect", "zic", and "zdump" commands get installed in. . .
  16. -ETCDIR= $(TOPDIR)/etc
  17. +ETCDIR= $(TZTOPDIR)/etc
  18. # If you "make INSTALL", the "date" command gets installed in. . .
  19. -BINDIR= $(TOPDIR)/bin
  20. +BINDIR= $(TZTOPDIR)/bin
  21. # Manual pages go in subdirectories of. . .
  22. -MANDIR= $(TOPDIR)/man
  23. +MANDIR= $(TZTOPDIR)/man
  24. # Library functions are put in an archive in LIBDIR.
  25. -LIBDIR= $(TOPDIR)/lib
  26. +LIBDIR= $(TZTOPDIR)/lib
  27. # If you always want time values interpreted as "seconds since the epoch
  28. # (not counting leap seconds)", use
  29. @@ -224,7 +224,7 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-co
  30. # before the first Monday in January when a "%V" format is used and January 1
  31. # falls on a Friday, Saturday, or Sunday.
  32. -CFLAGS=
  33. +CFLAGS?=
  34. # Linker flags. Default to $(LFLAGS) for backwards compatibility
  35. # to tzcode2012h and earlier.
  36. @@ -232,7 +232,7 @@ CFLAGS=
  37. LDFLAGS= $(LFLAGS)
  38. zic= ./zic
  39. -ZIC= $(zic) $(ZFLAGS)
  40. +ZIC= ./zic_for_build $(ZFLAGS)
  41. ZFLAGS=
  42. @@ -338,7 +338,7 @@ SHELL= /bin/sh
  43. all: tzselect zic zdump libtz.a $(TABDATA)
  44. -ALL: all date
  45. +ALL: zic_for_build date
  46. install: all $(DATA) $(REDO) $(MANS)
  47. mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
  48. @@ -371,6 +371,14 @@ zdump: $(TZDOBJS)
  49. zic: $(TZCOBJS) yearistype
  50. $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
  51. +zic_for_build: version.h
  52. + $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) zic.c -o zic_build.o
  53. + $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) localtime.c -o localtime_build.o
  54. + $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) asctime.c -o asctime_build.o
  55. + $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) scheck.c -o scheck_build.o
  56. + $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) ialloc.c -o ialloc_build.o
  57. + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ zic_build.o localtime_build.o asctime_build.o scheck_build.o ialloc_build.o
  58. +
  59. yearistype: yearistype.sh
  60. cp yearistype.sh yearistype
  61. chmod +x yearistype
  62. @@ -378,11 +386,11 @@ yearistype: yearistype.sh
  63. leapseconds: $(LEAP_DEPS)
  64. $(AWK) -f leapseconds.awk leap-seconds.list >$@
  65. -posix_only: zic $(TDATA)
  66. +posix_only: zic_for_build $(TDATA)
  67. $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
  68. -L /dev/null $(TDATA)
  69. -right_only: zic leapseconds $(TDATA)
  70. +right_only: zic_for_build leapseconds $(TDATA)
  71. $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
  72. -L leapseconds $(TDATA)
  73. @@ -520,7 +528,7 @@ check_time_t_alternatives:
  74. for type in $(TIME_T_ALTERNATIVES); do \
  75. mkdir -p tzpublic/$$type && \
  76. make clean_misc && \
  77. - make TOPDIR=`pwd`/tzpublic/$$type \
  78. + make TZTOPDIR=`pwd`/tzpublic/$$type \
  79. CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
  80. install && \
  81. diff -qr tzpublic/int64_t/etc/zoneinfo tzpublic/$$type/etc/zoneinfo && \