diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-04-11 13:18:50 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-04-11 13:18:54 -0400 |
commit | cee83ef4a243c87683a4f472bab0e005b8b56f3c (patch) | |
tree | de688109bb020fdb9a15cf6382e4d5107af79d38 | |
parent | 92899992e13a089fb8915b02e45792998996530e (diff) | |
download | postgresql-cee83ef4a243c87683a4f472bab0e005b8b56f3c.tar.gz postgresql-cee83ef4a243c87683a4f472bab0e005b8b56f3c.zip |
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 3b8f6e75f.)
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
-rw-r--r-- | src/Makefile.global.in | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 408736cb290..252920279fc 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -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 |