aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/Makefile30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/backend/Makefile b/src/backend/Makefile
index ec2dc7be404..3b08defe2bc 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -110,18 +110,12 @@ endif
endif # aix
# Update the commonly used headers before building the subdirectories
-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/storage/lwlocknames.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h
+$(SUBDIRS:%=%-recursive): | generated-headers
-# run this unconditionally to avoid needing to know its dependencies here:
-submake-schemapg:
- $(MAKE) -C catalog schemapg.h
-
-# src/port needs a convenient way to force errcodes.h to get built
+# src/port needs a convenient way to force just errcodes.h to get built
submake-errcodes: $(top_builddir)/src/include/utils/errcodes.h
-.PHONY: submake-schemapg submake-errcodes
-
-catalog/schemapg.h: | submake-schemapg
+.PHONY: submake-errcodes
$(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport
@@ -142,15 +136,23 @@ parser/gram.h: parser/gram.y
storage/lmgr/lwlocknames.h: storage/lmgr/generate-lwlocknames.pl storage/lmgr/lwlocknames.txt
$(MAKE) -C storage/lmgr lwlocknames.h
-utils/fmgroids.h: utils/Gen_fmgrtab.pl catalog/Catalog.pm $(top_srcdir)/src/include/catalog/pg_proc.h
- $(MAKE) -C utils fmgroids.h
-
utils/errcodes.h: utils/generate-errcodes.pl utils/errcodes.txt
$(MAKE) -C utils errcodes.h
+utils/fmgroids.h: utils/Gen_fmgrtab.pl catalog/Catalog.pm $(top_srcdir)/src/include/catalog/pg_proc.h
+ $(MAKE) -C utils fmgroids.h
+
utils/probes.h: utils/probes.d
$(MAKE) -C utils probes.h
+# run this unconditionally to avoid needing to know its dependencies here:
+catalog/schemapg.h: | submake-schemapg
+
+submake-schemapg:
+ $(MAKE) -C catalog schemapg.h
+
+.PHONY: submake-schemapg
+
# Make symlinks for these headers in the include directory. That way
# we can cut down on the -I options. Also, a symlink is automatically
# up to date when we update the base file.
@@ -162,6 +164,10 @@ utils/probes.h: utils/probes.d
# will be in the build tree, so a simple ../.. reference won't work.
# For headers generated during regular builds, we prefer a relative symlink.
+.PHONY: generated-headers
+
+generated-headers: $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/storage/lwlocknames.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h
+
$(top_builddir)/src/include/parser/gram.h: parser/gram.h
prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
cd '$(dir $@)' && rm -f $(notdir $@) && \