Commit ae28cfe6 authored by Tom Lane's avatar Tom Lane

Partial fix for ecpg's VPATH problems. It compiles and successfully

builds all the files needed for its regression tests, but the tests
themselves fail because of diffs in the #line directives output by
ecpg itself.  Not sure what to do about that.
parent fcba3b82
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.23 2005/12/09 21:19:35 petere Exp $ # $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.24 2006/08/28 16:13:10 tgl Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,11 +17,12 @@ SO_MAJOR_VERSION= 2 ...@@ -17,11 +17,12 @@ SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 2 SO_MINOR_VERSION= 2
DLTYPE= library DLTYPE= library
override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) \ override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(top_srcdir)/src/include/utils $(CPPFLAGS) -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS)
override CFLAGS += $(PTHREAD_CFLAGS) override CFLAGS += $(PTHREAD_CFLAGS)
SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \ SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \
$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS) $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) \
$(PTHREAD_LIBS)
OBJS= informix.o OBJS= informix.o
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.40 2006/04/29 20:13:07 tgl Exp $ # $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.41 2006/08/28 16:13:11 tgl Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,7 +17,8 @@ SO_MAJOR_VERSION= 5 ...@@ -17,7 +17,8 @@ SO_MAJOR_VERSION= 5
SO_MINOR_VERSION= 2 SO_MINOR_VERSION= 2
DLTYPE= library DLTYPE= library
override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/interfaces/ecpg/include \ override CPPFLAGS := -DFRONTEND \
-I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS) -I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS)
override CFLAGS += $(PTHREAD_CFLAGS) override CFLAGS += $(PTHREAD_CFLAGS)
......
...@@ -2,7 +2,8 @@ subdir = src/interfaces/ecpg/include ...@@ -2,7 +2,8 @@ subdir = src/interfaces/ecpg/include
top_builddir = ../../../.. top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/interfaces/ecpg/include \ override CPPFLAGS := -DFRONTEND \
-I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS) -I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS)
informix_esql_dir = $(pkgincludedir)/informix/esql informix_esql_dir = $(pkgincludedir)/informix/esql
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.29 2005/12/09 21:19:36 petere Exp $ # $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.30 2006/08/28 16:13:11 tgl Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,7 +17,8 @@ SO_MAJOR_VERSION= 2 ...@@ -17,7 +17,8 @@ SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 2 SO_MINOR_VERSION= 2
DLTYPE= library DLTYPE= library
override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/interfaces/ecpg/include \ override CPPFLAGS := -DFRONTEND \
-I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS) -I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS)
override CFLAGS += $(PTHREAD_CFLAGS) override CFLAGS += $(PTHREAD_CFLAGS)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Copyright (c) 1998-2006, PostgreSQL Global Development Group # Copyright (c) 1998-2006, PostgreSQL Global Development Group
# #
# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.120 2006/03/07 00:48:07 tgl Exp $ # $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.121 2006/08/28 16:13:11 tgl Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,9 +17,10 @@ MAJOR_VERSION= 4 ...@@ -17,9 +17,10 @@ MAJOR_VERSION= 4
MINOR_VERSION= 2 MINOR_VERSION= 2
PATCHLEVEL=1 PATCHLEVEL=1
override CPPFLAGS := -I$(srcdir)/../include -I$(srcdir) $(CPPFLAGS) \ override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-DMAJOR_VERSION=$(MAJOR_VERSION) \ -I$(srcdir) -DMAJOR_VERSION=$(MAJOR_VERSION) \
-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
$(CPPFLAGS)
ifeq ($(GCC), yes) ifeq ($(GCC), yes)
override CFLAGS += -Wno-error override CFLAGS += -Wno-error
......
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.58 2006/08/19 13:42:40 meskes Exp $ # $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.59 2006/08/28 16:13:11 tgl Exp $
subdir = src/interfaces/ecpg/test subdir = src/interfaces/ecpg/test
top_builddir = ../../../.. top_builddir = ../../../..
...@@ -17,6 +17,12 @@ ifdef NO_LOCALE ...@@ -17,6 +17,12 @@ ifdef NO_LOCALE
NOLOCALE += --no-locale NOLOCALE += --no-locale
endif endif
ifneq ($(PORTNAME),win32)
abs_builddir := $(shell pwd)
else
abs_builddir := $(shell pwd -W)
endif
all install installdirs uninstall dep depend distprep: all install installdirs uninstall dep depend distprep:
$(MAKE) -C connect $@ $(MAKE) -C connect $@
$(MAKE) -C sql $@ $(MAKE) -C sql $@
...@@ -36,13 +42,11 @@ clean distclean maintainer-clean: ...@@ -36,13 +42,11 @@ clean distclean maintainer-clean:
$(MAKE) -C complex $@ $(MAKE) -C complex $@
$(MAKE) -C thread $@ $(MAKE) -C thread $@
rm -rf tmp_check results log rm -rf tmp_check results log
rm -f pg_regress.inc.sh regression.diffs rm -f pg_regress regression.diffs
all: pg_regress.sh all: pg_regress
pg_regress.sh: pg_regress.inc.sh pg_regress: pg_regress.sh $(top_builddir)/src/Makefile.global
pg_regress.inc.sh: pg_regress.inc.sh.in $(top_builddir)/src/Makefile.global
sed -e 's,@bindir@,$(bindir),g' \ sed -e 's,@bindir@,$(bindir),g' \
-e 's,@libdir@,$(libdir),g' \ -e 's,@libdir@,$(libdir),g' \
-e 's,@pkglibdir@,$(pkglibdir),g' \ -e 's,@pkglibdir@,$(pkglibdir),g' \
...@@ -54,12 +58,29 @@ pg_regress.inc.sh: pg_regress.inc.sh.in $(top_builddir)/src/Makefile.global ...@@ -54,12 +58,29 @@ pg_regress.inc.sh: pg_regress.inc.sh.in $(top_builddir)/src/Makefile.global
-e 's/@GCC@/$(GCC)/g' \ -e 's/@GCC@/$(GCC)/g' \
$< >$@ $< >$@
check: all pg_regress.inc.sh # When doing a VPATH build, copy over the .pgc, .stdout and .stderr
sh ./pg_regress.sh --dbname=regress1 --debug --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) # files so that the driver script can find them. We have to use an
# absolute path for the targets, because otherwise make will try to
# locate the missing files using VPATH, and will find them in
# $(srcdir), but the point here is that we want to copy them from
# $(srcdir) to the build directory.
ifdef VPATH
remaining_files_src := $(wildcard $(srcdir)/*/*.pgc) $(wildcard $(srcdir)/expected/*.c) $(wildcard $(srcdir)/expected/*.stdout) $(wildcard $(srcdir)/expected/*.stderr)
remaining_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(remaining_files_src))
all: $(remaining_files_build)
$(remaining_files_build): $(abs_builddir)/%: $(srcdir)/%
ln -s $< $@
endif
check: all
sh ./pg_regress --dbname=regress1 --debug --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
# the same options, but with --listen-on-tcp # the same options, but with --listen-on-tcp
checktcp: all pg_regress.inc.sh checktcp: all
sh ./pg_regress.sh --dbname=regress1 --debug --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) --listen-on-tcp sh ./pg_regress --dbname=regress1 --debug --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) --listen-on-tcp
installcheck: all pg_regress.inc.sh installcheck: all
sh ./pg_regress.sh --dbname=regress1 --debug --top-builddir=$(top_builddir) --load-language=plpgsql $(NOLOCALE) sh ./pg_regress --dbname=regress1 --debug --top-builddir=$(top_builddir) --load-language=plpgsql $(NOLOCALE)
override CPPFLAGS := -I$(srcdir)/../../include -I$(libpq_srcdir) $(CPPFLAGS) override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(libpq_srcdir) $(CPPFLAGS)
override CFLAGS += $(PTHREAD_CFLAGS) override CFLAGS += $(PTHREAD_CFLAGS)
override LDFLAGS := -L../../ecpglib -L../../pgtypeslib -L../../../libpq $(LDFLAGS) override LDFLAGS := -L../../ecpglib -L../../pgtypeslib -L../../../libpq $(LDFLAGS)
......
This diff is collapsed.
This diff is collapsed.
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