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
.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` && \
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