]> granicus.if.org Git - postgresql/blob - src/timezone/Makefile
Fix initialization of fake LSN for unlogged relations
[postgresql] / src / timezone / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile
4 #    Makefile for the timezone library
5
6 # IDENTIFICATION
7 #    src/timezone/Makefile
8 #
9 #-------------------------------------------------------------------------
10
11 PGFILEDESC = "zic - time zone compiler"
12 PGAPPICON = win32
13
14 subdir = src/timezone
15 top_builddir = ../..
16 include $(top_builddir)/src/Makefile.global
17
18 # files to build into backend
19 OBJS= localtime.o strftime.o pgtz.o
20
21 # files needed to build zic utility program
22 ZICOBJS= zic.o $(WIN32RES)
23
24 # we now distribute the timezone data as a single file
25 TZDATAFILES = $(srcdir)/data/tzdata.zi
26
27 # which zone should determine the DST rules (not the specific UTC offset!)
28 # for POSIX-style timezone specs
29 POSIXRULES = US/Eastern
30
31 # any custom options you might want to pass to zic while installing data files
32 ZIC_OPTIONS =
33
34 # use system timezone data?
35 ifneq (,$(with_system_tzdata))
36 override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
37 endif
38
39 include $(top_srcdir)/src/backend/common.mk
40
41 ifeq (,$(with_system_tzdata))
42 all: zic
43 endif
44
45 # We could do this test in the action section:
46 #       $(if $(ZIC),$(ZIC),./zic)
47 # but GNU make versions <= 3.78.1 or perhaps later have a bug
48 # that causes a segfault;  GNU make 3.81 or later fixes this.
49 ifeq (,$(ZIC))
50 ZIC= ./zic
51 endif
52
53 zic: $(ZICOBJS) | submake-libpgport
54         $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
55
56 install: all installdirs
57 ifeq (,$(with_system_tzdata))
58         $(ZIC) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' -b slim $(ZIC_OPTIONS) $(TZDATAFILES)
59 endif
60         $(MAKE) -C tznames $@
61
62 abbrevs.txt: zic $(TZDATAFILES)
63         mkdir junkdir
64         $(ZIC) -P -d junkdir -p '$(POSIXRULES)' $(TZDATAFILES) | LANG=C sort | uniq >abbrevs.txt
65         rm -rf junkdir
66
67 installdirs:
68         $(MKDIR_P) '$(DESTDIR)$(datadir)'
69
70 uninstall:
71 ifeq (,$(with_system_tzdata))
72         rm -rf '$(DESTDIR)$(datadir)/timezone'
73 endif
74         $(MAKE) -C tznames $@
75
76 clean distclean maintainer-clean:
77         rm -f zic$(X) $(ZICOBJS) abbrevs.txt