aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/Makefile4
-rw-r--r--src/bin/initdb/Makefile14
-rw-r--r--src/bin/pg_config/Makefile19
-rw-r--r--src/bin/pg_controldata/Makefile9
-rw-r--r--src/bin/pg_ctl/Makefile11
-rw-r--r--src/bin/pg_dump/Makefile16
-rw-r--r--src/bin/pg_resetxlog/Makefile12
-rw-r--r--src/bin/psql/Makefile9
-rw-r--r--src/bin/scripts/Makefile27
-rw-r--r--src/interfaces/ecpg/preproc/Makefile21
-rw-r--r--src/port/Makefile49
-rw-r--r--src/timezone/Makefile13
12 files changed, 109 insertions, 95 deletions
diff --git a/src/backend/Makefile b/src/backend/Makefile
index e87356cc5af..4279a9a19db 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/backend/Makefile,v 1.104 2004/08/01 18:07:42 tgl Exp $
+# $PostgreSQL: pgsql/src/backend/Makefile,v 1.105 2004/10/04 13:43:54 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -26,6 +26,8 @@ ifeq ($(PORTNAME), qnx4)
OBJS+= bootstrap/bootstrap.o
endif
+# Use server version of port library
+LIBS := $(patsubst -lpgport,-lpgport_srv, $(LIBS))
##########################################################################
diff --git a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile
index 4fd7bc23f91..72e43f1435d 100644
--- a/src/bin/initdb/Makefile
+++ b/src/bin/initdb/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.44 2004/08/29 04:13:01 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.45 2004/10/04 13:43:55 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -13,21 +13,15 @@ subdir = src/bin/initdb
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
-OBJS= initdb.o dirmod.o exec.o
+OBJS= initdb.o
all: submake-libpq submake-libpgport initdb
initdb: $(OBJS) $(libpq_builddir)/libpq.a
$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)
-dirmod.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
-exec.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
install: all installdirs
$(INSTALL_PROGRAM) initdb$(X) $(DESTDIR)$(bindir)/initdb$(X)
@@ -38,7 +32,7 @@ uninstall:
rm -f $(DESTDIR)$(bindir)/initdb$(X)
clean distclean maintainer-clean:
- rm -f initdb$(X) $(OBJS) dirmod.c exec.c
+ rm -f initdb$(X) $(OBJS)
# ensure that changes in datadir propagate into object file
diff --git a/src/bin/pg_config/Makefile b/src/bin/pg_config/Makefile
index 472a32d0070..ac5421abaa8 100644
--- a/src/bin/pg_config/Makefile
+++ b/src/bin/pg_config/Makefile
@@ -1,18 +1,23 @@
-# $PostgreSQL: pgsql/src/bin/pg_config/Makefile,v 1.8 2004/08/01 06:56:38 momjian Exp $
+#-------------------------------------------------------------------------
+#
+# Makefile for src/bin/pg_controldata
+#
+# Copyright (c) 1998-2002, PostgreSQL Global Development Group
+#
+# $PostgreSQL: pgsql/src/bin/pg_config/Makefile,v 1.9 2004/10/04 13:43:55 momjian Exp $
+#
+#-------------------------------------------------------------------------
subdir = src/bin/pg_config
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-OBJS= pg_config.o exec.o
+OBJS= pg_config.o
-override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) -DVAL_CONFIGURE="\"$(configure_args)\"" $(CPPFLAGS)
+override CPPFLAGS := -I$(libpq_srcdir) -DVAL_CONFIGURE="\"$(configure_args)\"" $(CPPFLAGS)
all: submake-libpgport pg_config
-exec.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
pg_config: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
@@ -26,4 +31,4 @@ uninstall:
rm -f $(DESTDIR)$(bindir)/pg_config
clean distclean maintainer-clean:
- rm -f pg_config$(X) $(OBJS) exec.c
+ rm -f pg_config$(X) $(OBJS)
diff --git a/src/bin/pg_controldata/Makefile b/src/bin/pg_controldata/Makefile
index d98ed1831c9..e5e85f47429 100644
--- a/src/bin/pg_controldata/Makefile
+++ b/src/bin/pg_controldata/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1998-2002, PostgreSQL Global Development Group
#
-# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.9 2004/05/26 17:24:01 tgl Exp $
+# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.10 2004/10/04 13:43:55 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS += -DFRONTEND
-OBJS= pg_controldata.o pg_crc.o exec.o
+OBJS= pg_controldata.o pg_crc.o
all: submake-libpgport pg_controldata
@@ -24,9 +24,6 @@ pg_controldata: $(OBJS)
pg_crc.c: $(top_srcdir)/src/backend/utils/hash/pg_crc.c
rm -f $@ && $(LN_S) $< .
-exec.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
install: all installdirs
$(INSTALL_PROGRAM) pg_controldata$(X) $(DESTDIR)$(bindir)/pg_controldata$(X)
@@ -37,4 +34,4 @@ uninstall:
rm -f $(DESTDIR)$(bindir)/pg_controldata$(X)
clean distclean maintainer-clean:
- rm -f pg_controldata$(X) $(OBJS) pg_crc.c exec.c
+ rm -f pg_controldata$(X) $(OBJS) pg_crc.c
diff --git a/src/bin/pg_ctl/Makefile b/src/bin/pg_ctl/Makefile
index 538635b3cde..b268b0277d9 100644
--- a/src/bin/pg_ctl/Makefile
+++ b/src/bin/pg_ctl/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.15 2004/08/29 04:13:01 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.16 2004/10/04 13:43:56 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -13,18 +13,15 @@ subdir = src/bin/pg_ctl
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -DFRONTEND -DDEF_PGPORT=$(DEF_PGPORT) -I$(libpq_srcdir) $(CPPFLAGS)
+override CPPFLAGS := -DDEF_PGPORT=$(DEF_PGPORT) -I$(libpq_srcdir) $(CPPFLAGS)
-OBJS= pg_ctl.o exec.o
+OBJS= pg_ctl.o
all: submake-libpq submake-libpgport pg_ctl
pg_ctl: $(OBJS) $(libpq_builddir)/libpq.a
$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)
-exec.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
install: all installdirs
$(INSTALL_PROGRAM) pg_ctl$(X) $(DESTDIR)$(bindir)/pg_ctl$(X)
@@ -35,7 +32,7 @@ uninstall:
rm -f $(DESTDIR)$(bindir)/pg_ctl$(X)
clean distclean maintainer-clean:
- rm -f pg_ctl$(X) $(OBJS) exec.c
+ rm -f pg_ctl$(X) $(OBJS)
# ensure that changes in DEF_PGPORT propagate into object file
diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile
index 2a788b68de0..5d6dcdfeaa2 100644
--- a/src/bin/pg_dump/Makefile
+++ b/src/bin/pg_dump/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.52 2004/05/25 01:00:24 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.53 2004/10/04 13:43:56 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -13,11 +13,11 @@ subdir = src/bin/pg_dump
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -DFRONTEND
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \
pg_backup_files.o pg_backup_null.o pg_backup_tar.o \
- dumputils.o exec.o
+ dumputils.o
EXTRA_OBJS = $(top_builddir)/src/backend/parser/keywords.o
@@ -30,12 +30,8 @@ pg_dump: pg_dump.o common.o pg_dump_sort.o $(OBJS) $(libpq_builddir)/libpq.a
pg_restore: pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a
$(CC) $(CFLAGS) pg_restore.o $(OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)
-pg_dumpall: pg_dumpall.o dumputils.o exec.o $(libpq_builddir)/libpq.a
- $(CC) $(CFLAGS) pg_dumpall.o dumputils.o exec.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)
-
-# We need our own build of exec.c so it gets made with -DFRONTEND
-exec.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
+pg_dumpall: pg_dumpall.o dumputils.o $(libpq_builddir)/libpq.a
+ $(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)
.PHONY: submake-backend
submake-backend:
@@ -54,4 +50,4 @@ uninstall:
rm -f $(addprefix $(DESTDIR)$(bindir)/, pg_dump$(X) pg_restore$(X) pg_dumpall$(X))
clean distclean maintainer-clean:
- rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o exec.c
+ rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o
diff --git a/src/bin/pg_resetxlog/Makefile b/src/bin/pg_resetxlog/Makefile
index 424fb7655ff..76cc01c8194 100644
--- a/src/bin/pg_resetxlog/Makefile
+++ b/src/bin/pg_resetxlog/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1998-2002, PostgreSQL Global Development Group
#
-# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.11 2004/08/01 06:22:38 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.12 2004/10/04 13:43:57 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -14,22 +14,16 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS += -DFRONTEND
-OBJS= pg_resetxlog.o pg_crc.o dirmod.o exec.o
+OBJS= pg_resetxlog.o pg_crc.o
all: submake-libpgport pg_resetxlog
pg_resetxlog: $(OBJS)
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LIBS) -o $@$(X)
-dirmod.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
pg_crc.c: $(top_srcdir)/src/backend/utils/hash/pg_crc.c
rm -f $@ && $(LN_S) $< .
-exec.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
install: all installdirs
$(INSTALL_PROGRAM) pg_resetxlog$(X) $(DESTDIR)$(bindir)/pg_resetxlog$(X)
@@ -40,4 +34,4 @@ uninstall:
rm -f $(DESTDIR)$(bindir)/pg_resetxlog$(X)
clean distclean maintainer-clean:
- rm -f pg_resetxlog$(X) $(OBJS) pg_crc.c dirmod.c exec.c
+ rm -f pg_resetxlog$(X) $(OBJS) pg_crc.c
diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile
index 08dbe25d8d3..b2e8ef9e08c 100644
--- a/src/bin/psql/Makefile
+++ b/src/bin/psql/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.47 2004/05/24 01:01:37 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.48 2004/10/04 13:43:57 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -19,7 +19,7 @@ override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -DFRONTEND
OBJS= command.o common.o help.o input.o stringutils.o mainloop.o copy.o \
startup.o prompt.o variables.o large_obj.o print.o describe.o \
- psqlscan.o tab-complete.o mbprint.o exec.o
+ psqlscan.o tab-complete.o mbprint.o
FLEXFLAGS = -Cfe
@@ -29,9 +29,6 @@ all: submake-libpq submake-libpgport psql
psql: $(OBJS) $(libpq_builddir)/libpq.a
$(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)
-exec.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
help.o: $(srcdir)/sql_help.h
ifdef PERL
@@ -63,7 +60,7 @@ uninstall:
# psqlscan.c is in the distribution tarball, so is not cleaned here
clean distclean:
- rm -f psql$(X) $(OBJS) exec.c
+ rm -f psql$(X) $(OBJS)
maintainer-clean: distclean
rm -f $(srcdir)/sql_help.h $(srcdir)/psqlscan.c
diff --git a/src/bin/scripts/Makefile b/src/bin/scripts/Makefile
index b0e1f95f1b8..5fabec4f86c 100644
--- a/src/bin/scripts/Makefile
+++ b/src/bin/scripts/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/scripts/Makefile,v 1.28 2004/05/26 17:24:05 tgl Exp $
+# $PostgreSQL: pgsql/src/bin/scripts/Makefile,v 1.29 2004/10/04 13:43:57 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -15,28 +15,25 @@ include $(top_builddir)/src/Makefile.global
PROGRAMS = createdb createlang createuser dropdb droplang dropuser clusterdb vacuumdb
-override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir) $(CPPFLAGS)
+override CPPFLAGS := -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir) $(CPPFLAGS)
all: submake-libpq submake-backend $(PROGRAMS)
%: %.o
$(CC) $(CFLAGS) $^ $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)
-createdb: createdb.o common.o exec.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
-createlang: createlang.o common.o exec.o print.o mbprint.o
-createuser: createuser.o common.o exec.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
-dropdb: dropdb.o common.o exec.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
-droplang: droplang.o common.o exec.o print.o mbprint.o
-dropuser: dropuser.o common.o exec.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
-clusterdb: clusterdb.o common.o exec.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
-vacuumdb: vacuumdb.o common.o exec.o
+createdb: createdb.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+createlang: createlang.o common.o print.o mbprint.o
+createuser: createuser.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+dropdb: dropdb.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+droplang: droplang.o common.o print.o mbprint.o
+dropuser: dropuser.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+clusterdb: clusterdb.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
+vacuumdb: vacuumdb.o common.o
dumputils.c: % : $(top_srcdir)/src/bin/pg_dump/%
rm -f $@ && $(LN_S) $< .
-exec.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
print.c mbprint.c : % : $(top_srcdir)/src/bin/psql/%
rm -f $@ && $(LN_S) $< .
@@ -64,5 +61,5 @@ uninstall:
clean distclean maintainer-clean:
rm -f $(addsuffix $(X), $(PROGRAMS)) $(addsuffix .o, $(PROGRAMS))
- rm -f common.o dumputils.o exec.o print.o mbprint.o
- rm -f dumputils.c exec.c print.c mbprint.c
+ rm -f common.o dumputils.o print.o mbprint.o
+ rm -f dumputils.c print.c mbprint.c
diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile
index 53aaa87db54..5efc17c4df6 100644
--- a/src/interfaces/ecpg/preproc/Makefile
+++ b/src/interfaces/ecpg/preproc/Makefile
@@ -1,4 +1,12 @@
-# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.107 2004/05/24 01:01:38 momjian Exp $
+#-------------------------------------------------------------------------
+#
+# Makefile for src/interfaces/ecpg/preproc
+#
+# Copyright (c) 1998-2002, PostgreSQL Global Development Group
+#
+# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.108 2004/10/04 13:43:58 momjian Exp $
+#
+#-------------------------------------------------------------------------
subdir = src/interfaces/ecpg/preproc
top_builddir = ../../../..
@@ -10,8 +18,7 @@ PATCHLEVEL=0
override CPPFLAGS := -I$(srcdir)/../include -I$(srcdir) $(CPPFLAGS) \
-DMAJOR_VERSION=$(MAJOR_VERSION) \
- -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
- -DFRONTEND
+ -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL)
ifeq ($(GCC), yes)
override CFLAGS += -Wno-error
@@ -19,17 +26,13 @@ endif
override CFLAGS += $(PTHREAD_CFLAGS)
OBJS= preproc.o type.o ecpg.o ecpg_keywords.o output.o\
- keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o \
- exec.o
+ keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o
all: submake-libpgport ecpg
ecpg: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(PTHREAD_LIBS) -o $@$(X)
-exec.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
# pgc is compiled as part of preproc
preproc.o: $(srcdir)/pgc.c
@@ -66,7 +69,7 @@ uninstall:
rm -f $(DESTDIR)$(bindir)/ecpg$(X)
clean distclean:
- rm -f *.o ecpg$(X) exec.c
+ rm -f *.o ecpg$(X)
# garbage from partial builds
@rm -f y.tab.c y.tab.h
# garbage from development
diff --git a/src/port/Makefile b/src/port/Makefile
index a5cc24c3865..c9c66b9129f 100644
--- a/src/port/Makefile
+++ b/src/port/Makefile
@@ -1,13 +1,21 @@
#-------------------------------------------------------------------------
#
-# Makefile--
+# Makefile
# Makefile for the port-specific subsystem of the backend
#
# These files are used in other directories for portability on systems
-# with broken/missing library files.
-
+# with broken/missing library files, and for common code sharing.
+#
+# This makefile generates two outputs:
+#
+# libpgport.a - contains object files with FRONTEND defined,
+# for use by client application and libraries
+#
+# libpgport_srv.a - contains object files without FRONTEND defined,
+# for use only by the backend binaries
+#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/port/Makefile,v 1.18 2004/08/28 22:55:06 momjian Exp $
+# $PostgreSQL: pgsql/src/port/Makefile,v 1.19 2004/10/04 13:43:58 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -15,10 +23,17 @@ subdir = src/port
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -I$(top_builddir)/src/port $(CPPFLAGS)
+override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
LIBS += $(PTHREAD_LIBS)
-all: libpgport.a
+# Replace object files that use FRONTEND define
+LIBOBJS_SRV := $(LIBOBJS)
+LIBOBJS_SRV := $(patsubst dirmod.o,dirmod_srv.o, $(LIBOBJS_SRV))
+LIBOBJS_SRV := $(patsubst exec.o,exec_srv.o, $(LIBOBJS_SRV))
+LIBOBJS_SRV := $(patsubst getaddrinfo.o,getaddrinfo_srv.o, $(LIBOBJS_SRV))
+LIBOBJS_SRV := $(patsubst thread.o,thread_srv.o, $(LIBOBJS_SRV))
+
+all: libpgport.a libpgport_srv.a
# libpgport is needed by some contrib
install-all-headers:
@@ -35,6 +50,26 @@ thread.o: thread.c
path.o: path.c pg_config_paths.h
+#
+# Server versions of object files
+#
+
+libpgport_srv.a: $(LIBOBJS_SRV)
+ $(AR) $(AROPT) $@ $^
+
+dirmod_srv.o: dirmod.c
+ $(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@
+
+exec_srv.o: exec.c
+ $(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@
+
+getaddrinfo_srv.o: getaddrinfo.c
+ $(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@
+
+# No thread flags for server version
+thread_srv.o: thread.c
+ $(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@
+
# Dependency is to ensure that path changes propagate
pg_config_paths.h: $(top_builddir)/src/Makefile.global
echo "#define PGBINDIR \"$(bindir)\"" >$@
@@ -48,4 +83,4 @@ pg_config_paths.h: $(top_builddir)/src/Makefile.global
echo "#define LOCALEDIR \"$(localedir)\"" >>$@
clean distclean maintainer-clean:
- rm -f libpgport.a $(LIBOBJS) pg_config_paths.h
+ rm -f libpgport.a libpgport_srv.a $(LIBOBJS) $(LIBOBJS_SRV) pg_config_paths.h
diff --git a/src/timezone/Makefile b/src/timezone/Makefile
index f9386cd12bb..c704235917a 100644
--- a/src/timezone/Makefile
+++ b/src/timezone/Makefile
@@ -1,10 +1,10 @@
#-------------------------------------------------------------------------
#
-# Makefile--
+# Makefile
# Makefile for the timezone library
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.15 2004/08/08 05:19:44 momjian Exp $
+# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.16 2004/10/04 13:43:59 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -12,13 +12,13 @@ subdir = src/timezone
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
+override CPPFLAGS := $(CPPFLAGS)
# files to build into backend
OBJS= localtime.o strftime.o pgtz.o
# files needed to build zic utility program
-ZICOBJS= zic.o ialloc.o scheck.o localtime.o dirmod.o
+ZICOBJS= zic.o ialloc.o scheck.o localtime.o
# timezone data files
TZDATA := africa antarctica asia australasia europe northamerica southamerica \
@@ -33,9 +33,6 @@ SUBSYS.o: $(OBJS)
zic: $(ZICOBJS)
$(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
-dirmod.c: % : $(top_srcdir)/src/port/%
- rm -f $@ && $(LN_S) $< .
-
install: all installdirs
./zic -d $(DESTDIR)$(datadir)/timezone $(TZDATAFILES)
@@ -43,4 +40,4 @@ installdirs:
$(mkinstalldirs) $(DESTDIR)$(datadir)
clean distclean maintainer-clean:
- rm -f SUBSYS.o zic $(OBJS) $(ZICOBJS) dirmod.c
+ rm -f SUBSYS.o zic $(OBJS) $(ZICOBJS)