Fix pg_dump bug in the database-level collation patch. "datcollate" and
[PostgreSQL.git] / src / timezone / Makefile
blob271d9e9617ebad9385979ce28c72d489152bc1f0
1 #-------------------------------------------------------------------------
3 # Makefile
4 # Makefile for the timezone library
6 # IDENTIFICATION
7 # $PostgreSQL$
9 #-------------------------------------------------------------------------
11 subdir = src/timezone
12 top_builddir = ../..
13 include $(top_builddir)/src/Makefile.global
15 # files to build into backend
16 OBJS= localtime.o strftime.o pgtz.o
18 # files needed to build zic utility program
19 ZICOBJS= zic.o ialloc.o scheck.o localtime.o
21 # timezone data files
22 TZDATA = africa antarctica asia australasia europe northamerica southamerica \
23 pacificnew etcetera factory backward systemv solar87 solar88 solar89
24 TZDATAFILES = $(TZDATA:%=$(srcdir)/data/%)
26 # which zone should determine the DST rules (not the specific UTC offset!)
27 # for POSIX-style timezone specs
28 POSIXRULES = US/Eastern
30 # use system timezone data?
31 ifneq (,$(with_system_tzdata))
32 override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
33 endif
35 include $(top_srcdir)/src/backend/common.mk
37 ifeq (,$(with_system_tzdata))
38 all: submake-libpgport zic
39 endif
41 zic: $(ZICOBJS)
42 $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
44 install: all installdirs
45 ifeq (,$(with_system_tzdata))
46 ./zic -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)
47 endif
48 $(MAKE) -C tznames $@
50 installdirs:
51 $(mkinstalldirs) '$(DESTDIR)$(datadir)'
53 uninstall:
54 ifeq (,$(with_system_tzdata))
55 rm -rf '$(DESTDIR)$(datadir)/timezone'
56 endif
57 $(MAKE) -C tznames $@
59 clean distclean maintainer-clean:
60 rm -f zic$(X) $(ZICOBJS)