diff options
author | Tom Lane | 2000-05-29 05:45:56 +0000 |
---|---|---|
committer | Tom Lane | 2000-05-29 05:45:56 +0000 |
commit | 93c38fc16507c887db47a2792740161232f20be2 (patch) | |
tree | ec8a460934447658498af703c5b813ca704dee8a | |
parent | 5236012f151f957b9fb2f9eeebc1bf4d6b94cbaf (diff) |
Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
91 files changed, 120 insertions, 326 deletions
diff --git a/contrib/Makefile b/contrib/Makefile index 7485110ed5..0dc68e4854 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -11,42 +11,18 @@ # The following subdirs give make errors: # # earthdistance -# findoidjoins -# isbn_issn # os2client -# pginterface -all: - for dir in *; do \ - if [ -e $$dir/Makefile ]; then \ - $(MAKE) -C $$dir; \ - fi; \ - done - -install: +all: for dir in *; do \ if [ -e $$dir/Makefile ]; then \ $(MAKE) -C $$dir $@ ; \ fi; \ done -install-doc: - for dir in *; do \ - if [ -e $$dir/Makefile ]; then \ - $(MAKE) -C $$dir $@ ; \ - fi; \ - done || exit 0 - -clean: - for dir in *; do \ - if [ -e $$dir/Makefile ]; then \ - $(MAKE) -C $$dir $@ ; \ - fi; \ - done || exit 0 - -distclean: +.DEFAULT: for dir in *; do \ if [ -e $$dir/Makefile ]; then \ $(MAKE) -C $$dir $@ ; \ fi; \ - done || exit 0 + done diff --git a/contrib/array/Makefile b/contrib/array/Makefile index 951250a29d..c29569d76f 100644 --- a/contrib/array/Makefile +++ b/contrib/array/Makefile @@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src include $(SRCDIR)/Makefile.global -INCLUDE_OPT = -I./ \ - -I$(SRCDIR)/ \ - -I$(SRCDIR)/include \ - -I$(SRCDIR)/port/$(PORTNAME) - -CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL) +CFLAGS += -I. $(CFLAGS_SL) MODNAME = array_iterator @@ -61,7 +56,7 @@ $(SQLDIR): $(CC) $(CFLAGS) -shared -o $@ $< depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f *~ $(MODULE) $(MODNAME).sql diff --git a/contrib/datetime/Makefile b/contrib/datetime/Makefile index 195c0f8d68..8f43ff83b7 100644 --- a/contrib/datetime/Makefile +++ b/contrib/datetime/Makefile @@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src include $(SRCDIR)/Makefile.global -INCLUDE_OPT = -I./ \ - -I$(SRCDIR)/ \ - -I$(SRCDIR)/include \ - -I$(SRCDIR)/port/$(PORTNAME) - -CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL) +CFLAGS += -I. $(CFLAGS_SL) MODNAME = datetime_functions @@ -61,7 +56,7 @@ $(SQLDIR): $(CC) $(CFLAGS) -shared -o $@ $< depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f *~ $(MODULE) $(MODNAME).sql diff --git a/contrib/datetime/datetime_functions.c b/contrib/datetime/datetime_functions.c index 47991a8646..ca9c8afe35 100644 --- a/contrib/datetime/datetime_functions.c +++ b/contrib/datetime/datetime_functions.c @@ -96,7 +96,7 @@ hhmm_in(char *str) *tm = &tt; if (!PointerIsValid(str)) - elog(ERROR, "Bad (null) time external representation", NULL); + elog(ERROR, "Bad (null) time external representation"); if (decode_24h_time(str, tm, &fsec) != 0) elog(ERROR, "Bad time external representation '%s'", str); diff --git a/contrib/datetime/datetime_functions.h b/contrib/datetime/datetime_functions.h index c345f2852b..4b0eb49988 100644 --- a/contrib/datetime/datetime_functions.h +++ b/contrib/datetime/datetime_functions.h @@ -15,6 +15,7 @@ int4 date_month(DateADT val); int4 date_year(DateADT val); TimeADT *currenttime(void); DateADT currentdate(void); +int4 date2mjd(DateADT val); #endif diff --git a/contrib/fulltextindex/Makefile b/contrib/fulltextindex/Makefile index c5986b02f7..bf1d02d227 100644 --- a/contrib/fulltextindex/Makefile +++ b/contrib/fulltextindex/Makefile @@ -4,7 +4,7 @@ include $(SRCDIR)/Makefile.global CONTRIBDIR=$(LIBDIR)/contrib -CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include +CFLAGS+= $(CFLAGS_SL) TARGETS= fti$(DLSUFFIX) CLEANFILES+= $(TARGETS) diff --git a/contrib/isbn_issn/Makefile b/contrib/isbn_issn/Makefile index 9987db663b..c90735656a 100644 --- a/contrib/isbn_issn/Makefile +++ b/contrib/isbn_issn/Makefile @@ -3,23 +3,16 @@ # # $Id$ -all: isbn.so issn.so +SRCDIR= ../../src -isbn.so: isbn.o - ld -Bshareable -o isbn.so isbn.o +include $(SRCDIR)/Makefile.global -isbn.o: isbn.c - cc -g -O -fPIC -I/usr/local/pgsql/include -c isbn.c +CFLAGS+= $(CFLAGS_SL) -issn.so: issn.o - ld -Bshareable -o issn.so issn.o +all: isbn$(DLSUFFIX) issn$(DLSUFFIX) -issn.o: issn.c - cc -g -O -fPIC -I/usr/local/pgsql/include -c issn.c +install: isbn$(DLSUFFIX) issn$(DLSUFFIX) + install -c isbn$(DLSUFFIX) issn$(DLSUFFIX) /usr/local/pgsql/modules -install: isbn.so issn.so - install -c isbn.so issn.so /usr/local/pgsql/modules - -# -# eof -# +clean: + rm -f isbn$(DLSUFFIX) issn$(DLSUFFIX) *.o diff --git a/contrib/isbn_issn/isbn.c b/contrib/isbn_issn/isbn.c index e1bd1044f5..a636cf9310 100644 --- a/contrib/isbn_issn/isbn.c +++ b/contrib/isbn_issn/isbn.c @@ -47,8 +47,6 @@ isbn * isbn_in(char *str) { isbn *result; - char *cp; - int count; if (strlen(str) != 13) { diff --git a/contrib/isbn_issn/issn.c b/contrib/isbn_issn/issn.c index 3555146268..651339bee5 100644 --- a/contrib/isbn_issn/issn.c +++ b/contrib/isbn_issn/issn.c @@ -47,8 +47,6 @@ issn * issn_in(char *str) { issn *result; - char *cp; - int count; if (strlen(str) != 9) { diff --git a/contrib/lo/Makefile b/contrib/lo/Makefile index db3b58d93e..1fcc43d67c 100644 --- a/contrib/lo/Makefile +++ b/contrib/lo/Makefile @@ -11,7 +11,7 @@ include $(SRCDIR)/Makefile.global CONTRIBDIR=$(LIBDIR)/modules -CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include +CFLAGS+= $(CFLAGS_SL) ifdef REFINT_VERBOSE CFLAGS+= -DREFINT_VERBOSE diff --git a/contrib/miscutil/Makefile b/contrib/miscutil/Makefile index fd0065b86e..742db0334f 100644 --- a/contrib/miscutil/Makefile +++ b/contrib/miscutil/Makefile @@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src include $(SRCDIR)/Makefile.global -INCLUDE_OPT = -I./ \ - -I$(SRCDIR)/ \ - -I$(SRCDIR)/include \ - -I$(SRCDIR)/port/$(PORTNAME) - -CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL) +CFLAGS += -I. $(CFLAGS_SL) MODNAME = misc_utils @@ -61,7 +56,7 @@ $(SQLDIR): $(CC) $(CFLAGS) -shared -o $@ $< depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f *~ $(MODULE) $(MODNAME).sql diff --git a/contrib/miscutil/misc_utils.c b/contrib/miscutil/misc_utils.c index 302118689d..f5a9868328 100644 --- a/contrib/miscutil/misc_utils.c +++ b/contrib/miscutil/misc_utils.c @@ -15,6 +15,7 @@ #include <errno.h> #include "postgres.h" + #include "access/heapam.h" #include "access/htup.h" #include "access/relscan.h" @@ -22,14 +23,16 @@ #include "access/tupdesc.h" #include "catalog/catname.h" #include "catalog/pg_listener.h" +#include "fmgr.h" #include "storage/lmgr.h" -#include "utils/fmgr.h" +#include "utils/fmgroids.h" #include "utils/palloc.h" #include "utils/rel.h" #include "utils/tqual.h" #include "misc_utils.h" +#undef MIN #define MIN(x,y) ((x)<=(y) ? (x) : (y)) extern int ExecutorLimit(int limit); diff --git a/contrib/odbc/Makefile b/contrib/odbc/Makefile index 34138c1f32..8fe1959c58 100644 --- a/contrib/odbc/Makefile +++ b/contrib/odbc/Makefile @@ -9,7 +9,7 @@ ifndef PGLIB PGLIB= . endif -CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include +CFLAGS+= $(CFLAGS_SL) TARGETS_7= odbc.sql TARGETS_PRE7= odbc$(DLSUFFIX) odbc-pre7.sql diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index d2c2e97d72..ff954d696f 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -591,7 +591,7 @@ main(int argc, char **argv) } if (rlim.rlim_cur <= (nclients + 2)) { - fprintf(stderr, "You need at least %d open files resource but you are only allowed to use %ld.\n", nclients + 2, rlim.rlim_cur); + fprintf(stderr, "You need at least %d open files resource but you are only allowed to use %ld.\n", nclients + 2, (long) rlim.rlim_cur); fprintf(stderr, "Use limit/ulimt to increase the limit before using pgbench.\n"); exit(1); } diff --git a/contrib/soundex/Makefile b/contrib/soundex/Makefile index d95549dc01..059fd6d4ee 100644 --- a/contrib/soundex/Makefile +++ b/contrib/soundex/Makefile @@ -10,25 +10,7 @@ SRCDIR = $(PGDIR)/src include $(SRCDIR)/Makefile.global -INCLUDE_OPT = -I ./ \ - -I $(SRCDIR)/ \ - -I $(SRCDIR)/include \ - -I $(SRCDIR)/interfaces/libpq \ - -I $(SRCDIR)/port/$(PORTNAME) - -CFLAGS += $(INCLUDE_OPT) - -ifeq ($(PORTNAME), linux) - ifdef LINUX_ELF - ifeq ($(CC), gcc) - CFLAGS += -fPIC - endif - endif -endif - -ifeq ($(PORTNAME), i386_solaris) - CFLAGS+= -fPIC -endif +CFLAGS += -I. $(CFLAGS_SL) MODNAME = soundex @@ -53,7 +35,7 @@ install: $(MODULE) $(CC) $(CFLAGS) -shared -o $@ $< depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f $(MODULE) $(MODNAME).sql diff --git a/contrib/soundex/soundex.c b/contrib/soundex/soundex.c index df0c8366b9..8fe73054ca 100644 --- a/contrib/soundex/soundex.c +++ b/contrib/soundex/soundex.c @@ -2,23 +2,21 @@ /* soundex.c */ /*****************************************************************************/ +#include <ctype.h> #include <string.h> #include <stdio.h> + #include "postgres.h" /* for char16, etc. */ + #include "utils/palloc.h" /* for palloc */ -#include "libpq-fe.h" /* for TUPLE */ -#include <stdio.h> -#include <ctype.h> -/* prototype for soundex function */ +/* prototypes for soundex functions */ +text *text_soundex(text *t); char *soundex(char *instr, char *outstr); text * text_soundex(text *t) { - /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */ - char *table = "01230120022455012623010202"; - int count = 0; text *new_t; char outstr[6 + 1]; /* max length of soundex is 6 */ @@ -49,7 +47,8 @@ text_soundex(text *t) char * soundex(char *instr, char *outstr) -{ /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */ +{ + /* ABCDEFGHIJKLMNOPQRSTUVWXYZ */ char *table = "01230120022455012623010202"; int count = 0; diff --git a/contrib/spi/Makefile b/contrib/spi/Makefile index e4deb393d4..639a6247da 100644 --- a/contrib/spi/Makefile +++ b/contrib/spi/Makefile @@ -3,7 +3,7 @@ SRCDIR= ../../src include $(SRCDIR)/Makefile.global -CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include +CFLAGS+= $(CFLAGS_SL) ifdef REFINT_VERBOSE CFLAGS+= -DREFINT_VERBOSE diff --git a/contrib/string/Makefile b/contrib/string/Makefile index dd8f0e6f2a..d372aa0845 100644 --- a/contrib/string/Makefile +++ b/contrib/string/Makefile @@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src include $(SRCDIR)/Makefile.global -INCLUDE_OPT = -I./ \ - -I$(SRCDIR)/ \ - -I$(SRCDIR)/include \ - -I$(SRCDIR)/port/$(PORTNAME) - -CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL) +CFLAGS += -I. $(CFLAGS_SL) MODNAME = string_io @@ -61,7 +56,7 @@ $(SQLDIR): $(CC) $(CFLAGS) -shared -o $@ $< depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f *~ $(MODULE) $(MODNAME).sql diff --git a/contrib/string/string_io.c b/contrib/string/string_io.c index cb8323d9c9..c329fec1e9 100644 --- a/contrib/string/string_io.c +++ b/contrib/string/string_io.c @@ -22,6 +22,7 @@ /* define this if you want to see iso-8859 characters */ #define ISO8859 +#undef MIN #define MIN(x, y) ((x) < (y) ? (x) : (y)) #define VALUE(char) ((char) - '0') #define DIGIT(val) ((val) + '0') diff --git a/contrib/userlock/Makefile b/contrib/userlock/Makefile index 23975185b2..983f20a547 100644 --- a/contrib/userlock/Makefile +++ b/contrib/userlock/Makefile @@ -11,12 +11,7 @@ SRCDIR = $(PGDIR)/src include $(SRCDIR)/Makefile.global -INCLUDE_OPT = -I./ \ - -I$(SRCDIR)/ \ - -I$(SRCDIR)/include \ - -I$(SRCDIR)/port/$(PORTNAME) - -CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL) +CFLAGS += -I. $(CFLAGS_SL) MODNAME = user_locks @@ -61,7 +56,7 @@ $(SQLDIR): $(CC) $(CFLAGS) -shared -o $@ $< depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f *~ $(MODULE) $(MODNAME).sql diff --git a/contrib/vacuumlo/Makefile b/contrib/vacuumlo/Makefile index a9feb6781e..a1c1983c57 100644 --- a/contrib/vacuumlo/Makefile +++ b/contrib/vacuumlo/Makefile @@ -6,7 +6,7 @@ include $(SRCDIR)/Makefile.global CONTRIBDIR=$(LIBDIR)/contrib -CFLAGS+= -I$(HEADERDIR) +CFLAGS+= -I$(LIBPQDIR) TARGETS= vacuumlo CLEANFILES+= $(TARGETS) diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 1570dc6e66..e2b74eb377 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -208,7 +208,7 @@ YFLAGS= @YFLAGS@ YACC= @YACC@ LEX= @LEX@ AROPT= @AROPT@ -CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend @CPPFLAGS@ @CFLAGS@ +CFLAGS= -I$(SRCDIR)/include @CPPFLAGS@ @CFLAGS@ CFLAGS_SL= @SHARED_LIB@ PGSQL_INCLUDES= @PGSQL_INCLUDES@ LIBS= @LIBS@ diff --git a/src/backend/Makefile b/src/backend/Makefile index a5ab6632d8..cb5cc433f5 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -29,7 +29,7 @@ # # We don't use $(LD) for linking. We use $(CC) instead. This is because # the $(CC) program apparently can do linking too, and it has certain -# thinks like default options and search paths for libraries set up for +# things like default options and search paths for libraries set up for # it that the more primitive $(LD) doesn't have. # # @@ -50,9 +50,11 @@ DIRS += tioga endif OBJS = $(DIRS:%=%/SUBSYS.o) + ifeq ($(PORTNAME), qnx4) -# This file chrashes wlink and is therefore not in bootstrap/SUBSYS.o. -OBJS1 = bootstrap/bootstrap.o +# This file crashes qnx4's wlink and is therefore not in bootstrap/SUBSYS.o +# on that platform. (Wotta hack ... is it still necessary?) +OBJS+= bootstrap/bootstrap.o endif VERSIONOBJ = $(SRCDIR)/utils/version.o @@ -75,22 +77,25 @@ libpostgres.a: $(DLLOBJS) $(SRCDIR)/utils/dllinit.o postgres.def $(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@ endif -all: postgres $(POSTGRES_IMP) global1.bki.source local1_template1.bki.source \ - global1.description local1_template1.description +all: prebuildheaders postgres $(POSTGRES_IMP) \ + global1.bki.source local1_template1.bki.source \ + global1.description local1_template1.description ifneq ($(PORTNAME), win) -postgres: utils/fmgroids.h $(OBJS) $(VERSIONOBJ) - $(CC) $(CFLAGS) -o postgres $(OBJS) $(OBJS1) $(VERSIONOBJ) $(LDFLAGS) + +postgres: $(OBJS) $(VERSIONOBJ) + $(CC) $(CFLAGS) -o postgres $(OBJS) $(VERSIONOBJ) $(LDFLAGS) + else + postgres: $(DLLOBJS) $(SRCDIR)/utils/dllinit.o postgres.def libpostgres.a dlltool --dllname $@$(X) --output-exp [email protected] --def postgres.def gcc -g -o $@$(X) -Wl,--base-file,[email protected] [email protected] $(DLLOBJS) $(DLLLIBS) dlltool --dllname $@$(X) --base-file [email protected] --output-exp [email protected] --def postgres.def gcc -g -o $@$(X) [email protected] $(DLLOBJS) $(DLLLIBS) -endif -#.PHONY: postgres +endif $(OBJS): $(DIRS:%=%.dir) @@ -114,24 +119,36 @@ catalog/global1.description catalog/local1_template1.description: # The postgres.o target is needed by the rule in Makefile.global that # creates the exports file when MAKE_EXPORTS = true. postgres.o: $(OBJS) - $(CC) $(LDREL) $(LDOUT) postgres.o $(OBJS) $(OBJS1) $(LDFLAGS) + $(CC) $(LDREL) $(LDOUT) postgres.o $(OBJS) $(LDFLAGS) + +# These header files should be up-to-date before we do much else... +.PHONY: prebuildheaders + +prebuildheaders: $(SRCDIR)/include/parser/parse.h \ + $(SRCDIR)/include/utils/fmgroids.h ############################################################################ # The following targets are specified in make commands that appear in the -# make files in our subdirectories. +# make files in our subdirectories. Note that it's important we match the +# dependencies shown in the subdirectory makefiles! -parse.h: parser/parse.h - cp parser/parse.h . +$(SRCDIR)/include/parser/parse.h: parser/parse.h + cp parser/parse.h $(SRCDIR)/include/parser -parser/parse.h: +parser/parse.h: parser/gram.y $(MAKE) -C parser parse.h -utils/fmgroids.h: +$(SRCDIR)/include/utils/fmgroids.h: utils/fmgroids.h + cp utils/fmgroids.h $(SRCDIR)/include/utils + +utils/fmgroids.h: utils/Gen_fmgrtab.sh $(SRCDIR)/include/catalog/pg_proc.h $(MAKE) -C utils fmgroids.h ############################################################################# clean: - rm -f postgres$(X) $(POSTGRES_IMP) parse.h \ + rm -f postgres$(X) $(POSTGRES_IMP) \ + $(SRCDIR)/include/parser/parse.h \ + $(SRCDIR)/include/utils/fmgroids.h \ global1.bki.source local1_template1.bki.source \ global1.description local1_template1.description ifeq ($(PORTNAME), win) @@ -141,6 +158,9 @@ endif endif for i in $(DIRS); do $(MAKE) -C $$i clean; done +depend dep: prebuildheaders + for i in $(DIRS); do $(MAKE) -C $$i $@; done + .DEFAULT: for i in $(DIRS); do $(MAKE) -C $$i $@; done @@ -202,7 +222,7 @@ install-templates: $(TEMPLATEDIR) \ $(INSTALL) $(INSTLOPTS) pg_options.sample \ $(TEMPLATEDIR)/pg_options.sample -install-headers: utils/fmgroids.h $(SRCDIR)/include/config.h +install-headers: prebuildheaders $(SRCDIR)/include/config.h -@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi -@if [ ! -d $(HEADERDIR)/port ]; then mkdir $(HEADERDIR)/port; fi -@if [ ! -d $(HEADERDIR)/port/$(PORTNAME) ]; \ @@ -239,7 +259,7 @@ install-headers: utils/fmgroids.h $(SRCDIR)/include/config.h $(HEADERDIR)/utils/geo_decls.h $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/elog.h \ $(HEADERDIR)/utils/elog.h - $(INSTALL) $(INSTLOPTS) utils/fmgroids.h \ + $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/fmgroids.h \ $(HEADERDIR)/utils/fmgroids.h $(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/palloc.h \ $(HEADERDIR)/utils/palloc.h @@ -284,7 +304,7 @@ endif # are up to date. It saves the time of doing all the submakes. .PHONY: quick quick: $(OBJS) - $(CC) -o postgres $(OBJS) $(OBJS1) $(LDFLAGS) + $(CC) -o postgres $(OBJS) $(LDFLAGS) # # Build the file, "./ID", used by the "gid" (grep-for-identifier) tool diff --git a/src/backend/access/common/Makefile b/src/backend/access/common/Makefile index fcb707b85c..bdebf29dc5 100644 --- a/src/backend/access/common/Makefile +++ b/src/backend/access/common/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS+=-I../.. - OBJS = heaptuple.o indextuple.o indexvalid.o printtup.o \ scankey.o tupdesc.o diff --git a/src/backend/access/gist/Makefile b/src/backend/access/gist/Makefile index 20b9d1b4ac..16cc0a80e1 100644 --- a/src/backend/access/gist/Makefile +++ b/src/backend/access/gist/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = gist.o gistget.o gistscan.o giststrat.o all: SUBSYS.o diff --git a/src/backend/access/hash/Makefile b/src/backend/access/hash/Makefile index 384036677c..07e5777133 100644 --- a/src/backend/access/hash/Makefile +++ b/src/backend/access/hash/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = hash.o hashfunc.o hashinsert.o hashovfl.o hashpage.o hashscan.o \ hashsearch.o hashstrat.o hashutil.o diff --git a/src/backend/access/heap/Makefile b/src/backend/access/heap/Makefile index cfb16ef750..2824d22b0f 100644 --- a/src/backend/access/heap/Makefile +++ b/src/backend/access/heap/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = heapam.o hio.o stats.o tuptoaster.o all: SUBSYS.o diff --git a/src/backend/access/index/Makefile b/src/backend/access/index/Makefile index edf5cf6c0a..625de982bb 100644 --- a/src/backend/access/index/Makefile +++ b/src/backend/access/index/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = genam.o indexam.o istrat.o all: SUBSYS.o diff --git a/src/backend/access/nbtree/Makefile b/src/backend/access/nbtree/Makefile index 917c23cc0f..ce4fc2b402 100644 --- a/src/backend/access/nbtree/Makefile +++ b/src/backend/access/nbtree/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = nbtcompare.o nbtinsert.o nbtpage.o nbtree.o nbtscan.o nbtsearch.o \ nbtstrat.o nbtutils.o nbtsort.o diff --git a/src/backend/access/rtree/Makefile b/src/backend/access/rtree/Makefile index b42c2528c1..d40c682fc9 100644 --- a/src/backend/access/rtree/Makefile +++ b/src/backend/access/rtree/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = rtget.o rtproc.o rtree.o rtscan.o rtstrat.o all: SUBSYS.o diff --git a/src/backend/access/transam/Makefile b/src/backend/access/transam/Makefile index b92a3e750b..59b23ab648 100644 --- a/src/backend/access/transam/Makefile +++ b/src/backend/access/transam/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = transam.o transsup.o varsup.o xact.o xid.o xlog.o rmgr.o all: SUBSYS.o diff --git a/src/backend/bootstrap/Makefile b/src/backend/bootstrap/Makefile index e949e7b28e..4b23852b97 100644 --- a/src/backend/bootstrap/Makefile +++ b/src/backend/bootstrap/Makefile @@ -19,9 +19,7 @@ #------------------------------------------------------------------------- SRCDIR= ../.. -include ../../Makefile.global - -CFLAGS += -I.. +include $(SRCDIR)/Makefile.global ifeq ($(CC), gcc) CFLAGS+= -Wno-error @@ -29,20 +27,18 @@ endif BOOTYACCS= bootstrap_tokens.h bootparse.c +ifneq ($(PORTNAME), qnx4) OBJS= bootparse.o bootscanner.o bootstrap.o -ifeq ($(PORTNAME), qnx4) -# wlink currently crashes with bootstrap.o -OBJS1= bootparse.o bootscanner.o +else +# qnx4's wlink currently crashes with bootstrap.o +OBJS= bootparse.o bootscanner.o endif -all: SUBSYS.o +# make sure bootstrap.o is built even on qnx4 +all: SUBSYS.o bootstrap.o SUBSYS.o: $(OBJS) -ifneq ($(PORTNAME), qnx4) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) -else - $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS1) -endif # bootstrap.o's dependency on bootstrap_tokens.h is computed by the # make depend, but we state it here explicitly anyway because @@ -65,7 +61,7 @@ bootscanner.c: bootscanner.l rm -f lex.yy.c sedfile clean: - rm -f SUBSYS.o $(OBJS) + rm -f SUBSYS.o $(OBJS) bootstrap.o # And the garbage that might have been left behind by partial build: rm -f y.tab.h y.tab.c y.output lex.yy.c @@ -77,4 +73,3 @@ dep depend: bootparse.c bootscanner.c bootstrap_tokens.h ifeq (depend,$(wildcard depend)) include depend endif - diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile index 7a46c3d666..e3212883dd 100644 --- a/src/backend/catalog/Makefile +++ b/src/backend/catalog/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../.. include ../../Makefile.global -CFLAGS += -I.. - OBJS = catalog.o heap.o index.o indexing.o aclchk.o \ pg_aggregate.o pg_operator.o pg_proc.o pg_type.o diff --git a/src/backend/commands/Makefile b/src/backend/commands/Makefile index 70e18bd9a1..f1b7557a6c 100644 --- a/src/backend/commands/Makefile +++ b/src/backend/commands/Makefile @@ -9,9 +9,7 @@ #------------------------------------------------------------------------- SRCDIR = ../.. -include ../../Makefile.global - -CFLAGS += -I.. +include $(SRCDIR)/Makefile.global OBJS = async.o creatinh.o command.o comment.o copy.o indexcmds.o define.o \ remove.o rename.o vacuum.o view.o cluster.o \ @@ -23,15 +21,6 @@ all: SUBSYS.o SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) -# The following declares a hard-coded dependency on parse.h since, -# if compiled without make dep, comment.c would get compiled before -# the parser. - -comment.o: ../parse.h - -../parse.h: - $(MAKE) -C .. parse.h - depend dep: $(CC) -MM $(CFLAGS) *.c >depend diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index b36a649840..e1457b9288 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -51,7 +51,7 @@ #include "commands/comment.h" #include "access/genam.h" #include "optimizer/clauses.h" -#include "../parser/parse.h" +#include "parser/parse.h" #endif /* _DROP_COLUMN_HACK__ */ /* ---------------- diff --git a/src/backend/executor/Makefile b/src/backend/executor/Makefile index 51bcb8fe1d..06b2190ca6 100644 --- a/src/backend/executor/Makefile +++ b/src/backend/executor/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../.. include ../../Makefile.global -CFLAGS += -I.. - OBJS = execAmi.o execFlatten.o execJunk.o execMain.o \ execProcnode.o execQual.o execScan.o execTuples.o \ execUtils.o functions.o nodeAppend.o nodeAgg.o nodeHash.o \ diff --git a/src/backend/lib/Makefile b/src/backend/lib/Makefile index a830b9cac7..10fd672220 100644 --- a/src/backend/lib/Makefile +++ b/src/backend/lib/Makefile @@ -11,10 +11,6 @@ SRCDIR = ../.. include ../../Makefile.global -INCLUDE_OPT = -I.. - -CFLAGS+=$(INCLUDE_OPT) - OBJS = bit.o fstack.o hasht.o lispsort.o stringinfo.o dllist.o all: SUBSYS.o @@ -23,7 +19,7 @@ SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f SUBSYS.o $(OBJS) diff --git a/src/backend/libpq/Makefile b/src/backend/libpq/Makefile index b8e865e21c..f38ec951ff 100644 --- a/src/backend/libpq/Makefile +++ b/src/backend/libpq/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../.. include ../../Makefile.global -CFLAGS += -I.. - # kerberos flags ifdef KRBVERS CFLAGS+= $(KRBFLAGS) diff --git a/src/backend/main/Makefile b/src/backend/main/Makefile index 700187dd32..f2fe752437 100644 --- a/src/backend/main/Makefile +++ b/src/backend/main/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../.. include ../../Makefile.global -CFLAGS += -I.. - OBJS = main.o all: SUBSYS.o diff --git a/src/backend/nodes/Makefile b/src/backend/nodes/Makefile index 1e6aebf1e4..c769d37464 100644 --- a/src/backend/nodes/Makefile +++ b/src/backend/nodes/Makefile @@ -9,9 +9,7 @@ #------------------------------------------------------------------------- SRCDIR = ../.. -include ../../Makefile.global - -CFLAGS += -I.. +include $(SRCDIR)/Makefile.global OBJS = nodeFuncs.o nodes.o list.o \ copyfuncs.o equalfuncs.o freefuncs.o makefuncs.o outfuncs.o \ @@ -22,12 +20,7 @@ all: SUBSYS.o SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) -outfuncs.o: ../parse.h - -../parse.h: - $(MAKE) -C .. parse.h - -depend dep: ../parse.h +depend dep: $(CC) -MM $(CFLAGS) *.c >depend clean: diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 70a6109116..c6e3bb6d1c 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -36,11 +36,11 @@ #include "nodes/plannodes.h" #include "nodes/primnodes.h" #include "nodes/relation.h" +#include "parser/parse.h" #include "utils/datum.h" #include "utils/lsyscache.h" #include "utils/syscache.h" -#include "../parse.h" static void _outDatum(StringInfo str, Datum value, Oid type); static void _outNode(StringInfo str, void *obj); diff --git a/src/backend/optimizer/geqo/Makefile b/src/backend/optimizer/geqo/Makefile index ff2a9ce503..0814a25bc5 100644 --- a/src/backend/optimizer/geqo/Makefile +++ b/src/backend/optimizer/geqo/Makefile @@ -12,8 +12,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - ifeq ($(CC), gcc) CFLAGS+= -Wno-error endif diff --git a/src/backend/optimizer/path/Makefile b/src/backend/optimizer/path/Makefile index c31ec52001..0a87671c1c 100644 --- a/src/backend/optimizer/path/Makefile +++ b/src/backend/optimizer/path/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = allpaths.o clausesel.o costsize.o indxpath.o \ joinpath.o joinrels.o orindxpath.o pathkeys.o tidpath.o diff --git a/src/backend/optimizer/plan/Makefile b/src/backend/optimizer/plan/Makefile index a1b7c05695..b03d83afdd 100644 --- a/src/backend/optimizer/plan/Makefile +++ b/src/backend/optimizer/plan/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = createplan.o initsplan.o planmain.o planner.o setrefs.o subselect.o # not ready yet: predmig.o xfunc.o diff --git a/src/backend/optimizer/prep/Makefile b/src/backend/optimizer/prep/Makefile index d224820e50..312f9d2124 100644 --- a/src/backend/optimizer/prep/Makefile +++ b/src/backend/optimizer/prep/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = prepqual.o preptlist.o prepunion.o prepkeyset.o # not ready yet: predmig.o xfunc.o diff --git a/src/backend/optimizer/util/Makefile b/src/backend/optimizer/util/Makefile index d1f7d28e63..bf5d9e884c 100644 --- a/src/backend/optimizer/util/Makefile +++ b/src/backend/optimizer/util/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = restrictinfo.o clauses.o indexnode.o plancat.o \ joininfo.o pathnode.o relnode.o tlist.o var.o diff --git a/src/backend/parser/Makefile b/src/backend/parser/Makefile index 5de8d2dd38..264b1eb991 100644 --- a/src/backend/parser/Makefile +++ b/src/backend/parser/Makefile @@ -11,8 +11,6 @@ SRCDIR= ../.. include ../../Makefile.global -CFLAGS += -I.. - ifeq ($(CC), gcc) CFLAGS+= -Wno-error endif diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index bfb7659997..a3ec7b3cfd 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -18,8 +18,8 @@ #include "catalog/pg_index.h" #include "catalog/pg_type.h" #include "nodes/makefuncs.h" -#include "parse.h" #include "parser/analyze.h" +#include "parser/parse.h" #include "parser/parse_agg.h" #include "parser/parse_clause.h" #include "parser/parse_relation.h" diff --git a/src/backend/parser/keywords.c b/src/backend/parser/keywords.c index ccf8fb28b9..74343b76ff 100644 --- a/src/backend/parser/keywords.c +++ b/src/backend/parser/keywords.c @@ -15,10 +15,11 @@ #include <ctype.h> #include "postgres.h" + #include "nodes/parsenodes.h" #include "nodes/pg_list.h" -#include "parse.h" #include "parser/keywords.h" +#include "parser/parse.h" /* * List of (keyword-name, keyword-token-value) pairs. diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index ace52d9328..3aaa4c8283 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -14,11 +14,12 @@ */ #include "postgres.h" + #include "access/heapam.h" #include "miscadmin.h" #include "optimizer/tlist.h" -#include "parse.h" #include "nodes/makefuncs.h" +#include "parser/parse.h" #include "parser/parse_clause.h" #include "parser/parse_coerce.h" #include "parser/parse_expr.h" diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index fce425d60d..2951497337 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -20,9 +20,9 @@ #include "nodes/makefuncs.h" #include "nodes/params.h" #include "nodes/relation.h" -#include "parse.h" #include "parser/analyze.h" #include "parser/gramparse.h" +#include "parser/parse.h" #include "parser/parse_coerce.h" #include "parser/parse_expr.h" #include "parser/parse_func.h" diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l index 501efaf665..26e24171da 100644 --- a/src/backend/parser/scan.l +++ b/src/backend/parser/scan.l @@ -25,9 +25,9 @@ #include "miscadmin.h" #include "nodes/parsenodes.h" #include "nodes/pg_list.h" -#include "parse.h" #include "parser/gramparse.h" #include "parser/keywords.h" +#include "parser/parse.h" #include "parser/scansup.h" #include "utils/builtins.h" diff --git a/src/backend/port/Makefile.in b/src/backend/port/Makefile.in index d8a1e34975..8e2dfe3c19 100644 --- a/src/backend/port/Makefile.in +++ b/src/backend/port/Makefile.in @@ -20,8 +20,6 @@ SRCDIR=../.. include ../../Makefile.global -CFLAGS+= -I.. - OBJS = dynloader.o @INET_ATON@ @STRERROR@ @MISSING_RANDOM@ @SRANDOM@ OBJS+= @GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@ @STRDUP@ @TAS@ @ISINF@ OBJS+= @STRTOL@ @STRTOUL@ @SNPRINTF@ diff --git a/src/backend/port/nextstep/Makefile b/src/backend/port/nextstep/Makefile index 8e5f4ffd0d..1399014dde 100644 --- a/src/backend/port/nextstep/Makefile +++ b/src/backend/port/nextstep/Makefile @@ -8,10 +8,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -INCLUDE_OPT = -I../.. - -CFLAGS+=$(INCLUDE_OPT) - OBJS = dynloader.o port.o all: SUBSYS.o @@ -20,7 +16,7 @@ SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f SUBSYS.o $(OBJS) diff --git a/src/backend/port/qnx4/Makefile b/src/backend/port/qnx4/Makefile index 81ead99983..096f8d7ab7 100644 --- a/src/backend/port/qnx4/Makefile +++ b/src/backend/port/qnx4/Makefile @@ -11,10 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -INCLUDE_OPT = -I../.. - -CFLAGS+=$(INCLUDE_OPT) - OBJS = isnan.o rint.o sem.o shm.o all: SUBSYS.o tstrint tstsem tstshm @@ -32,7 +28,7 @@ tstshm: tstshm.o shm.o $(CC) -o tstshm shm.o tstshm.o depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f SUBSYS.o $(OBJS) tstrint tstrint.o tstsem tstsem.o tstshm tstshm.o diff --git a/src/backend/port/sunos4/Makefile b/src/backend/port/sunos4/Makefile index 18ab2ab74a..6477bc43dc 100644 --- a/src/backend/port/sunos4/Makefile +++ b/src/backend/port/sunos4/Makefile @@ -11,10 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -INCLUDE_OPT = -I../.. - -CFLAGS+=$(INCLUDE_OPT) - OBJS = strtol.o all: SUBSYS.o @@ -23,7 +19,7 @@ SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f SUBSYS.o $(OBJS) diff --git a/src/backend/postmaster/Makefile b/src/backend/postmaster/Makefile index ca51b98ad9..b1a11571f0 100644 --- a/src/backend/postmaster/Makefile +++ b/src/backend/postmaster/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../.. include ../../Makefile.global -CFLAGS += -I.. - OBJS = postmaster.o all: SUBSYS.o diff --git a/src/backend/regex/Makefile b/src/backend/regex/Makefile index 4053c1f2d3..2c60ad8a91 100644 --- a/src/backend/regex/Makefile +++ b/src/backend/regex/Makefile @@ -11,7 +11,6 @@ SRCDIR = ../.. include ../../Makefile.global -CFLAGS += -I.. CFLAGS += -DPOSIX_MISTAKE DEBUGOBJ = diff --git a/src/backend/rewrite/Makefile b/src/backend/rewrite/Makefile index 9002a31b08..7f0c7501f3 100644 --- a/src/backend/rewrite/Makefile +++ b/src/backend/rewrite/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../.. include ../../Makefile.global -CFLAGS += -I.. - OBJS = rewriteRemove.o rewriteDefine.o \ rewriteHandler.o rewriteManip.o rewriteSupport.o locks.o diff --git a/src/backend/storage/buffer/Makefile b/src/backend/storage/buffer/Makefile index 0af25c1128..3eb30a2369 100644 --- a/src/backend/storage/buffer/Makefile +++ b/src/backend/storage/buffer/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = buf_table.o buf_init.o bufmgr.o freelist.o localbuf.o s_lock.o all: SUBSYS.o diff --git a/src/backend/storage/file/Makefile b/src/backend/storage/file/Makefile index 8016b8425e..efb627aba7 100644 --- a/src/backend/storage/file/Makefile +++ b/src/backend/storage/file/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = fd.o buffile.o all: SUBSYS.o diff --git a/src/backend/storage/ipc/Makefile b/src/backend/storage/ipc/Makefile index 86f19782d4..cbe0b88e61 100644 --- a/src/backend/storage/ipc/Makefile +++ b/src/backend/storage/ipc/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - # seems to be required 1999/07/22 bjm ifeq ($(CPU),alpha) ifeq ($(CC), gcc) diff --git a/src/backend/storage/large_object/Makefile b/src/backend/storage/large_object/Makefile index 2d6e441d18..086cccc88a 100644 --- a/src/backend/storage/large_object/Makefile +++ b/src/backend/storage/large_object/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = inv_api.o all: SUBSYS.o diff --git a/src/backend/storage/lmgr/Makefile b/src/backend/storage/lmgr/Makefile index 274d7fc406..34d6893161 100644 --- a/src/backend/storage/lmgr/Makefile +++ b/src/backend/storage/lmgr/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = lmgr.o lock.o proc.o all: SUBSYS.o diff --git a/src/backend/storage/page/Makefile b/src/backend/storage/page/Makefile index bd397514dc..025a411fc3 100644 --- a/src/backend/storage/page/Makefile +++ b/src/backend/storage/page/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = bufpage.o itemptr.o all: SUBSYS.o diff --git a/src/backend/storage/smgr/Makefile b/src/backend/storage/smgr/Makefile index 12b8ae1f54..5654c58558 100644 --- a/src/backend/storage/smgr/Makefile +++ b/src/backend/storage/smgr/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = md.o mm.o smgr.o smgrtype.o all: SUBSYS.o diff --git a/src/backend/tcop/Makefile b/src/backend/tcop/Makefile index 4f4b45a2bb..0a85c24622 100644 --- a/src/backend/tcop/Makefile +++ b/src/backend/tcop/Makefile @@ -9,9 +9,7 @@ #------------------------------------------------------------------------- SRCDIR= ../.. -include ../../Makefile.global - -CFLAGS+= -I.. +include $(SRCDIR)/Makefile.global ifeq ($(CC), gcc) CFLAGS+= -Wno-error @@ -24,17 +22,7 @@ all: SUBSYS.o SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) -# The following dependencies are picked up by the make dep, but since -# not everyone can do make dep, and these are particularly important -# dependencies (because they don't even exist until you make them), -# they are hardcoded here. - -utility.o: ../parse.h - -../parse.h: - $(MAKE) -C .. parse.h - -dep depend: ../parse.h +depend dep: $(CC) -MM $(CFLAGS) *.c >depend clean: diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 7e7ae86ba0..99e5f49ad2 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -48,6 +48,7 @@ #include "nodes/print.h" #include "optimizer/cost.h" #include "optimizer/planner.h" +#include "parser/parse.h" #include "parser/parser.h" #include "rewrite/rewriteHandler.h" #include "tcop/fastpath.h" @@ -58,9 +59,6 @@ #include "utils/ps_status.h" #include "utils/temprel.h" #include "utils/trace.h" - -#include "../backend/parser/parse.h" - #ifdef MULTIBYTE #include "mb/pg_wchar.h" #endif @@ -1452,7 +1450,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.155 $ $Date: 2000/05/21 02:23:30 $\n"); + puts("$Revision: 1.156 $ $Date: 2000/05/29 05:45:16 $\n"); } /* diff --git a/src/backend/tioga/Makefile b/src/backend/tioga/Makefile index 983643be35..460b75871c 100644 --- a/src/backend/tioga/Makefile +++ b/src/backend/tioga/Makefile @@ -11,10 +11,6 @@ SRCDIR = ../.. include ../../Makefile.global -INCLUDE_OPT = -I.. - -CFLAGS+=$(INCLUDE_OPT) - OBJS = tgRecipe.o Varray.o all: SUBSYS.o @@ -23,7 +19,7 @@ SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend + $(CC) -MM $(CFLAGS) *.c >depend clean: rm -f SUBSYS.o $(OBJS) diff --git a/src/backend/utils/Makefile b/src/backend/utils/Makefile index 5521c4d88d..1e55fd5ad0 100644 --- a/src/backend/utils/Makefile +++ b/src/backend/utils/Makefile @@ -11,10 +11,6 @@ SRCDIR = ../.. include $(SRCDIR)/Makefile.global -INCLUDE_OPT = -I.. - -CFLAGS+=$(INCLUDE_OPT) - all: submake SUBSYS.o OBJS = fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o \ diff --git a/src/backend/utils/adt/Makefile b/src/backend/utils/adt/Makefile index 9761e80174..f901325e67 100644 --- a/src/backend/utils/adt/Makefile +++ b/src/backend/utils/adt/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - # seems to be required for some date/time stuff 1999/07/22 bjm ifeq ($(CPU),alpha) ifeq ($(CC), gcc) diff --git a/src/backend/utils/cache/Makefile b/src/backend/utils/cache/Makefile index b29828e371..7c1a1408ab 100644 --- a/src/backend/utils/cache/Makefile +++ b/src/backend/utils/cache/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = catcache.o inval.o rel.o relcache.o syscache.o lsyscache.o \ fcache.o temprel.o diff --git a/src/backend/utils/error/Makefile b/src/backend/utils/error/Makefile index fc1b9dab63..b1771f9033 100644 --- a/src/backend/utils/error/Makefile +++ b/src/backend/utils/error/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = assert.o elog.o exc.o excabort.o excid.o format.o all: SUBSYS.o diff --git a/src/backend/utils/fmgr/Makefile b/src/backend/utils/fmgr/Makefile index dfcf011509..d27f9edaba 100644 --- a/src/backend/utils/fmgr/Makefile +++ b/src/backend/utils/fmgr/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = dfmgr.o fmgr.o all: SUBSYS.o diff --git a/src/backend/utils/hash/Makefile b/src/backend/utils/hash/Makefile index 19748db826..ae3c1fa749 100644 --- a/src/backend/utils/hash/Makefile +++ b/src/backend/utils/hash/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = dynahash.o hashfn.o all: SUBSYS.o diff --git a/src/backend/utils/init/Makefile b/src/backend/utils/init/Makefile index 42ed87bbdf..20a48fb613 100644 --- a/src/backend/utils/init/Makefile +++ b/src/backend/utils/init/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = enbl.o findbe.o globals.o miscinit.o postinit.o all: SUBSYS.o diff --git a/src/backend/utils/mb/Makefile b/src/backend/utils/mb/Makefile index d58616d1cd..960009d3f5 100644 --- a/src/backend/utils/mb/Makefile +++ b/src/backend/utils/mb/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = common.o conv.o mbutils.o wchar.o wstrcmp.o wstrncmp.o variable.o \ big5.o diff --git a/src/backend/utils/misc/Makefile b/src/backend/utils/misc/Makefile index acf90c1d2b..8c44d4378b 100644 --- a/src/backend/utils/misc/Makefile +++ b/src/backend/utils/misc/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = database.o superuser.o trace.o all: SUBSYS.o diff --git a/src/backend/utils/mmgr/Makefile b/src/backend/utils/mmgr/Makefile index 008e484be4..ace272f07f 100644 --- a/src/backend/utils/mmgr/Makefile +++ b/src/backend/utils/mmgr/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = aset.o mcxt.o palloc.o portalmem.o oset.o all: SUBSYS.o diff --git a/src/backend/utils/sort/Makefile b/src/backend/utils/sort/Makefile index 07a4ad9b13..f63ee99fa5 100644 --- a/src/backend/utils/sort/Makefile +++ b/src/backend/utils/sort/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = logtape.o tuplesort.o all: SUBSYS.o diff --git a/src/backend/utils/time/Makefile b/src/backend/utils/time/Makefile index 36ecaa035c..2119f4601b 100644 --- a/src/backend/utils/time/Makefile +++ b/src/backend/utils/time/Makefile @@ -11,8 +11,6 @@ SRCDIR = ../../.. include ../../../Makefile.global -CFLAGS += -I../.. - OBJS = tqual.o all: SUBSYS.o diff --git a/src/bin/pg_encoding/Makefile b/src/bin/pg_encoding/Makefile index b2bdaf06d6..9dfa51f0b5 100644 --- a/src/bin/pg_encoding/Makefile +++ b/src/bin/pg_encoding/Makefile @@ -11,13 +11,9 @@ #------------------------------------------------------------------------- SRCDIR= ../.. -include ../../Makefile.global - -# This is a bit of hackery here: pg_encoding uses backend includes and the -# frontend library. +include $(SRCDIR)/Makefile.global OBJS= pg_encoding.o -CFLAGS:= -I$(SRCDIR)/include $(CFLAGS) all: submake pg_encoding diff --git a/src/bin/pg_version/Makefile.in b/src/bin/pg_version/Makefile.in index d5fb9e9188..f9a41c4c07 100644 --- a/src/bin/pg_version/Makefile.in +++ b/src/bin/pg_version/Makefile.in @@ -14,8 +14,6 @@ SRCDIR= ../.. include $(SRCDIR)/Makefile.global -CFLAGS+= -I$(SRCDIR)/include - OBJS= pg_version.o $(SRCDIR)/utils/version.o @STRERROR2@ all: pg_version diff --git a/src/interfaces/libpgtcl/Makefile.in b/src/interfaces/libpgtcl/Makefile.in index 7898351fc5..ea1c608947 100644 --- a/src/interfaces/libpgtcl/Makefile.in +++ b/src/interfaces/libpgtcl/Makefile.in @@ -17,9 +17,7 @@ SO_MINOR_VERSION= 1 SRCDIR= @top_srcdir@ include $(SRCDIR)/Makefile.global -CFLAGS+= -I$(SRCDIR)/backend \ - -I$(SRCDIR)/include \ - -I$(LIBPQDIR) +CFLAGS+= -I$(LIBPQDIR) ifdef KRBVERS CFLAGS+= $(KRBFLAGS) diff --git a/src/interfaces/libpq++/Makefile.in b/src/interfaces/libpq++/Makefile.in index 18533956c1..272cdb0bdf 100644 --- a/src/interfaces/libpq++/Makefile.in +++ b/src/interfaces/libpq++/Makefile.in @@ -23,9 +23,7 @@ CXXFLAGS=@CXXFLAGS@ SRCHEADERDIR = $(SRCDIR)/include LIBPQHEADERDIR = $(SRCHEADERDIR)/libpq -CXXFLAGS+= -I$(SRCDIR)/backend \ - -I$(SRCHEADERDIR) \ - -I$(LIBPQDIR) +CXXFLAGS+= -I$(SRCHEADERDIR) -I$(LIBPQDIR) ifdef KRBVERS CXXFLAGS+= $(KRBFLAGS) diff --git a/src/interfaces/libpq++/examples/Makefile b/src/interfaces/libpq++/examples/Makefile index 5e277ade32..b30588e4c9 100644 --- a/src/interfaces/libpq++/examples/Makefile +++ b/src/interfaces/libpq++/examples/Makefile @@ -15,9 +15,7 @@ LIBPQDIR= /usr/local/pgsql/lib #CXXFLAGS= $(CFLAGS) -Wno-error -Wno-unused -Wl,-Bdynamic CXXFLAGS= $(CFLAGS) -INCLUDE_OPT= -I$(HEADERDIR) - -CXXFLAGS+= $(INCLUDE_OPT) +CXXFLAGS+= -I$(HEADERDIR) LDFLAGS+= -L$(LIBPQDIR) -lpq++ diff --git a/src/pl/plperl/Makefile.PL b/src/pl/plperl/Makefile.PL index 565e8bbd28..a5b6066b08 100644 --- a/src/pl/plperl/Makefile.PL +++ b/src/pl/plperl/Makefile.PL @@ -54,7 +54,7 @@ my $perllib = "-L$Config{archlibexp}/CORE -lperl"; WriteMakefile( 'NAME' => 'plperl', dynamic_lib => { 'OTHERLDFLAGS' => "$opcode $perllib" } , - INC => '-I$(SRCDIR)/include -I$(SRCDIR)/backend $(PGSQL_INCLUDES)', + INC => '-I$(SRCDIR)/include $(PGSQL_INCLUDES)', XS => { 'SPI.xs' => 'SPI.c' }, OBJECT => 'plperl.o eloglvl.o SPI.o', ); diff --git a/src/pl/plpgsql/src/Makefile.in b/src/pl/plpgsql/src/Makefile.in index f3ead1273c..64e06d9bfa 100644 --- a/src/pl/plpgsql/src/Makefile.in +++ b/src/pl/plpgsql/src/Makefile.in @@ -15,8 +15,6 @@ SO_MINOR_VERSION= 0 SRCDIR= @top_srcdir@ include $(SRCDIR)/Makefile.global -CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend - # If using flex, ask for a case-insensitive, lex-compatible lexer. ifneq (,$(findstring flex,$(LEX))) LFLAGS+= -i -l diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile index b8b2b53ed3..67bef2068f 100644 --- a/src/pl/tcl/Makefile +++ b/src/pl/tcl/Makefile @@ -70,7 +70,7 @@ CFLAGS= $(TCL_CFLAGS_OPTIMIZE) CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS) -CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend $(PGSQL_INCLUDES) +CFLAGS+= -I$(SRCDIR)/include $(PGSQL_INCLUDES) # # Uncomment the following to enable the unknown command lookup diff --git a/src/test/regress/GNUmakefile.in b/src/test/regress/GNUmakefile.in index 9d2ab4b9db..2b84284747 100644 --- a/src/test/regress/GNUmakefile.in +++ b/src/test/regress/GNUmakefile.in @@ -18,7 +18,7 @@ CONTRIB= $(SRCDIR)/../contrib HOST= @host@ -CFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include $(CFLAGS_SL) +CFLAGS+= -I$(LIBPQDIR) $(CFLAGS_SL) LDADD+= -L$(LIBPQDIR) -lpq diff --git a/src/tutorial/Makefile b/src/tutorial/Makefile index b0c93c4906..15372e8158 100644 --- a/src/tutorial/Makefile +++ b/src/tutorial/Makefile @@ -11,7 +11,7 @@ SRCDIR= .. include $(SRCDIR)/Makefile.global -CFLAGS+= -I$(SRCDIR)/include $(CFLAGS_SL) +CFLAGS+= $(CFLAGS_SL) # # DLOBJS is the dynamically-loaded object files. The "funcs" queries |