Commit cee83ef4 authored by Tom Lane's avatar Tom Lane

Invoke submake-generated-headers during "make check", too.

The MAKELEVEL hack to prevent submake-generated-headers from doing
anything in child make runs means that we have to explicitly invoke
it at top level for "make check", too, in case somebody proceeds
directly to that without an explicit "make all".  (I think this
usage had parallel-make hazards even before the addition of more
generated headers; but it was totally broken as of 3b8f6e75.)

Out of paranoia, force the submake-libpq target to depend on
submake-generated-headers, too.  This seems to not be absolutely
necessary today, but it's not really saving us anything to omit
the ordering dependency, and it'll likely break someday without it.

Discussion: https://postgr.es/m/20180411103930.GB31461@momjian.us
parent 92899992
......@@ -355,11 +355,11 @@ BZIP2 = bzip2
# available before building, but we don't want parallel makes all trying
# to build the same headers. These rules, together with the recursion rules
# below, ensure that we update the generated headers once, if needed,
# at the top level of any "make all" or "make install" request. If a
# particular subdirectory knows this isn't needed in itself or its children,
# it can set NO_GENERATED_HEADERS.
# at the top level of any "make all/install/check" request. If a particular
# subdirectory knows this isn't needed in itself or its children, it can set
# NO_GENERATED_HEADERS.
all install: submake-generated-headers
all install check: submake-generated-headers
.PHONY: submake-generated-headers
......@@ -381,7 +381,7 @@ check: temp-install
.PHONY: temp-install
temp-install:
temp-install: | submake-generated-headers
ifndef NO_TEMP_INSTALL
ifneq ($(abs_top_builddir),)
ifeq ($(MAKELEVEL),0)
......@@ -560,7 +560,7 @@ endif
#
# Commonly used submake targets
submake-libpq:
submake-libpq: | submake-generated-headers
$(MAKE) -C $(libpq_builddir) all
submake-libpgport: | submake-generated-headers
......@@ -820,7 +820,7 @@ endif
define _create_recursive_target
.PHONY: $(1)-$(2)-recurse
$(1): $(1)-$(2)-recurse
$(1)-$(2)-recurse: $(if $(filter all install, $(3)), submake-generated-headers) $(if $(filter check, $(3)), temp-install)
$(1)-$(2)-recurse: $(if $(filter all install check, $(3)), submake-generated-headers) $(if $(filter check, $(3)), temp-install)
$$(MAKE) -C $(2) $(3)
endef
# Note that the use of $$ on the last line above is important; we want
......
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