2004-04-30 06:09:23 +02:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
2004-10-04 15:43:59 +02:00
|
|
|
# Makefile
|
2004-04-30 06:09:23 +02:00
|
|
|
# Makefile for the timezone library
|
|
|
|
|
|
|
|
# IDENTIFICATION
|
2010-09-20 22:08:53 +02:00
|
|
|
# src/timezone/Makefile
|
2004-04-30 06:09:23 +02:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2014-08-19 04:59:53 +02:00
|
|
|
PGFILEDESC = "zic - time zone compiler"
|
|
|
|
PGAPPICON = win32
|
|
|
|
|
2004-04-30 16:24:14 +02:00
|
|
|
subdir = src/timezone
|
2004-04-30 06:31:52 +02:00
|
|
|
top_builddir = ../..
|
2004-04-30 06:09:23 +02:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
|
2004-05-21 07:08:06 +02:00
|
|
|
# files to build into backend
|
2019-11-05 23:41:07 +01:00
|
|
|
OBJS = \
|
|
|
|
localtime.o \
|
|
|
|
pgtz.o \
|
|
|
|
strftime.o
|
2004-04-30 06:09:23 +02:00
|
|
|
|
2004-05-21 07:08:06 +02:00
|
|
|
# files needed to build zic utility program
|
2019-11-05 23:41:07 +01:00
|
|
|
ZICOBJS = \
|
|
|
|
$(WIN32RES) \
|
|
|
|
zic.o
|
2004-05-21 07:08:06 +02:00
|
|
|
|
2017-11-25 21:30:11 +01:00
|
|
|
# we now distribute the timezone data as a single file
|
|
|
|
TZDATAFILES = $(srcdir)/data/tzdata.zi
|
2004-04-30 06:09:23 +02:00
|
|
|
|
2019-04-27 01:46:26 +02:00
|
|
|
# any custom options you might want to pass to zic while installing data files
|
|
|
|
ZIC_OPTIONS =
|
|
|
|
|
2007-08-25 22:29:25 +02:00
|
|
|
# use system timezone data?
|
|
|
|
ifneq (,$(with_system_tzdata))
|
|
|
|
override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
|
|
|
|
endif
|
|
|
|
|
2008-02-19 16:29:58 +01:00
|
|
|
include $(top_srcdir)/src/backend/common.mk
|
2007-08-25 22:29:25 +02:00
|
|
|
|
|
|
|
ifeq (,$(with_system_tzdata))
|
2010-11-12 21:15:16 +01:00
|
|
|
all: zic
|
2007-08-25 22:29:25 +02:00
|
|
|
endif
|
2004-04-30 06:09:23 +02:00
|
|
|
|
2009-01-06 03:25:29 +01:00
|
|
|
# We could do this test in the action section:
|
|
|
|
# $(if $(ZIC),$(ZIC),./zic)
|
2014-02-12 23:29:19 +01:00
|
|
|
# but GNU make versions <= 3.78.1 or perhaps later have a bug
|
|
|
|
# that causes a segfault; GNU make 3.81 or later fixes this.
|
2009-01-06 03:25:29 +01:00
|
|
|
ifeq (,$(ZIC))
|
|
|
|
ZIC= ./zic
|
|
|
|
endif
|
|
|
|
|
2010-11-12 21:15:16 +01:00
|
|
|
zic: $(ZICOBJS) | submake-libpgport
|
2010-07-05 20:54:38 +02:00
|
|
|
$(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
2004-04-30 06:09:23 +02:00
|
|
|
|
2004-05-18 06:10:33 +02:00
|
|
|
install: all installdirs
|
2007-08-20 10:53:12 +02:00
|
|
|
ifeq (,$(with_system_tzdata))
|
2020-10-17 03:40:16 +02:00
|
|
|
$(ZIC) -d '$(DESTDIR)$(datadir)/timezone' $(ZIC_OPTIONS) $(TZDATAFILES)
|
2007-08-20 10:53:12 +02:00
|
|
|
endif
|
2006-07-25 05:51:23 +02:00
|
|
|
$(MAKE) -C tznames $@
|
2004-04-30 06:09:23 +02:00
|
|
|
|
Update time zone data files to tzdata release 2021a.
DST law changes in Russia (Volgograd zone) and South Sudan.
Historical corrections for Australia, Bahamas, Belize, Bermuda,
Ghana, Israel, Kenya, Nigeria, Palestine, Seychelles, and Vanuatu.
Notably, the Australia/Currie zone has been corrected to the point
where it is identical to Australia/Hobart.
2021-01-24 22:29:47 +01:00
|
|
|
# Note: -P code currently depends on '-b fat'. Not worth fixing right now.
|
2013-03-23 23:47:22 +01:00
|
|
|
abbrevs.txt: zic $(TZDATAFILES)
|
|
|
|
mkdir junkdir
|
Update time zone data files to tzdata release 2021a.
DST law changes in Russia (Volgograd zone) and South Sudan.
Historical corrections for Australia, Bahamas, Belize, Bermuda,
Ghana, Israel, Kenya, Nigeria, Palestine, Seychelles, and Vanuatu.
Notably, the Australia/Currie zone has been corrected to the point
where it is identical to Australia/Hobart.
2021-01-24 22:29:47 +01:00
|
|
|
$(ZIC) -P -b fat -d junkdir $(TZDATAFILES) | LANG=C sort | uniq >abbrevs.txt
|
2013-03-23 23:47:22 +01:00
|
|
|
rm -rf junkdir
|
|
|
|
|
2004-05-28 05:53:33 +02:00
|
|
|
installdirs:
|
2009-08-27 00:24:44 +02:00
|
|
|
$(MKDIR_P) '$(DESTDIR)$(datadir)'
|
2005-12-09 22:19:36 +01:00
|
|
|
|
|
|
|
uninstall:
|
2007-08-25 22:29:25 +02:00
|
|
|
ifeq (,$(with_system_tzdata))
|
2005-12-09 22:19:36 +01:00
|
|
|
rm -rf '$(DESTDIR)$(datadir)/timezone'
|
2007-08-25 22:29:25 +02:00
|
|
|
endif
|
2006-07-25 05:51:23 +02:00
|
|
|
$(MAKE) -C tznames $@
|
2004-05-28 05:53:33 +02:00
|
|
|
|
2004-04-30 06:09:23 +02:00
|
|
|
clean distclean maintainer-clean:
|
2013-03-23 23:47:22 +01:00
|
|
|
rm -f zic$(X) $(ZICOBJS) abbrevs.txt
|