]> git.saurik.com Git - apple/icu.git/blame - icuSources/tools/tzcode/Makefile.in
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / tools / tzcode / Makefile.in
CommitLineData
73c04bcf
A
1# Some Portions Copyright (c) 2006 IBM and others. All Rights Reserved.
2
3srcdir = @srcdir@
4top_srcdir = @top_srcdir@
5
6top_builddir = ../..
7
8subdir = tools/tzcode
9
10include $(top_builddir)/icudefs.mk
11
12OBJECTS= zic.o localtime.o asctime.o scheck.o ialloc.o
13TZDATA = $(firstword $(wildcard ./tzdata*.tar.gz) $(wildcard $(srcdir)/tzdata*.tar.gz))
14
15ifeq ($(TZDATA),)
16all:
17 @echo ERROR tzdata*.tar.gz can\'t be found.
18 @false
19else
20all: icu_data
21endif
22
23PRIMARY_YDATA= africa antarctica asia australasia \
24 europe northamerica southamerica
25YDATA= $(PRIMARY_YDATA) pacificnew etcetera factory backward
26NDATA= systemv
27SDATA= solar87 solar88 solar89
28TDATA= $(YDATA) $(NDATA) $(SDATA)
29YEARISTYPE= ./yearistype
30
31ZIC = ./zic
32TZDIR=zoneinfo
33
34CFLAGS+=-D_POSIX_C_SOURCE
35CPPFLAGS+= -DTZDIR=\"$(TZDIR)\"
36
37# more data
38XDATA=zone.tab yearistype.sh leapseconds iso3166.tab
39ICUDATA=ZoneMetaData.java icu_zone.txt tz2icu zoneinfo.txt
40
41
42
43zic: $(OBJECTS) yearistype $(srcdir)/tz2icu.h
44 $(CC) $(CFLAGS) $(LFLAGS) -I$(srcdir) $(OBJECTS) $(LDLIBS) -o $@
45
46tz2icu: $(srcdir)/tz2icu.cpp $(srcdir)/tz2icu.h
47 $(CXX) -W -Wall -I$(srcdir) -pedantic $(srcdir)/tz2icu.cpp -o $@
48
49yearistype.sh: $(TZDATA)
50 gunzip -d < $(TZDATA) | tar xf -
51
52yearistype: yearistype.sh
53 cp yearistype.sh yearistype
54 chmod +x yearistype
55
56tz.alias: $(srcdir)/tz.alias
57 cp $< .
58
59posix_only: zic $(TDATA)
60 $(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L /dev/null $(TDATA)
61
62
63icu_data: tz2icu posix_only tz.alias
64 ./tz2icu $(TZDIR) zone.tab `echo $(TZDATA) | sed -e "s/.*\/tzdata//;s/\.tar\.gz$$//"`
65
66clean:
67 -rm -f core *.o *.out zdump zic yearistype date
68 @echo ICU specific cleanup:
69 -rm -f $(ICUDATA)
70 -rm -rf $(TZDIR)
71ifneq ($(srcdir),.)
72 -$(RMV) tz.alias
73endif
74ifneq ($(TZDATA),)
75 -rm -rf `gunzip -d < $(TZDATA) | tar tf - | grep -o '[^ ]*$$' | tr '\n' ' '`
76endif
77
78dataclean: clean
79 -rm -f $(TDATA) $(XDATA)
80
81distclean: dataclean clean
82 -rm -f Makefile
83
84Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
85 cd $(top_builddir) \
86 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
87
88