~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-updates

« back to all changes in this revision

Viewing changes to src/timezone/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#-------------------------------------------------------------------------
 
2
#
 
3
# Makefile
 
4
#    Makefile for the timezone library
 
5
 
 
6
# IDENTIFICATION
 
7
#    $PostgreSQL$
 
8
#
 
9
#-------------------------------------------------------------------------
 
10
 
 
11
subdir = src/timezone
 
12
top_builddir = ../..
 
13
include $(top_builddir)/src/Makefile.global
 
14
 
 
15
# files to build into backend
 
16
OBJS= localtime.o strftime.o pgtz.o
 
17
 
 
18
# files needed to build zic utility program
 
19
ZICOBJS= zic.o ialloc.o scheck.o localtime.o
 
20
 
 
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/%)
 
25
 
 
26
# which zone should determine the DST rules (not the specific UTC offset!)
 
27
# for POSIX-style timezone specs
 
28
POSIXRULES = US/Eastern
 
29
 
 
30
# use system timezone data?
 
31
ifneq (,$(with_system_tzdata))
 
32
override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
 
33
endif
 
34
 
 
35
include $(top_srcdir)/src/backend/common.mk
 
36
 
 
37
ifeq (,$(with_system_tzdata))
 
38
all: submake-libpgport zic
 
39
endif
 
40
 
 
41
# We could do this test in the action section:
 
42
#       $(if $(ZIC),$(ZIC),./zic)
 
43
# but gmake versions <= 3.78.1 or perhaps later have a bug
 
44
# that causes a segfault;  gmake 3.81 or later fixes this.
 
45
ifeq (,$(ZIC))
 
46
ZIC= ./zic
 
47
endif
 
48
 
 
49
zic: $(ZICOBJS)
 
50
        $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
 
51
 
 
52
install: all installdirs
 
53
ifeq (,$(with_system_tzdata))
 
54
        $(ZIC) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)
 
55
endif
 
56
        $(MAKE) -C tznames $@
 
57
 
 
58
installdirs:
 
59
        $(mkinstalldirs) '$(DESTDIR)$(datadir)'
 
60
 
 
61
uninstall:
 
62
ifeq (,$(with_system_tzdata))
 
63
        rm -rf '$(DESTDIR)$(datadir)/timezone'
 
64
endif
 
65
        $(MAKE) -C tznames $@
 
66
 
 
67
clean distclean maintainer-clean:
 
68
        rm -f zic$(X) $(ZICOBJS)