intl/icu/source/tools/tzcode/Makefile.in

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

michael@0 1 # Some Portions Copyright (c) 2006-2012 IBM and others. All Rights Reserved.
michael@0 2
michael@0 3 srcdir = @srcdir@
michael@0 4 top_srcdir = @top_srcdir@
michael@0 5
michael@0 6 top_builddir = ../..
michael@0 7
michael@0 8 subdir = tools/tzcode
michael@0 9
michael@0 10 include $(top_builddir)/icudefs.mk
michael@0 11
michael@0 12 ifeq ($(TZDATA),)
michael@0 13 TZDATA = $(firstword $(wildcard ./tzdata*.tar.gz) $(wildcard $(srcdir)/tzdata*.tar.gz))
michael@0 14 endif
michael@0 15 ifeq ($(TZCODE),)
michael@0 16 TZCODE = $(firstword $(wildcard ./tzcode*.tar.gz) $(wildcard $(srcdir)/tzcode*.tar.gz))
michael@0 17 endif
michael@0 18
michael@0 19 TZORIG=./tzorig
michael@0 20 TZORIG_TZDIR=./tzorig/tzdir
michael@0 21 TZORIG_ABS := $(shell pwd)/tzorig
michael@0 22 TZORIG_TZDIR_ABS := $(TZORIG_ABS)/tzdir
michael@0 23 TZORIG_OPTS := CFLAGS="-D_POSIX_C_SOURCE $(TZORIG_EXTRA_CFLAGS)" TZDIR=$(TZORIG_TZDIR_ABS)
michael@0 24
michael@0 25
michael@0 26 ## Options for building zdumps
michael@0 27 ZDUMPOUT=$(shell pwd)/zdumpout
michael@0 28 ICUZDUMPOUT=$(shell pwd)/icuzdumpout
michael@0 29
michael@0 30 ZDUMP_OPTS= -v -a -d $(ZDUMPOUT) -c 1902,2038 -i
michael@0 31 ICUZDUMP_OPTS= -a -d $(ICUZDUMPOUT)
michael@0 32
michael@0 33 # Executables & objects
michael@0 34 OBJECTS= zic.o localtime.o asctime.o scheck.o ialloc.o
michael@0 35 ZICTARG=$(BINDIR)/zic$(EXEEXT)
michael@0 36 ZICEXEC=$(TOOLBINDIR)/zic$(TOOLEXEEXT)
michael@0 37 TZ2ICUTARG=$(BINDIR)/tz2icu$(EXEEXT)
michael@0 38 TZ2ICUEXEC=$(TOOLBINDIR)/tz2icu$(TOOLEXEEXT)
michael@0 39 ICUZDUMPTARG=$(BINDIR)/icuzdump$(EXEEXT)
michael@0 40 ICUZDUMPEXEC=$(TOOLBINDIR)/icuzdump$(TOOLEXEEXT)
michael@0 41
michael@0 42 ifeq ($(TZDATA),)
michael@0 43 all:
michael@0 44 @echo ERROR "tzdata*.tar.gz" can\'t be found.
michael@0 45 @false
michael@0 46 else
michael@0 47 all: icu_data
michael@0 48 endif
michael@0 49
michael@0 50 TZCODE_TARGETS= tzorig check-dump
michael@0 51
michael@0 52 ifeq ($(TZCODE),)
michael@0 53 # we're broken.
michael@0 54 $(TZCODE_TARGETS):
michael@0 55 @echo ERROR "tzcode*.tar.gz" can\'t be found.
michael@0 56 @false
michael@0 57
michael@0 58 else
michael@0 59 ifeq ($(TZDATA),)
michael@0 60 # we're broken.
michael@0 61 $(TZCODE_TARGETS):
michael@0 62 @echo ERROR "tzdata*.tar.gz" can\'t be found.
michael@0 63 @false
michael@0 64 else
michael@0 65 tzorig: $(TZCODE) $(TZDATA)
michael@0 66 -$(RMV) ./tzorig/
michael@0 67 mkdir $@
michael@0 68 mkdir $(TZORIG_TZDIR)
michael@0 69 gunzip -d < $(TZDATA) | ( cd $@ ; tar xf - )
michael@0 70 gunzip -d < $(TZCODE) | ( cd $@ ; tar xf - )
michael@0 71 -mv $(TZORIG)/zdump.c $(TZORIG)/zdump.c.orig
michael@0 72 cp $(srcdir)/zdump.c $(TZORIG)/zdump.c
michael@0 73 -mv $(TZORIG)/factory $(TZORIG)/factory.orig
michael@0 74 cat $(TZORIG)/factory.orig $(srcdir)/icuzones > $(TZORIG)/factory
michael@0 75 $(MAKE) -C $@ $(TZORIG_OPTS) zdump zones
michael@0 76
michael@0 77 $(ZDUMPOUT): tzorig
michael@0 78 ( cd $(TZORIG) ; ./zdump$(EXEEXT) $(ZDUMP_OPTS) )
michael@0 79
michael@0 80
michael@0 81 dump-out: $(ZDUMPOUT) $(ICUZDUMPOUT)
michael@0 82
michael@0 83 check-dump: dump-out
michael@0 84 diff -r zdumpout icuzdumpout
michael@0 85
michael@0 86 endif
michael@0 87 endif
michael@0 88
michael@0 89 $(ICUZDUMPOUT): $(ICUZDUMPEXEC)
michael@0 90 -$(RMV) $(ICUZDUMPOUT)
michael@0 91 -mkdir $(ICUZDUMPOUT)
michael@0 92 $(INVOKE) $(ICUZDUMPEXEC) $(ICUZDUMP_OPTS)
michael@0 93
michael@0 94
michael@0 95 #
michael@0 96 # old 'tz' rules start here
michael@0 97 #
michael@0 98
michael@0 99
michael@0 100 PRIMARY_YDATA= africa antarctica asia australasia \
michael@0 101 europe northamerica southamerica
michael@0 102 YDATA= $(PRIMARY_YDATA) pacificnew etcetera factory backward
michael@0 103 NDATA= systemv
michael@0 104 SDATA= solar87 solar88 solar89
michael@0 105 TDATA= $(YDATA) $(NDATA) $(SDATA)
michael@0 106 YEARISTYPE= ./yearistype
michael@0 107
michael@0 108 TZDIR=zoneinfo
michael@0 109
michael@0 110 CFLAGS+=-D_POSIX_C_SOURCE
michael@0 111 CPPFLAGS+= -DTZDIR=\"$(TZDIR)\"
michael@0 112
michael@0 113 # more data
michael@0 114 XDATA=zone.tab yearistype.sh leapseconds iso3166.tab
michael@0 115 ICUDATA=ZoneMetaData.java icu_zone.txt tz2icu zoneinfo64.txt zoneinfo.txt
michael@0 116
michael@0 117 $(ZICTARG): $(OBJECTS) $(TDATA) yearistype $(srcdir)/tz2icu.h
michael@0 118 $(CC) $(CFLAGS) $(TZORIG_EXTRA_CFLAGS) $(LFLAGS) -I$(srcdir) $(OBJECTS) $(LDLIBS) -o $@
michael@0 119
michael@0 120 $(TZ2ICUTARG): $(srcdir)/tz2icu.cpp $(srcdir)/tz2icu.h
michael@0 121 $(CXX) -W -Wall -I$(srcdir) -I$(top_srcdir)/common -pedantic $(srcdir)/tz2icu.cpp -o $@
michael@0 122
michael@0 123 $(ICUZDUMPTARG): $(srcdir)/icuzdump.cpp
michael@0 124 $(LINK.cc) -I$(srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/io -pedantic $(srcdir)/icuzdump.cpp $(LIBICUUC) $(LIBICUDT) $(LIBICUI18N) $(LIBICUIO) $(LIBICUTOOLUTIL) -o $@
michael@0 125
michael@0 126
michael@0 127 $(TDATA): tdatamarker
michael@0 128
michael@0 129 tdatamarker: $(TZDATA)
michael@0 130 gunzip -d < $(TZDATA) | tar xf - --exclude=Makefile
michael@0 131 touch $@
michael@0 132
michael@0 133 yearistype: yearistype.sh
michael@0 134 cp yearistype.sh yearistype
michael@0 135 chmod +x yearistype
michael@0 136
michael@0 137 posix_only: $(ZICEXEC) $(TDATA) $(srcdir)/icuzones
michael@0 138 $(ZICEXEC) -y $(YEARISTYPE) -d $(TZDIR) -L /dev/null $(TDATA) $(srcdir)/icuzones
michael@0 139
michael@0 140
michael@0 141 icu_data: $(TZ2ICUEXEC) posix_only
michael@0 142 $(TZ2ICUEXEC) $(TZDIR) zone.tab `echo $(TZDATA) | sed -e "s/.*\/tzdata//;s/\.tar\.gz$$//"`
michael@0 143 $(TZ2ICUEXEC) $(TZDIR) zone.tab `echo $(TZDATA) | sed -e "s/.*\/tzdata//;s/\.tar\.gz$$//"` --old
michael@0 144
michael@0 145 clean:
michael@0 146 -rm -f core *.o *.out zdump${EXEEXT} $(ZICTARG) yearistype date $(TZ2ICUTARG)
michael@0 147 @echo ICU specific cleanup:
michael@0 148 -rm -f $(ICUDATA)
michael@0 149 -rm -rf $(TZDIR)
michael@0 150 -$(RMV) $(ICUZDUMPTARG) tzorig ./zdumpout/ ./icuzdumpout/
michael@0 151 ifneq ($(TZDATA),)
michael@0 152 -rm -rf `gunzip -d < $(TZDATA) | tar tf - --exclude=Makefile | grep -o '[^ ]*$$' | tr '\n' ' '`
michael@0 153 -rm tdatamarker
michael@0 154 endif
michael@0 155
michael@0 156 checkclean:
michael@0 157
michael@0 158 dataclean: clean
michael@0 159 -rm -f $(TDATA) $(XDATA)
michael@0 160
michael@0 161 distclean: dataclean clean
michael@0 162 -rm -f Makefile
michael@0 163
michael@0 164 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
michael@0 165 cd $(top_builddir) \
michael@0 166 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
michael@0 167
michael@0 168

mercurial