Subject: Re: bug#58771: 29.0.50; context submenu can not click when run emacs lucid build.

From: Paul Eggert <[email-masked]>
Date: Fri, 13 Jan 2023 18:28:23 -0800

On 2023-01-12 23:32, Eli Zaretskii wrote:
> Paul, is it true that lwlib/Makefile.in needs to define ALLOBJS for
> the deps stuff to work correctly?

Although that should work, the attached proposed emacs-29 fix is a bit 
cleaner.

I've been bitten by the bug myself but never found the time to report or 
fix it until now. Although the bug is not a regression its symptoms are 
mysterious and the patch is simple and obvious. Your call as to which 
branch it should go into.
From cff3f7e057d09b1dd0ec2aeadaa34fd06599ff6b Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Fri, 13 Jan 2023 18:22:47 -0800
Subject: [PATCH] Fix dependency bug when building lwlib

* lwlib/Makefile.in (DEPFLAGS): Use OBJS to calculate dependency
file names, not ALLOBJS.  This fixes a typo introduced
in 2015-05-15 "Replace AC_SUBST_FILE in configure with include in
Makefiles" that caused lwlib/*.o to not be rebuilt sometimes
when that was needed.
---
 lwlib/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index 903461a2f4a..70f6cd17d78 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -63,7 +63,7 @@ AUTO_DEPEND =
 DEPDIR = deps
 ifeq ($(AUTO_DEPEND),yes)
   DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP
-  -include $(ALLOBJS:%.o=$(DEPDIR)/%.d)
+  -include $(OBJS:%.o=$(DEPDIR)/%.d)
 else
   DEPFLAGS =
   include $(srcdir)/deps.mk
-- 
2.37.2