Use "-I." in directories holding Bison parsers, for Oracle compilers.
authorNoah Misch
Tue, 13 Apr 2021 02:24:41 +0000 (19:24 -0700)
committerNoah Misch
Tue, 13 Apr 2021 02:27:09 +0000 (19:27 -0700)
With the Oracle Developer Studio 12.6 compiler, #line directives alter
the current source file location for purposes of #include "..."
directives.  Hence, a VPATH build failed with 'cannot find include file:
"specscanner.c"'.  With two exceptions, parser-containing directories
already add "-I. -I$(srcdir)"; eliminate the exceptions.  Back-patch to
9.6 (all supported versions).

src/backend/utils/adt/Makefile
src/test/isolation/Makefile

index 580043233b3cbf7233344efdadb62b577e79bada..65569162d6e6c1a951d97ac4ae696e5685cc16f6 100644 (file)
@@ -8,6 +8,8 @@ subdir = src/backend/utils/adt
 top_builddir = ../../../..
 include $(top_builddir)/src/Makefile.global
 
+override CPPFLAGS := -I. -I$(srcdir) $(CPPFLAGS)
+
 # keep this list arranged alphabetically or it gets to be a mess
 OBJS = acl.o amutils.o arrayfuncs.o array_expanded.o array_selfuncs.o \
    array_typanalyze.o array_userfuncs.o arrayutils.o ascii.o \
index 228877b5b03e0a0ee03bae61ef9cc048a0994366..b79497d1b5fe22ec1720217fd0070dc401c5afd6 100644 (file)
@@ -9,7 +9,8 @@ subdir = src/test/isolation
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
-override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) -I$(srcdir)/../regress $(CPPFLAGS)
+override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) \
+   -I$(srcdir)/../regress $(CPPFLAGS)
 
 OBJS =  specparse.o isolationtester.o $(WIN32RES)