summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/Makefile
diff options
context:
space:
mode:
authorTom Lane2002-11-01 22:52:34 +0000
committerTom Lane2002-11-01 22:52:34 +0000
commitcab9437a43db6b233e2308aeb71a0b3bac600410 (patch)
tree280ba825388918ace298e05f4d306b9cf71847ae /src/backend/utils/misc/Makefile
parent1e970dcee821fbf6b1fa2aa64765ca762e0491f7 (diff)
Arrange to compile flex output files as inclusions into other files
(usually bison output files), not as standalone files. This hack works around flex's insistence on including <stdio.h> before we are able to include postgres.h; postgres.h will already be read before the compiler starts to read the flex output file. Needed for largefile support on some platforms.
Diffstat (limited to 'src/backend/utils/misc/Makefile')
-rw-r--r--src/backend/utils/misc/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/utils/misc/Makefile b/src/backend/utils/misc/Makefile
index 10b759dae8e..1f440a19e16 100644
--- a/src/backend/utils/misc/Makefile
+++ b/src/backend/utils/misc/Makefile
@@ -1,10 +1,12 @@
-# $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.19 2000/10/20 21:03:55 petere Exp $
+# $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.20 2002/11/01 22:52:33 tgl Exp $
subdir = src/backend/utils/misc
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
-OBJS = database.o superuser.o guc.o guc-file.o ps_status.o
+override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
+
+OBJS = database.o superuser.o guc.o ps_status.o
# This location might depend on the installation directories. Therefore
# we can't subsitute it into config.h.
@@ -18,6 +20,9 @@ all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
+# guc-file is compiled as part of guc
+guc.o: $(srcdir)/guc-file.c
+
$(srcdir)/guc-file.c: guc-file.l
ifdef FLEX
$(FLEX) $(FLEXFLAGS) $<