]> granicus.if.org Git - postgresql/commitdiff
Fix zic compiler to use pg version.
authorBruce Momjian <bruce@momjian.us>
Fri, 30 Apr 2004 20:23:28 +0000 (20:23 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 30 Apr 2004 20:23:28 +0000 (20:23 +0000)
Move timezone database to share/timezone.

src/timezone/Makefile
src/timezone/pgtz.c

index d0e7490d655b5a74e806ef93c5e6b1598f4e4bd7..ee3e15a120407b942c2c4aeeaeaf442c30c26834 100644 (file)
@@ -4,7 +4,7 @@
 #    Makefile for the timezone library
 
 # IDENTIFICATION
-#    $PostgreSQL: pgsql/src/timezone/Makefile,v 1.6 2004/04/30 20:01:39 momjian Exp $
+#    $PostgreSQL: pgsql/src/timezone/Makefile,v 1.7 2004/04/30 20:23:28 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -12,7 +12,7 @@ subdir = src/timezone
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-override CPPFLAGS += -DPKGLIBDIR=\"$(pkglibdir)\"
+override CPPFLAGS += -DPGDATADIR=\"$(datadir)\"
 
 OBJS= asctime.o difftime.o localtime.o pgtz.o
 ZICOBJS= zic.o ialloc.o scheck.o localtime.o asctime.o pgtz.o
@@ -30,7 +30,7 @@ zic: $(ZICOBJS)
        $(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
 
 install: zic
-       ./zic -d $(pkglibdir)/../timezone $(TZDATAFILES)
+       ./zic -d $(DESTDIR)$(datadir)/timezone $(TZDATAFILES)
 
 clean distclean maintainer-clean:
        rm -f SUBSYS.o $(OBJS) $(ZICOBJS)
index 8e94fc8c6c5701b6b73d53bf6ed3c483450bc48e..efa9b4119ea2a6e7e0f594f12b56ff19f77c051e 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.2 2004/04/30 14:24:14 momjian Exp $
+ *       $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.3 2004/04/30 20:23:28 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -23,7 +23,7 @@ char *pgwin32_TZDIR(void) {
                return tzdir;
 
 #ifndef WIN32
-       StrNCpy(tzdir,PKGLIBDIR, MAXPGPATH);
+       StrNCpy(tzdir, PGDATADIR, MAXPGPATH);
 #else
        if (GetModuleFileName(NULL,tzdir,MAXPGPATH) == 0)
                return NULL;
@@ -35,7 +35,7 @@ char *pgwin32_TZDIR(void) {
        else
                *p = '\0';
        
-       strcat(tzdir,"/../timezone");
+       strcat(tzdir,"/timezone");
 
        done_tzdir=1;
        return tzdir;