From aadbcc40bc24362070b5d88769b62f2d62fdedfb Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Wed, 24 Sep 2025 12:28:20 -0400
Subject: [PATCH] Ensure guc_tables.o's dependency on guc_tables.inc.c is
 known.

Without this, rebuilds can malfunction unless --enable-depend is used.
Historically we've expected that you can get away without
--enable-depend as long as you manually clean after changing *.h
files; the makefiles are supposed to handle other sorts of
dependencies.  So add this one.

Follow-on to 635998965, so no need for back-patch.

Discussion: https://postgr.es/m/3121329.1758650878@sss.pgh.pa.us
---
 src/backend/utils/misc/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/backend/utils/misc/Makefile b/src/backend/utils/misc/Makefile
index b362ae4377..f142d17178 100644
--- a/src/backend/utils/misc/Makefile
+++ b/src/backend/utils/misc/Makefile
@@ -40,6 +40,9 @@ ifdef krb_srvtab
 override CPPFLAGS += -DPG_KRB_SRVTAB='"$(krb_srvtab)"'
 endif
 
+# Force this dependency to be known even without dependency info built:
+guc_tables.o: guc_tables.c $(top_builddir)/src/backend/utils/guc_tables.inc.c
+
 include $(top_srcdir)/src/backend/common.mk
 
 clean:
-- 
2.39.5

