2004-04-30 00:09:23 -04:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
#
|
2004-10-04 09:43:59 -04:00
|
|
|
# Makefile
|
2004-04-30 00:09:23 -04:00
|
|
|
# Makefile for the timezone library
|
|
|
|
|
|
|
|
|
|
# IDENTIFICATION
|
2010-09-20 16:08:53 -04:00
|
|
|
# src/timezone/Makefile
|
2004-04-30 00:09:23 -04:00
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
2004-04-30 10:24:14 -04:00
|
|
|
subdir = src/timezone
|
2004-04-30 00:31:52 -04:00
|
|
|
top_builddir = ../..
|
2004-04-30 00:09:23 -04:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
|
|
2004-05-21 01:08:06 -04:00
|
|
|
# files to build into backend
|
2004-08-08 01:19:44 -04:00
|
|
|
OBJS= localtime.o strftime.o pgtz.o
|
2004-04-30 00:09:23 -04:00
|
|
|
|
2004-05-21 01:08:06 -04:00
|
|
|
# files needed to build zic utility program
|
2005-07-06 17:04:14 -04:00
|
|
|
ZICOBJS= zic.o ialloc.o scheck.o localtime.o
|
2004-05-21 01:08:06 -04:00
|
|
|
|
|
|
|
|
# timezone data files
|
2007-02-09 10:56:00 -05:00
|
|
|
TZDATA = africa antarctica asia australasia europe northamerica southamerica \
|
2004-05-21 01:08:06 -04:00
|
|
|
pacificnew etcetera factory backward systemv solar87 solar88 solar89
|
2007-02-09 10:56:00 -05:00
|
|
|
TZDATAFILES = $(TZDATA:%=$(srcdir)/data/%)
|
2004-04-30 00:09:23 -04:00
|
|
|
|
2007-03-14 13:38:06 -04:00
|
|
|
# which zone should determine the DST rules (not the specific UTC offset!)
|
|
|
|
|
# for POSIX-style timezone specs
|
|
|
|
|
POSIXRULES = US/Eastern
|
|
|
|
|
|
2007-08-25 16:29:25 -04:00
|
|
|
# use system timezone data?
|
|
|
|
|
ifneq (,$(with_system_tzdata))
|
|
|
|
|
override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
|
|
|
|
|
endif
|
|
|
|
|
|
2008-02-19 10:29:58 -05:00
|
|
|
include $(top_srcdir)/src/backend/common.mk
|
2007-08-25 16:29:25 -04:00
|
|
|
|
|
|
|
|
ifeq (,$(with_system_tzdata))
|
2010-11-12 15:15:16 -05:00
|
|
|
all: zic
|
2007-08-25 16:29:25 -04:00
|
|
|
endif
|
2004-04-30 00:09:23 -04:00
|
|
|
|
2009-01-05 21:25:29 -05:00
|
|
|
# We could do this test in the action section:
|
|
|
|
|
# $(if $(ZIC),$(ZIC),./zic)
|
|
|
|
|
# but gmake versions <= 3.78.1 or perhaps later have a bug
|
|
|
|
|
# that causes a segfault; gmake 3.81 or later fixes this.
|
|
|
|
|
ifeq (,$(ZIC))
|
|
|
|
|
ZIC= ./zic
|
|
|
|
|
endif
|
|
|
|
|
|
2010-11-12 15:15:16 -05:00
|
|
|
zic: $(ZICOBJS) | submake-libpgport
|
2010-07-05 14:54:38 -04:00
|
|
|
$(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
2004-04-30 00:09:23 -04:00
|
|
|
|
2004-05-18 00:10:33 -04:00
|
|
|
install: all installdirs
|
2007-08-20 04:53:12 -04:00
|
|
|
ifeq (,$(with_system_tzdata))
|
2009-01-05 21:25:29 -05:00
|
|
|
$(ZIC) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)
|
2007-08-20 04:53:12 -04:00
|
|
|
endif
|
2006-07-24 23:51:23 -04:00
|
|
|
$(MAKE) -C tznames $@
|
2004-04-30 00:09:23 -04:00
|
|
|
|
2004-05-27 23:53:33 -04:00
|
|
|
installdirs:
|
2009-08-26 18:24:44 -04:00
|
|
|
$(MKDIR_P) '$(DESTDIR)$(datadir)'
|
2005-12-09 16:19:36 -05:00
|
|
|
|
|
|
|
|
uninstall:
|
2007-08-25 16:29:25 -04:00
|
|
|
ifeq (,$(with_system_tzdata))
|
2005-12-09 16:19:36 -05:00
|
|
|
rm -rf '$(DESTDIR)$(datadir)/timezone'
|
2007-08-25 16:29:25 -04:00
|
|
|
endif
|
2006-07-24 23:51:23 -04:00
|
|
|
$(MAKE) -C tznames $@
|
2004-05-27 23:53:33 -04:00
|
|
|
|
2004-04-30 00:09:23 -04:00
|
|
|
clean distclean maintainer-clean:
|
2008-02-19 10:29:58 -05:00
|
|
|
rm -f zic$(X) $(ZICOBJS)
|