Consistently use "superuser" instead of "super user"
[pgsql.git] / src / timezone / Makefile
blobfbbaae4cc57cb40716c696b713c856f7e88ae1df
1 #-------------------------------------------------------------------------
3 # Makefile
4 # Makefile for the timezone library
6 # IDENTIFICATION
7 # src/timezone/Makefile
9 #-------------------------------------------------------------------------
11 PGFILEDESC = "zic - time zone compiler"
12 PGAPPICON = win32
14 subdir = src/timezone
15 top_builddir = ../..
16 include $(top_builddir)/src/Makefile.global
18 # files to build into backend
19 OBJS = \
20 localtime.o \
21 pgtz.o \
22 strftime.o
24 # files needed to build zic utility program
25 ZICOBJS = \
26 $(WIN32RES) \
27 zic.o
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
33 ZIC_OPTIONS =
35 # use system timezone data?
36 ifneq (,$(with_system_tzdata))
37 override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
38 endif
40 include $(top_srcdir)/src/backend/common.mk
42 ifeq (,$(with_system_tzdata))
43 all: zic
44 endif
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.
50 ifeq (,$(ZIC))
51 ZIC= ./zic
52 endif
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)
60 endif
61 $(MAKE) -C tznames $@
63 # Note: -P code currently depends on '-b fat'. Not worth fixing right now.
64 abbrevs.txt: zic $(TZDATAFILES)
65 mkdir junkdir
66 $(ZIC) -P -b fat -d junkdir $(TZDATAFILES) | LANG=C sort | uniq >abbrevs.txt
67 rm -rf junkdir
69 installdirs:
70 $(MKDIR_P) '$(DESTDIR)$(datadir)'
72 uninstall:
73 ifeq (,$(with_system_tzdata))
74 rm -rf '$(DESTDIR)$(datadir)/timezone'
75 endif
76 $(MAKE) -C tznames $@
78 clean distclean maintainer-clean:
79 rm -f zic$(X) $(ZICOBJS) abbrevs.txt