From: Tom Lane Date: Mon, 30 Jul 2018 22:04:39 +0000 (-0400) Subject: Ensure we build generated headers at the start of some more cases. X-Git-Tag: REL_12_BETA1~1793 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7dc5a96aa21816ef1223be9c23e10a88db857d8f;p=postgresql Ensure we build generated headers at the start of some more cases. "make installcheck" and some related cases, when invoked from the toplevel directory, start out by doing "make all" in src/test/regress. Since that's one make recursion level down, the submake-generated-headers target will do nothing, causing us to fail to create/update generated headers before building pg_regress. This is, I believe, a new failure mode induced by commit 3b8f6e75f, so let's fix it. To do so, we have to invoke submake-generated-headers at the top level. Discussion: https://postgr.es/m/0401efec-68f1-679d-3ea3-21d4e8dd11af@gmail.com --- diff --git a/GNUmakefile.in b/GNUmakefile.in index dc76a5d11d..973fef54fb 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -63,7 +63,7 @@ distclean maintainer-clean: @rm -rf autom4te.cache/ rm -f config.cache config.log config.status GNUmakefile -check check-tests installcheck installcheck-parallel installcheck-tests: +check check-tests installcheck installcheck-parallel installcheck-tests: submake-generated-headers $(MAKE) -C src/test/regress $@ $(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,check) diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 95d090e72d..91d7cb83dc 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/install/check" 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/installcheck" request. +# If a particular subdirectory knows this isn't needed in itself or its +# children, it can set NO_GENERATED_HEADERS. -all install check: submake-generated-headers +all install check installcheck: submake-generated-headers .PHONY: submake-generated-headers @@ -806,8 +806,8 @@ $(error GNU make 3.80 or newer is required. You are using version $(MAKE_VERSIO endif # This function is only for internal use below. It should be called -# using $(eval). It will set up a target so that it recurses into -# a given subdirectory. For the tree-wide all/install/check cases, +# using $(eval). It will set up a target so that it recurses into a +# given subdirectory. For the tree-wide all/install/check/installcheck cases, # ensure we do our one-time tasks before recursing (see targets above). # Note that to avoid a nasty bug in make 3.80, # this function has to avoid using any complicated constructs (like @@ -820,7 +820,7 @@ endif define _create_recursive_target .PHONY: $(1)-$(2)-recurse $(1): $(1)-$(2)-recurse -$(1)-$(2)-recurse: $(if $(filter all install check, $(3)), submake-generated-headers) $(if $(filter check, $(3)), temp-install) +$(1)-$(2)-recurse: $(if $(filter all install check installcheck, $(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