From b0c3c48eb3779d9637a03c455f3934d9d7c08030 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 27 Jul 2002 20:10:05 +0000 Subject: Assemble portability modules into libpgport library. Some makefile simplifications. --- src/interfaces/ecpg/preproc/Makefile | 15 +++------------ src/interfaces/libpgtcl/Makefile | 8 ++------ src/interfaces/libpq++/examples/Makefile | 4 +--- src/interfaces/libpq/Makefile | 18 +++--------------- 4 files changed, 9 insertions(+), 36 deletions(-) (limited to 'src/interfaces') diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile index 212b3cc8a6a..0057c0010bf 100644 --- a/src/interfaces/ecpg/preproc/Makefile +++ b/src/interfaces/ecpg/preproc/Makefile @@ -1,4 +1,4 @@ -# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.84 2002/07/15 21:34:05 momjian Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.85 2002/07/27 20:10:05 petere Exp $ subdir = src/interfaces/ecpg/preproc top_builddir = ../../../.. @@ -18,10 +18,9 @@ override CFLAGS += -Wno-error endif OBJS=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\ - keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o \ - $(SNPRINTF) $(STRDUP) + keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o -all: ecpg +all: submake-libpgport ecpg ecpg: $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@ @@ -70,11 +69,3 @@ clean distclean: # inadequate tools. maintainer-clean: distclean rm -f $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c - - -depend dep: preproc.c pgc.c - $(CC) -MM $(CFLAGS) *.c >depend - -ifeq (depend,$(wildcard depend)) -include depend -endif diff --git a/src/interfaces/libpgtcl/Makefile b/src/interfaces/libpgtcl/Makefile index 32b21685511..09fb7bca5ec 100644 --- a/src/interfaces/libpgtcl/Makefile +++ b/src/interfaces/libpgtcl/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.26 2001/05/11 01:46:33 momjian Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.27 2002/07/27 20:10:05 petere Exp $ # #------------------------------------------------------------------------- @@ -27,11 +27,7 @@ SHLIB_LINK = $(libpq) # braindead; users of libpq should not need to know what it depends on.) SHLIB_LINK+= $(filter -L%, $(LDFLAGS)) $(filter -lcrypt, $(LIBS)) -all: submake all-lib - -.PHONY: submake -submake: - $(MAKE) -C $(libpq_builddir) all +all: submake-libpq all-lib # Shared library stuff include $(top_srcdir)/src/Makefile.shlib diff --git a/src/interfaces/libpq++/examples/Makefile b/src/interfaces/libpq++/examples/Makefile index d2e9b16a03e..5f4fa65f8bd 100644 --- a/src/interfaces/libpq++/examples/Makefile +++ b/src/interfaces/libpq++/examples/Makefile @@ -5,7 +5,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/interfaces/libpq++/examples/Attic/Makefile,v 1.14 2002/06/20 20:29:54 momjian Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpq++/examples/Attic/Makefile,v 1.15 2002/07/27 20:10:05 petere Exp $ # #------------------------------------------------------------------------- @@ -31,8 +31,6 @@ all: $(PROGS) $(PROGS): % : %.cc $(CXX) $(CXXFLAGS) -o $@ $@.cc $(LDFLAGS) -.PHONY: submake - clean: rm -f $(PROGS) diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile index 5700a95a773..804360f07b8 100644 --- a/src/interfaces/libpq/Makefile +++ b/src/interfaces/libpq/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.63 2002/07/18 03:59:49 momjian Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.64 2002/07/27 20:10:05 petere Exp $ # #------------------------------------------------------------------------- @@ -22,7 +22,7 @@ override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) -DFRONTEND -DSYSCONFDIR='"$(sysconf OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \ pqexpbuffer.o dllist.o md5.o pqsignal.o fe-secure.o \ - $(notdir $(INET_ATON)) $(notdir $(SNPRINTF)) $(notdir $(STRERROR)) + $(filter inet_aton.o snprintf.o strerror.o, $(LIBOBJS)) ifdef MULTIBYTE OBJS+= wchar.o encnames.o @@ -54,20 +54,8 @@ md5.c: $(backend_src)/libpq/md5.c # symlink the source files in here and build our own object file. # this only gets done if configure finds system doesn't have inet_aton() -ifdef INET_ATON -$(basename $(notdir $(INET_ATON))).c: $(basename $(INET_ATON)).c +inet_aton.c snprintf.c strerror.c: %.c : $(top_srcdir)/src/port/%.c rm -f $@ && $(LN_S) $< . -endif - -ifdef SNPRINTF -$(basename $(notdir $(SNPRINTF))).c: $(basename $(SNPRINTF)).c - rm -f $@ && $(LN_S) $< . -endif - -ifdef STRERROR -$(basename $(notdir $(STRERROR))).c: $(basename $(STRERROR)).c - rm -f $@ && $(LN_S) $< . -endif ifdef MULTIBYTE wchar.c : % : $(backend_src)/utils/mb/% -- cgit v1.2.3