1 #-------------------------------------------------------------------------
4 # Makefile for the timezone library
7 # src/timezone/Makefile
9 #-------------------------------------------------------------------------
11 PGFILEDESC
= "zic - time zone compiler"
16 include $(top_builddir
)/src
/Makefile.global
18 # files to build into backend
24 # files needed to build zic utility program
29 # we now distribute the timezone data as a single file
30 TZDATAFILES
= $(srcdir)/data
/tzdata.zi
32 # any custom options you might want to pass to zic while installing data files
35 # use system timezone data?
36 ifneq (,$(with_system_tzdata
))
37 override CPPFLAGS
+= '-DSYSTEMTZDIR="$(with_system_tzdata)"'
40 include $(top_srcdir
)/src
/backend
/common.mk
42 ifeq (,$(with_system_tzdata
))
46 # We could do this test in the action section:
47 # $(if $(ZIC),$(ZIC),./zic)
48 # but GNU make versions <= 3.78.1 or perhaps later have a bug
49 # that causes a segfault; GNU make 3.81 or later fixes this.
54 zic
: $(ZICOBJS
) | submake-libpgport
55 $(CC
) $(CFLAGS
) $(ZICOBJS
) $(LDFLAGS
) $(LDFLAGS_EX
) $(LIBS
) -o
$@
$(X
)
57 install: all installdirs
58 ifeq (,$(with_system_tzdata
))
59 $(ZIC
) -d
'$(DESTDIR)$(datadir)/timezone' $(ZIC_OPTIONS
) $(TZDATAFILES
)
63 # Note: -P code currently depends on '-b fat'. Not worth fixing right now.
64 abbrevs.txt
: zic
$(TZDATAFILES
)
66 $(ZIC
) -P
-b fat
-d junkdir
$(TZDATAFILES
) | LANG
=C
sort | uniq
>abbrevs.txt
70 $(MKDIR_P
) '$(DESTDIR)$(datadir)'
73 ifeq (,$(with_system_tzdata
))
74 rm -rf
'$(DESTDIR)$(datadir)/timezone'
78 clean distclean maintainer-clean
:
79 rm -f zic
$(X
) $(ZICOBJS
) abbrevs.txt