54aaf000b8
data directory. X-SVN-Rev: 20043
79 lines
1.8 KiB
Makefile
79 lines
1.8 KiB
Makefile
# Some Portions Copyright (c) 2006 IBM and others. All Rights Reserved.
|
|
|
|
srcdir = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
subdir = tools/tzcode
|
|
|
|
top_builddir = ../..
|
|
|
|
include $(top_builddir)/icudefs.mk
|
|
|
|
TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o
|
|
TZDATA = $(firstword $(wildcard ./tzdata*.tar.gz) $(wildcard $(srcdir)/tzdata*.tar.gz))
|
|
|
|
ifeq ($(TZDATA),)
|
|
all:
|
|
@echo ERROR tzdata*.tar.gz can\'t be found.
|
|
@false
|
|
else
|
|
all: icu_data
|
|
endif
|
|
|
|
PRIMARY_YDATA= africa antarctica asia australasia \
|
|
europe northamerica southamerica
|
|
YDATA= $(PRIMARY_YDATA) pacificnew etcetera factory backward
|
|
NDATA= systemv
|
|
SDATA= solar87 solar88 solar89
|
|
TDATA= $(YDATA) $(NDATA) $(SDATA)
|
|
YEARISTYPE= ./yearistype
|
|
|
|
ZIC = ./zic
|
|
TZDIR=zoneinfo
|
|
|
|
CFLAGS+=-D_POSIX_C_SOURCE
|
|
CPPFLAGS+= -DTZDIR=\"$(TZDIR)\"
|
|
|
|
# more data
|
|
XDATA=zone.tab yearistype.sh leapseconds iso3166.tab
|
|
ICUDATA=ZoneMetaData.java icu_zone.txt tz2icu zoneinfo.txt
|
|
|
|
|
|
|
|
zic: $(TZCOBJS) yearistype tz2icu.h
|
|
$(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) $(LDLIBS) -o $@
|
|
|
|
tz2icu: tz2icu.cpp tz2icu.h
|
|
$(CXX) -W -Wall -pedantic tz2icu.cpp -o $@
|
|
|
|
yearistype.sh: $(TZDATA)
|
|
gunzip -d < $(TZDATA) | tar xf -
|
|
|
|
yearistype: yearistype.sh
|
|
cp yearistype.sh yearistype
|
|
chmod +x yearistype
|
|
|
|
posix_only: zic $(TDATA)
|
|
$(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L /dev/null $(TDATA)
|
|
|
|
|
|
icu_data: tz2icu posix_only
|
|
./tz2icu $(TZDIR) zone.tab `echo $(TZDATA) | sed -e "s/.*\/tzdata//;s/\.tar\.gz$$//"`
|
|
|
|
clean:
|
|
-rm -f core *.o *.out zdump zic yearistype date
|
|
@echo ICU specific cleanup:
|
|
-rm -f $(ICUDATA)
|
|
-rm -rf $(TZDIR)
|
|
|
|
dataclean: clean
|
|
-rm -f $(TDATA) $(XDATA)
|
|
|
|
distclean: dataclean clean
|
|
-rm -f Makefile
|
|
|
|
Makefile: Makefile.in $(top_builddir)/config.status
|
|
cd $(top_builddir) \
|
|
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
|
|
|
|