Commit 44f64dd3 authored by Peter Eisentraut's avatar Peter Eisentraut

Makefile cleanup for interface tree. Now essentially with all the

standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
parent 5ac1eac2
#
# PostgreSQL top level makefile
#
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.5 2000/06/14 18:17:24 petere Exp $
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.6 2000/06/28 18:29:11 petere Exp $
#
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
subdir =
top_builddir = .
include src/Makefile.global
all:
$(MAKE) -C src all
......@@ -19,17 +16,17 @@ install:
$(MAKE) -C src install
@cat $(srcdir)/register.txt
installdirs uninstall:
$(MAKE) -C src $@
clean:
$(MAKE) -C src clean
distclean:
-$(MAKE) -C src distclean
distclean maintainer-clean:
-$(MAKE) -C src $@
-rm -f config.cache config.log config.status GNUmakefile
.PHONY: all install clean distclean
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
......
......@@ -2363,7 +2363,7 @@ INSTALL_SHLIB="\${INSTALL} $INSTL_SHLIB_OPTS"
for ac_prog in mawk gawk nawk awk
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
......@@ -8883,16 +8883,6 @@ trap 'rm -fr `echo "GNUmakefile
src/bin/pgtclsh/mkMakefile.tcldefs.sh
src/bin/pgtclsh/mkMakefile.tkdefs.sh
src/include/version.h
src/interfaces/Makefile
src/interfaces/libpq/Makefile
src/interfaces/ecpg/lib/Makefile
src/interfaces/ecpg/preproc/Makefile
src/interfaces/perl5/GNUmakefile
src/interfaces/libpq++/Makefile
src/interfaces/libpgeasy/Makefile
src/interfaces/libpgtcl/Makefile
src/interfaces/odbc/GNUmakefile
src/interfaces/python/GNUmakefile
src/pl/tcl/mkMakefile.tcldefs.sh
src/test/regress/GNUmakefile
src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
......@@ -9067,16 +9057,6 @@ CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile
src/bin/pgtclsh/mkMakefile.tcldefs.sh
src/bin/pgtclsh/mkMakefile.tkdefs.sh
src/include/version.h
src/interfaces/Makefile
src/interfaces/libpq/Makefile
src/interfaces/ecpg/lib/Makefile
src/interfaces/ecpg/preproc/Makefile
src/interfaces/perl5/GNUmakefile
src/interfaces/libpq++/Makefile
src/interfaces/libpgeasy/Makefile
src/interfaces/libpgtcl/Makefile
src/interfaces/odbc/GNUmakefile
src/interfaces/python/GNUmakefile
src/pl/tcl/mkMakefile.tcldefs.sh
src/test/regress/GNUmakefile
"}
......
......@@ -1202,16 +1202,6 @@ AC_OUTPUT(
src/bin/pgtclsh/mkMakefile.tcldefs.sh
src/bin/pgtclsh/mkMakefile.tkdefs.sh
src/include/version.h
src/interfaces/Makefile
src/interfaces/libpq/Makefile
src/interfaces/ecpg/lib/Makefile
src/interfaces/ecpg/preproc/Makefile
src/interfaces/perl5/GNUmakefile
src/interfaces/libpq++/Makefile
src/interfaces/libpgeasy/Makefile
src/interfaces/libpgtcl/Makefile
src/interfaces/odbc/GNUmakefile
src/interfaces/python/GNUmakefile
src/pl/tcl/mkMakefile.tcldefs.sh
src/test/regress/GNUmakefile
)
......@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.53 2000/06/27 00:30:48 petere Exp $
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.54 2000/06/28 18:29:13 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -56,7 +56,7 @@ distclean maintainer-clean:
rm -f backend/port/Makefile backend/catalog/genbki.sh \
backend/utils/Gen_fmgrtab.sh \
backend/port/tas.s backend/port/dynloader.c
-$(MAKE) -C interfaces distclean
-$(MAKE) -C interfaces $@
-$(MAKE) -C bin $@
-$(MAKE) -C pl $@
-$(MAKE) -C test clean
......
......@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.81 2000/06/27 00:30:48 petere Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.82 2000/06/28 18:29:13 petere Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
......@@ -86,6 +86,8 @@ localstatedir = @localstatedir@
libdir = @libdir@
includedir = @includedir@
odbcinst_ini_dir = @odbcinst_ini_dir@
# old variable names for installation directories
POSTGRESDIR= $(prefix)
......@@ -112,7 +114,14 @@ ENFORCE_ALIGNMENT= true
#PROFILE= -p -non_shared
with_CXX = @with_CXX@
with_perl = @with_perl@
enable_odbc = @enable_odbc@
with_python = @with_python@
PYTHON = @PYTHON@
python_extmakefile = @python_extmakefile@
python_moduledir = @python_moduledir@
#
# Please do not edit USE_TCL and USE_TK by hand.
......@@ -172,6 +181,8 @@ LN_S= @LN_S@
TAR= @tar@
GZCAT= @GZCAT@
PERL = @PERL@
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@ @INCLUDES@
##############################################################################
......@@ -260,10 +271,10 @@ endif
# substitute implementations of the C library
INET_ATON = @INET_ATON@
STRERROR = @STRERROR@
STRERROR2 = @STRERROR2@
SNPRINTF = @SNPRINTF@
STRDUP = @STRDUP@
.DEFAULT: all
.PHONY: all install installdirs uninstall dep depend clean distclean maintainer-clean
This diff is collapsed.
......@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.15 2000/06/27 00:31:12 petere Exp $
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.16 2000/06/28 18:29:16 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -27,7 +27,7 @@ pg_dump$(X): $(OBJS) $(LIBPQDIR)/libpq.a
.PHONY: submake
submake:
$(MAKE) -C $(LIBPQDIR) libpq.a
$(MAKE) -C $(LIBPQDIR) all
install: all installdirs
$(INSTALL_PROGRAM) pg_dump$(X) $(bindir)/pg_dump$(X)
......
......@@ -4,7 +4,7 @@
#
# Copyright (c) 1998, PostgreSQL Global Development Group
#
# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.8 2000/06/27 00:31:17 petere Exp $
# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.9 2000/06/28 18:29:21 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -22,7 +22,7 @@ pg_encoding$(X): $(OBJS)
.PHONY: submake
submake:
$(MAKE) -C $(LIBPQDIR) libpq.a
$(MAKE) -C $(LIBPQDIR) all
install: all installdirs
$(INSTALL_PROGRAM) pg_encoding$(X) $(bindir)/pg_encoding$(X)
......
......@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.9 2000/06/27 00:31:34 petere Exp $
# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.10 2000/06/28 18:29:22 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -22,10 +22,10 @@ pgaccess: pgaccess.sh
install: all installdirs
$(INSTALL_SCRIPT) pgaccess $(bindir)/pgaccess
$(INSTALL_SCRIPT) main.tcl $(pgaccessdir)
$(INSTALL_DATA) lib/*.tcl $(pgaccessdir)/lib
$(INSTALL_DATA) lib/help/*.hlp $(pgaccessdir)/lib/help
$(INSTALL_DATA) lib/languages/[a-z]* $(pgaccessdir)/lib/languages
$(INSTALL_DATA) images/*.gif $(pgaccessdir)/images
for i in lib/*.tcl; do $(INSTALL_DATA) $$i $(pgaccessdir)/lib || exit 1; done
for i in lib/help/*.hlp; do $(INSTALL_DATA) $$i $(pgaccessdir)/lib/help || exit 1; done
for i in lib/languages/[a-z]*; do $(INSTALL_DATA) $$i $(pgaccessdir)/lib/languages || exit 1; done
for i in images/*.gif; do $(INSTALL_DATA) $$i $(pgaccessdir)/images || exit 1; done
installdirs:
$(mkinstalldirs) $(bindir) $(pgaccessdir)/lib/help $(pgaccessdir)/lib/languages $(pgaccessdir)/images
......
......@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.21 2000/06/27 00:31:41 petere Exp $
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.22 2000/06/28 18:29:31 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -63,7 +63,7 @@ endif
.PHONY: submake
submake:
$(MAKE) -C $(LIBPQDIR) libpq.a
$(MAKE) -C $(LIBPQDIR) all
install: all installdirs
$(INSTALL_PROGRAM) psql$(X) $(bindir)/psql$(X)
......
......@@ -4,61 +4,44 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/interfaces/Attic/Makefile.in,v 1.4 2000/06/20 16:39:54 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.40 2000/06/28 18:29:35 petere Exp $
#
#-------------------------------------------------------------------------
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../..
subdir = src/interfaces
top_builddir = ../..
include ../Makefile.global
DIRS := libpq ecpg libpgeasy
USE_TCL = @USE_TCL@
enable_odbc = @enable_odbc@
with_CXX = @with_CXX@
with_perl = @with_perl@
with_python = @with_python@
ALLDIRS := $(DIRS) odbc libpq++ libpgtcl perl5 python
ifeq ($(enable_odbc), yes)
DIRS += odbc
endif
all install clean dep depend:
$(MAKE) -C libpq $@
$(MAKE) -C ecpg $@
ifeq ($(with_CXX), yes)
$(MAKE) -C libpq++ $@
DIRS += libpq++
endif
$(MAKE) -C libpgeasy $@
ifeq ($(USE_TCL), true)
$(MAKE) -C libpgtcl $@
DIRS += libpgtcl
endif
ifeq ($(with_perl), yes)
$(MAKE) -C perl5 $@
DIRS += perl5
endif
ifeq ($(with_python), yes)
$(MAKE) -C python $@
endif
ifeq ($(enable_odbc), yes)
$(MAKE) -C odbc $@
DIRS += python
endif
distclean maintainer-clean: clean
-$(MAKE) -C perl5 $@
-$(MAKE) -C python $@
-$(MAKE) -C odbc $@
rm -f Makefile \
libpq/Makefile \
ecpg/lib/Makefile \
ecpg/preproc/Makefile \
libpq++/Makefile \
libpgeasy/Makefile \
libpgtcl/Makefile
.PHONY: all install dep depend clean distclean maintainer-clean
all install installdirs uninstall dep depend:
@for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit 1; done
clean:
@for dir in $(DIRS); do $(MAKE) -C $$dir $@; done
Makefile: Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
$(top_builddir)/config.status: $(top_srcdir)/configure
cd $(top_builddir) && ./config.status --recheck
distclean maintainer-clean: clean
@for dir in $(ALLDIRS); do $(MAKE) -C $$dir $@; done
all install uninstall clean dep depend:
subdir = src/interfaces/ecpg
top_builddir = ../../..
include ../../Makefile.global
all install installdirs uninstall dep depend:
$(MAKE) -C include $@
$(MAKE) -C lib $@
$(MAKE) -C preproc $@
clean distclean maintainer-clean:
-$(MAKE) -C include $@
-$(MAKE) -C lib $@
-$(MAKE) -C preproc $@
# Generated automatically from Makefile.in by configure.
SRCDIR= ../../..
include $(SRCDIR)/Makefile.global
subdir = src/interfaces/ecpg/include
top_builddir = ../../../..
include ../../../Makefile.global
all clean::
@echo Nothing to be done.
install: all installdirs install-headers
install::
$(INSTALL) $(INSTLOPTS) ecpgerrno.h $(HEADERDIR)
$(INSTALL) $(INSTLOPTS) ecpglib.h $(HEADERDIR)
$(INSTALL) $(INSTLOPTS) ecpgtype.h $(HEADERDIR)
$(INSTALL) $(INSTLOPTS) sqlca.h $(HEADERDIR)
$(INSTALL) $(INSTLOPTS) sql3types.h $(HEADERDIR)
.PHONY: install-headers
ecpg_headers = ecpgerrno.h ecpglib.h ecpgtype.h sqlca.h sql3types.h
install-headers: $(ecpg_headers)
for i in $^; do $(INSTALL_DATA) $$i $(includedir); done
uninstall::
rm -f $(HEADERDIR)/ecpgerrno.h
rm -f $(HEADERDIR)/ecpglib.h
rm -f $(HEADERDIR)/ecpgtype.h
rm -f $(HEADERDIR)/sqlca.h
rm -f $(HEADERDIR)/sql3types.h
installdirs:
$(mkinstalldirs) $(includedir)
dep depend:
uninstall:
rm -f $(addprefix $(includedir)/, $(ecpg_headers))
#-------------------------------------------------------------------------
#
# Makefile
# Makefile for ecpg library
# Makefile for ecpg library
#
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.68 2000/06/17 00:09:59 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile,v 1.6 2000/06/28 18:29:39 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/interfaces/ecpg/lib
top_builddir = ../../../..
include ../../../Makefile.global
NAME= ecpg
SO_MAJOR_VERSION= 3
SO_MINOR_VERSION= 1.1
SRCDIR= ../../..
include $(SRCDIR)/Makefile.global
CFLAGS+= -I../include -I$(LIBPQDIR)
CFLAGS+= -I$(top_srcdir)/src/interfaces/ecpg/include -I$(LIBPQDIR)
OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
......@@ -25,18 +24,20 @@ OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
SHLIB_LINK= $(LIBPQ)
# Shared library stuff, also default 'all' target
include $(SRCDIR)/Makefile.shlib
all: all-lib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
.PHONY: install
install: all installdirs install-lib
install: install-lib $(install-shlib-dep)
installdirs:
$(mkinstalldirs) $(libdir)
.PHONY: clean
uninstall: uninstall-lib
clean: clean-shlib
rm -f lib$(NAME).a $(OBJS)
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
......
SRCDIR= ../../..
include $(SRCDIR)/Makefile.global
subdir = src/interfaces/ecpg/preproc
top_builddir = ../../../..
include ../../../Makefile.global
MAJOR_VERSION=2
MINOR_VERSION=7
......@@ -7,45 +8,55 @@ PATCHLEVEL=1
CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
-DINCLUDE_PATH=\"$(HEADERDIR)\"
-DINCLUDE_PATH=\"$(includedir)\"
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
all:: ecpg
all: ecpg
ifneq (@SNPRINTF@,)
OBJS+=$(SRCDIR)/backend/port/snprintf.o
ifdef SNPRINTF
OBJS+=$(top_builddir)/src/backend/port/snprintf.o
$(SRCDIR)/backend/port/snprintf.o:
$(MAKE) -C $(SRCDIR)/backend/port snprintf.o
$(top_builddir)/src/backend/port/snprintf.o:
$(MAKE) -C $(top_builddir)/src/backend/port snprintf.o
endif
# Rule that really do something.
ecpg: $(OBJS)
$(CC) -o ecpg $(OBJS) $(LEXLIB) $(LDFLAGS)
$(CC) -o $@ $^ $(LDFLAGS)
preproc.c preproc.h: preproc.y
$(srcdir)/preproc.c $(srcdir)/preproc.h: preproc.y
$(YACC) -d $(YFLAGS) $<
mv y.tab.c preproc.c
mv y.tab.h preproc.h
mv y.tab.c $(srcdir)/preproc.c
mv y.tab.h $(srcdir)/preproc.h
pgc.c: pgc.l
$(srcdir)/pgc.c: pgc.l
$(LEX) $(LFLAGS) $<
mv lex.yy.c pgc.c
mv lex.yy.c $@
clean:
rm -f *.o core a.out ecpg$(X) *~ *.output *.tab.c
# And the garbage that might have been left behind by partial build:
rm -f y.tab.c y.tab.h lex.yy.c
# make clean does not remove preproc.c, preproc.h, pgc.c since we want
# to ship those files in the distribution, for people with inadequate tools.
install: all installdirs
$(INSTALL_PROGRAM) ecpg$(X) $(bindir)
install: all
$(INSTALL) $(INSTL_EXE_OPTS) ecpg$(X) $(BINDIR)
installdirs:
$(mkinstalldirs) $(bindir)
uninstall:
rm -f $(BINDIR)/ecpg
rm -f $(bindir)/ecpg$(X)
clean distclean:
rm -f *.o ecpg$(X)
# garbage from partial builds
rm -f y.tab.c y.tab.h lex.yy.c
# garbage from development
@rm -f core a.out *~ *.output *.tab.c
# `make clean' does not remove preproc.c, preproc.h, or pgc.c since we
# want to ship those files in the distribution for people with
# 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
......
......@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.59 2000/06/14 18:17:54 petere Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.60 2000/06/28 18:29:40 petere Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -36,6 +36,8 @@
#undef yywrap
#endif /* yywrap */
#define YY_NO_UNPUT
extern YYSTYPE yylval;
/*
......
#-------------------------------------------------------------------------
#
# Makefile
# Makefile for pgeasy library
# Makefile for src/interfaces/libpgeasy
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile.in,v 1.8 2000/06/17 00:10:00 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile,v 1.1 2000/06/28 18:29:41 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/interfaces/libpgeasy
top_builddir = ../../..
include ../../Makefile.global
# shared library parameters
NAME= pgeasy
SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 1
SRCDIR= ../..
include $(SRCDIR)/Makefile.global
CFLAGS+= -I$(LIBPQDIR)
OBJS= libpgeasy.o halt.o
......@@ -26,22 +27,25 @@ SHLIB_LINK+= $(LIBPQ)
# braindead; users of libpq should not need to know what it depends on.)
SHLIB_LINK+= $(findstring -lcrypt,$(LIBS))
# Shared library stuff, also default 'all' target
include $(SRCDIR)/Makefile.shlib
all: all-lib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
.PHONY: install install-headers
install: install-headers install-lib $(install-shlib-dep)
install: all installdirs install-headers install-lib
.PHONY: install-headers
install-headers: libpgeasy.h
-@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
$(INSTALL) $(INSTLOPTS) libpgeasy.h $(HEADERDIR)/libpgeasy.h
$(INSTALL_DATA) $< $(includedir)/libpgeasy.h
installdirs:
$(mkinstalldirs) $(libdir) $(includedir)
.PHONY: clean
uninstall: uninstall-lib
rm -f $(includedir)/libpgeasy.h
clean: clean-shlib
rm -f lib$(NAME).a $(OBJS)
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
......
#-------------------------------------------------------------------------
#
# Makefile
# Makefile for libpgtcl library
# Makefile for libpgtcl library
#
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.44 2000/06/17 00:10:05 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.19 2000/06/28 18:29:43 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/interfaces/libpgtcl
top_builddir = ../../..
include ../../Makefile.global
NAME= pgtcl
SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 1
SRCDIR= ../..
include $(SRCDIR)/Makefile.global
CFLAGS+= -I$(LIBPQDIR)
OBJS= pgtcl.o pgtclCmds.o pgtclId.o
......@@ -28,29 +27,25 @@ SHLIB_LINK+= $(LIBPQ)
# braindead; users of libpq should not need to know what it depends on.)
SHLIB_LINK+= $(findstring -lcrypt,$(LIBS))
# Shared library stuff, also default 'all' target
include $(SRCDIR)/Makefile.shlib
.PHONY: install beforeinstall-headers install-headers
install: install-headers install-lib $(install-shlib-dep)
all: all-lib
install-headers: beforeinstall-headers libpgtcl.h
$(INSTALL) $(INSTLOPTS) libpgtcl.h $(HEADERDIR)/libpgtcl.h
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
beforeinstall-headers:
-@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
install: all installdirs install-headers install-lib
Makefile.tcldefs: mkMakefile.tcldefs.sh
/bin/sh mkMakefile.tcldefs.sh
.PHONY: install-headers
install-headers: libpgtcl.h
$(INSTALL_DATA) $< $(includedir)/libpgtcl.h
Makefile.tkdefs: mkMakefile.tkdefs.sh
/bin/sh mkMakefile.tkdefs.sh
installdirs:
$(mkinstalldirs) $(libdir) $(includedir)
.PHONY: clean
uninstall: uninstall-lib
rm -f $(includedir)/libpgtcl.h
clean: clean-shlib
rm -f lib$(NAME).a $(OBJS)
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
......
#-------------------------------------------------------------------------
#
# Makefile
# Makefile for libpq++ library
# Makefile for libpq++ library
#
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.27 2000/06/17 00:10:17 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.22 2000/06/28 18:29:48 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/interfaces/libpq++
top_builddir = ../../..
include ../../Makefile.global
NAME= pq++
SO_MAJOR_VERSION= 3
SO_MINOR_VERSION= 1
SRCDIR= ../..
include $(SRCDIR)/Makefile.global
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@ @INCLUDES@
SRCHEADERDIR = $(SRCDIR)/include
LIBPQHEADERDIR = $(SRCHEADERDIR)/libpq
SRCHEADERDIR = $(top_srcdir)/src/include
CXXFLAGS+= -I$(SRCHEADERDIR) -I$(LIBPQDIR)
OBJS = pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o
......@@ -42,9 +36,10 @@ ifeq ($(PORTNAME), irix5)
endif
endif
# Shared library stuff, also default 'all' target
include $(SRCDIR)/Makefile.shlib
all: all-lib
# Shared library stuff
include $(top_builddir)/src/Makefile.shlib
# Pull shared-lib CFLAGS into CXXFLAGS
CXXFLAGS+= $(CFLAGS_SL)
......@@ -54,35 +49,28 @@ CXXFLAGS+= $(CFLAGS_SL)
examples:
$(MAKE) -C examples all
.PHONY: install beforeinstall-headers install-headers
install: install-headers install-lib $(install-shlib-dep)
install: all installdirs install-headers install-lib
LIBPGXXDIR = libpq++
LIBPGXXHEADERDIR = $(HEADERDIR)/$(LIBPGXXDIR)
libpqxx_includedir = $(includedir)/libpq++
MAINHEADER = libpq++.h
LIBPGXXHEADERS = pgconnection.h \
pgdatabase.h \
pgtransdb.h \
pgcursordb.h \
pglobject.h
install-headers: beforeinstall-headers $(MAINHEADER)
@$(INSTALL) $(INSTLOPTS) $(MAINHEADER) $(HEADERDIR)/$(MAINHEADER)
@for i in ${LIBPGXXHEADERS}; do \
echo "Installing $(LIBPGXXHEADERDIR)/$$i."; \
$(INSTALL) $(INSTLOPTS) $$i $(LIBPGXXHEADERDIR)/$$i; \
done
beforeinstall-headers:
-@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
-@if [ ! -d $(LIBPGXXHEADERDIR) ]; then mkdir $(LIBPGXXHEADERDIR); fi
.PHONY: clean
clean: clean-shlib
rm -f libpq++.a $(OBJS)
$(MAKE) -C examples clean
LIBPGXXHEADERS = pgconnection.h pgdatabase.h pgtransdb.h pgcursordb.h pglobject.h
.PHONY: install-headers
install-headers: $(MAINHEADER) $(LIBPGXXHEADERS)
$(INSTALL_DATA) $< $(includedir)
for i in $(LIBPGXXHEADERS); do $(INSTALL_DATA) $(srcdir)/$$i $(libpqxx_includedir) || exit 1; done
installdirs:
$(mkinstalldirs) $(libdir) $(includedir) $(libpqxx_includedir)
uninstall: uninstall-lib
rm -f $(includedir)/$(MAINHEADER)
rm -rf $(libpqxx_includedir)
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)
-$(MAKE) -C examples clean
dep depend:
$(CXX) -MM $(CXXFLAGS) *.cc >depend
......
#-------------------------------------------------------------------------
#
# Makefile
# Makefile for libpq library
# Makefile for src/interfaces/libpq library
#
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.60 2000/06/17 00:10:09 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.39 2000/06/28 18:29:44 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/interfaces/libpq
top_builddir = ../../..
include ../../Makefile.global
# shared library parameters
NAME= pq
SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 1
SRCDIR= ../..
include $(SRCDIR)/Makefile.global
CFLAGS+= -DFRONTEND
CFLAGS+= -DFRONTEND -I$(srcdir)
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
pqexpbuffer.o dllist.o pqsignal.o @SNPRINTF@ @INET_ATON@
pqexpbuffer.o dllist.o pqsignal.o $(SNPRINTF) $(INET_ATON)
ifdef MULTIBYTE
OBJS+= common.o wchar.o conv.o big5.o
......@@ -28,63 +28,57 @@ endif
# If crypt is a separate library, rather than part of libc,
# make sure it gets included in shared libpq.
SHLIB_LINK+= $(findstring -lcrypt,$(LIBS))
SHLIB_LINK+= $(findstring -lcrypt, $(LIBS))
# Include kerberos libraries into libpq
SHLIB_LINK += $(KRB_LIBS)
all: all-lib
# Shared library stuff, also default 'all' target
include $(SRCDIR)/Makefile.shlib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
# We use several backend modules verbatim, but since we need to compile
# with appropriate options to build a shared lib, we can't necessarily
# use the same object files as the backend uses. Instead, symlink the
# source files in here and build our own object file.
# We use several backend modules verbatim, but since we need to
# compile with appropriate options to build a shared lib, we can't
# necessarily use the same object files as the backend uses. Instead,
# symlink the source files in here and build our own object file.
dllist.c: $(SRCDIR)/backend/lib/dllist.c
-$(LN_S) $(SRCDIR)/backend/lib/dllist.c .
backend_src = $(top_srcdir)/src/backend
dllist.c: $(backend_src)/lib/dllist.c
rm -f $@ && $(LN_S) $< .
# this only gets done if configure finds system doesn't have snprintf()
snprintf.c: $(SRCDIR)/backend/port/snprintf.c
-$(LN_S) $(SRCDIR)/backend/port/snprintf.c .
snprintf.c: $(backend_src)/port/snprintf.c
rm -f $@ && $(LN_S) $< .
# this only gets done if configure finds system doesn't have inet_aton()
inet_aton.c: $(SRCDIR)/backend/port/inet_aton.c
-$(LN_S) $(SRCDIR)/backend/port/inet_aton.c .
inet_aton.c: $(backend_src)/port/inet_aton.c
rm -f $@ && $(LN_S) $< .
ifdef MULTIBYTE
common.c: $(SRCDIR)/backend/utils/mb/common.c
-$(LN_S) $(SRCDIR)/backend/utils/mb/common.c .
wchar.c: $(SRCDIR)/backend/utils/mb/wchar.c
-$(LN_S) $(SRCDIR)/backend/utils/mb/wchar.c .
conv.c: $(SRCDIR)/backend/utils/mb/conv.c
-$(LN_S) $(SRCDIR)/backend/utils/mb/conv.c .
big5.c: $(SRCDIR)/backend/utils/mb/big5.c
-$(LN_S) $(SRCDIR)/backend/utils/mb/big5.c .
common.c wchar.c conv.c big5.c: % : $(backend_src)/utils/mb/%
rm -f $@ && $(LN_S) $< .
endif
.PHONY: install install-headers
install: install-headers install-lib $(install-shlib-dep)
install: all installdirs install-headers install-lib
install-headers: libpq-fe.h libpq-int.h
-@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
$(INSTALL) $(INSTLOPTS) libpq-fe.h $(HEADERDIR)/libpq-fe.h
$(INSTALL) $(INSTLOPTS) libpq-int.h $(HEADERDIR)/libpq-int.h
$(INSTALL) $(INSTLOPTS) pqexpbuffer.h $(HEADERDIR)/pqexpbuffer.h
.PHONY: install-headers
install-headers: libpq-fe.h libpq-int.h pqexpbuffer.h
$(INSTALL_DATA) $(srcdir)/libpq-fe.h $(includedir)
$(INSTALL_DATA) $(srcdir)/libpq-int.h $(includedir)
$(INSTALL_DATA) $(srcdir)/pqexpbuffer.h $(includedir)
installdirs:
$(mkinstalldirs) $(libdir) $(includedir)
.PHONY: clean
uninstall: uninstall-lib
rm -f $(addprefix $(includedir)/, libpq-fe.h libpq-int.h pqexpbuffer.h)
clean: clean-shlib
rm -f lib$(NAME).a $(OBJS)
rm -f dllist.c snprintf.c inet_aton.c common.c wchar.c conv.c big5.c
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS) dllist.c snprintf.c inet_aton.c common.c wchar.c conv.c big5.c
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
......
#-------------------------------------------------------------------------
#
# GNUMakefile.in for psqlodbc (Postgres ODBC driver).
# GNUMakefile for psqlodbc (Postgres ODBC driver)
#
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile.in,v 1.17 2000/06/20 16:39:57 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.1 2000/06/28 18:29:54 petere Exp $
#
#-------------------------------------------------------------------------
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../../..
subdir = src/interfaces/odbc
mkinstalldirs = @mkinstalldirs@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
prefix = @prefix@
datadir = @datadir@
odbcinst_ini_dir = @odbcinst_ini_dir@
includedir = @includedir@
top_builddir = ../../..
include ../../Makefile.global
# Shared library parameters
NAME = psqlodbc
SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 26
SRCDIR= $(top_srcdir)/src
include $(SRCDIR)/Makefile.global
CFLAGS += -I. @DEFS@ -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
CFLAGS += -I$(srcdir) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
environ.o execute.o lobj.o misc.o options.o \
pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o statement.o \
gpps.o tuple.o tuplelist.o dlg_specific.o
gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX)
SHLIB_LINK= $(LD_FLAGS)
all: all-lib
# Shared library stuff, also default 'all' target
include $(SRCDIR)/Makefile.shlib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
install: all installdirs install-headers install-ini install-lib $(install-shlib-dep)
LDFLAGS_SL+= $(LDFLAGS_ODBC)
odbc_headers = isql.h isqlext.h iodbc.h
odbc_includedir = $(includedir)/iodbc
install: all installdirs install-headers install-ini install-lib
installdirs:
$(mkinstalldirs) $(includedir)/iodbc $(LIBDIR) $(odbcinst_ini_dir)
$(mkinstalldirs) $(odbc_includedir) $(libdir) $(odbcinst_ini_dir)
install-headers: isql.h isqlext.h iodbc.h
$(INSTALL_DATA) $^ $(includedir)/iodbc/
.PHONY: install-headers
install-headers: $(odbc_headers)
for i in $^; do $(INSTALL_DATA) $$i $(odbc_includedir) || exit 1; done
.PHONY: install-ini
install-ini: odbcinst.ini
$(INSTALL_DATA) odbcinst.ini $(odbcinst_ini_dir)
$(INSTALL_DATA) $< $(odbcinst_ini_dir)
clean: clean-shlib
rm -f lib$(NAME).a $(OBJS)
distclean maintainer-clean: clean
rm -f GNUmakefile
uninstall: uninstall-lib
rm -f $(addprefix $(odbc_includedir)/, $(odbc_headers))
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
......@@ -66,12 +60,3 @@ depend dep:
ifeq (depend,$(wildcard depend))
include depend
endif
.PHONY: all install installdirs install-headers install-lib install-ini clean distclean maintainer-clean
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
$(top_builddir)/config.status: $(top_srcdir)/configure
cd $(top_builddir) && ./config.status --recheck
# This file is an interface from the Autoconf world to Perl's
# MakeMaker world, so that the latter behaves (kind of) like the
# former would prefer. Internally, we call Perl to create another
# Makefile according to it's own ideas and then invoke the rules from
# Makefile according to its own ideas and then invoke the rules from
# that file.
#
# $Header: /cvsroot/pgsql/src/interfaces/perl5/Attic/GNUmakefile.in,v 1.1 2000/06/10 18:01:56 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/perl5/Attic/GNUmakefile,v 1.1 2000/06/28 18:29:56 petere Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
subdir = src/interfaces/perl5
top_builddir = ../../..
PERL = @PERL@
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
include ../../Makefile.global
all: Makefile libpq-all
......@@ -26,6 +17,7 @@ all: Makefile libpq-all
Makefile: Makefile.PL
$(PERL) $< POLLUTE=1
.PHONY: libpq-all
libpq-all:
$(MAKE) -C $(top_builddir)/src/interfaces/libpq all
......@@ -39,7 +31,7 @@ libpq-all:
# purer alternative would naturally be the ability to select the
# installation directory somewhere.
install: Makefile libpq-install
install: Makefile
$(MAKE) -f Makefile clean
POSTGRES_LIB="$(libdir)" \
POSTGRES_INCLUDE="$(includedir)" \
......@@ -56,16 +48,17 @@ install: Makefile libpq-install
echo "*****"; \
fi
libpq-install:
$(MAKE) -C $(top_builddir)/src/interfaces/libpq install
# Note: Perl's idea of "clean" is a little different, so we use "realclean"
clean:
-[ -f Makefile ] && $(MAKE) -f Makefile realclean
distclean maintainer-clean: clean
rm -f GNUmakefile
uninstall:
@echo "*****"; \
echo "* The Perl module cannot be uninstalled automatically. You can"; \
echo "* change into the directory "`pwd`" and do"; \
echo "*"; \
echo "* $(MAKE) -f Makefile realclean"; \
echo "*"; \
echo "* to delete built and installed files."; \
echo "*****"
.PHONY: all install clean distclean maintainer-clean libpq-all libpq-install
clean distclean maintainer-clean:
-[ -f Makefile ] && $(MAKE) -f Makefile clean
rm -f Makefile Makefile.old
#-------------------------------------------------------------------
#
# Makefile for src/interfaces/python, a.k.a. "PyGreSQL"
# GNUmakefile for src/interfaces/python, a.k.a. "PyGreSQL"
#
# Written by Peter Eisentraut <peter_e@gmx.net>
#
# $Header: /cvsroot/pgsql/src/interfaces/python/Attic/GNUmakefile.in,v 1.1 2000/06/10 18:02:00 petere Exp $
# $Header: /cvsroot/pgsql/src/interfaces/python/Attic/GNUmakefile,v 1.1 2000/06/28 18:30:07 petere Exp $
#
#-------------------------------------------------------------------
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
subdir = src/interfaces/python
top_builddir = ../../..
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
LIBS = @LIBS@
PYTHON = @PYTHON@
python_extmakefile = @python_extmakefile@
python_moduledir = @python_moduledir@
include ../../Makefile.global
all: Makefile pgmodule.c libpq-all
$(MAKE) -f Makefile
.PHONY: libpq-all
libpq-all:
$(MAKE) -C $(top_builddir)/src/interfaces/libpq all
......@@ -60,15 +43,15 @@ install: all
echo "*****"; \
fi
uninstall:
@echo "*****"; \
echo "* Unfortunately, the Python interface module cannot be uninstalled"; \
echo "* automatically. To do it yourself, look in or near the directory"; \
echo "* \`$(python_moduledir)' for files \`pg.py' and \`_pgmodule$(DLSUFFIX)'."; \
echo "*****"
# Python sometimes has a different idea what exactly "clean" is.
clean:
clean distclean maintainer-clean:
-[ -f Makefile ] && $(MAKE) -f Makefile clobber
rm -f Makefile.pre.in Makefile Setup Setup.in
distclean maintainer-clean: clean
rm -f GNUmakefile
.PHONY: all libpq-all install clean distclean maintainer-clean
# $Header: /cvsroot/pgsql/src/pl/plperl/GNUmakefile,v 1.1 2000/06/27 00:31:49 petere Exp $
# $Header: /cvsroot/pgsql/src/pl/plperl/GNUmakefile,v 1.2 2000/06/28 18:30:12 petere Exp $
subdir = src/pl/plperl
top_builddir = ../../..
......@@ -25,4 +25,5 @@ uninstall:
rm -f $(libdir)/plperl$(DLSUFFIX)
clean distclean maintainer-clean:
-[ -f Makefile ] && $(MAKE) -f Makefile realclean
-[ -f Makefile ] && $(MAKE) -f Makefile clean
rm -f Makefile Makefile.old
......@@ -2,7 +2,7 @@
#
# Makefile for the plpgsql shared object
#
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.3 2000/06/27 00:32:01 petere Exp $
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.4 2000/06/28 18:30:16 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -19,7 +19,9 @@ CPPFLAGS += -I$(srcdir)
OBJS = pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
# Shared library stuff, also default `all' target
all: all-lib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
......@@ -68,8 +70,8 @@ mklang.sql: mklang.sql.in
sed -e 's%__libdir__%$(libdir)%g' -e 's%__DLSUFFIX__%$(DLSUFFIX)%g' < $< > $@
clean distclean: clean-shlib
rm -f lib$(NAME).a *.o y.tab.c y.tab.h lex.yy.c mklang.sql
clean distclean: clean-lib
rm -f *.o y.tab.c y.tab.h lex.yy.c mklang.sql
maintainer-clean: clean
rm -f $(srcdir)/pl_gram.c $(srcdir)/pl.tab.h $(srcdir)/pl_scan.c
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment