From 52f44615cecf0c0038d79374423d4b5042f0a07c Mon Sep 17 00:00:00 2001 From: John Naylor Date: Sat, 27 Apr 2024 11:38:41 +0700 Subject: [PATCH] Fix make headerscheck In the wake of commits dac048f71 and ecaf7c5df, `make headerscheck` no longer generated all headers that are included by other headers, causing headerscheck/cpluspluscheck to fail. To fix, backpatch enough makefile rules from 721856ff2 to generate all required headers. Reported by Marina Polyakova Backpatch to version 16 only, as the issue is not present on master Discussion: https://postgr.es/m/231ea1127719b2b3d6d1c05f75808981%40postgrespro.ru --- src/backend/Makefile | 2 +- src/backend/utils/Makefile | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/backend/Makefile b/src/backend/Makefile index 3c42003175..82cae98a44 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -160,7 +160,7 @@ submake-utils-headers: .PHONY: generated-headers -generated-headers: $(top_builddir)/src/include/storage/lwlocknames.h submake-catalog-headers submake-nodes-headers submake-utils-headers +generated-headers: $(top_builddir)/src/include/storage/lwlocknames.h submake-catalog-headers submake-nodes-headers submake-utils-headers parser/gram.h $(top_builddir)/src/include/storage/lwlocknames.h: storage/lmgr/lwlocknames.h prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \ diff --git a/src/backend/utils/Makefile b/src/backend/utils/Makefile index deb901609f..4299735cb6 100644 --- a/src/backend/utils/Makefile +++ b/src/backend/utils/Makefile @@ -38,9 +38,12 @@ all: distprep probes.h generated-header-symlinks distprep: fmgr-stamp errcodes.h -.PHONY: generated-header-symlinks +.PHONY: generated-header-symlinks submake-adt-headers -generated-header-symlinks: $(top_builddir)/src/include/utils/header-stamp $(top_builddir)/src/include/utils/probes.h +generated-header-symlinks: $(top_builddir)/src/include/utils/header-stamp $(top_builddir)/src/include/utils/probes.h submake-adt-headers + +submake-adt-headers: + $(MAKE) -C adt jsonpath_gram.h $(SUBDIRS:%=%-recursive): fmgr-stamp errcodes.h