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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 13 Jan 2023 09:32:11 +0200

> From: Po Lu <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked],  [email-masked],
>   [email-masked],  [email-masked]
> Date: Fri, 13 Jan 2023 15:19:31 +0800
> 
> Mike Kupfer <[email-masked]> writes:
> > Could it be that the root cause for this is that ALLOBJS is not
> > defined in lwlib/Makefile.in?
> 
> I think you've identified the problem.  I tried hacking lwlib/Makefile
> as follows:
> 
> --- Makefile~	2022-12-29 17:42:05.288751298 -0800
> +++ Makefile	2023-01-12 21:08:24.717146041 -0800
> @@ -57,6 +57,8 @@
>  
>  OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o
>  
> +ALLOBJS = $(OBJS)
> +
>  -include ${top_builddir}/src/verbose.mk
>  
>  AUTO_DEPEND = yes
> 
> Now, when I touch src/globals.h and run "make", xlwmenu.o does get
> rebuilt.

> > Po Lu wrote:
> >
> >> Mike, what are the contents of lwlib/deps/xlwmenu.d on your system?
> >
> > I've attached the version from my most recent backup.  Its mtime
> > predates when I built the broken binary.  The contents are the same as
> > what's currently in my build tree.
> >
> > mike
> >
> > xlwmenu.o: xlwmenu.c ../src/config.h ../src/conf_post.h ../src/lisp.h \
> >  ../lib/alloca.h ../lib/string.h ../lib/inttypes.h ../lib/attribute.h \
> >  ../lib/intprops.h ../lib/intprops-internal.h ../lib/verify.h \
> >  ../src/globals.h ../src/comp.h ../src/dynlib.h ../src/thread.h \
> >  ../src/regex-emacs.h ../src/lisp.h ../src/sysselect.h \
> >  ../lib/sys/select.h ../src/systhread.h ../lib/stdio.h xlwmenuP.h \
> >  xlwmenu.h lwlib.h lwlib-widget.h ../src/lisp.h lwlib-utils.h \
> >  ../src/xterm.h ../src/dispextern.h ../src/character.h ../lib/c-strcase.h \
> >  ../src/fontset.h ../src/termhooks.h ../src/systime.h ../lib/timespec.h \
> >  ../lib/arg-nonnull.h ../src/bitmaps/gray.xbm
> > ../src/config.h:
> > ../src/conf_post.h:
> > ../src/lisp.h:
> > ../lib/alloca.h:
> > ../lib/string.h:
> > ../lib/inttypes.h:
> > ../lib/attribute.h:
> > ../lib/intprops.h:
> > ../lib/intprops-internal.h:
> > ../lib/verify.h:
> > ../src/globals.h:
> > ../src/comp.h:
> > ../src/dynlib.h:
> > ../src/thread.h:
> > ../src/regex-emacs.h:
> > ../src/lisp.h:
> > ../src/sysselect.h:
> > ../lib/sys/select.h:
> > ../src/systhread.h:
> > ../lib/stdio.h:
> > xlwmenuP.h:
> > xlwmenu.h:
> > lwlib.h:
> > lwlib-widget.h:
> > ../src/lisp.h:
> > lwlib-utils.h:
> > ../src/xterm.h:
> > ../src/dispextern.h:
> > ../src/character.h:
> > ../lib/c-strcase.h:
> > ../src/fontset.h:
> > ../src/termhooks.h:
> > ../src/systime.h:
> > ../lib/timespec.h:
> > ../lib/arg-nonnull.h:
> > ../src/bitmaps/gray.xbm:
> 
> Here xlwmenu.o does depend on globals.h.  But I think lwlib is being
> built before make-docfile is run, so we will need to make it depend on
> make-docfile being run.
> 
> Does anyone have a better idea?

I think the dependency is the correct idea, yes.

Paul, is it true that lwlib/Makefile.in needs to define ALLOBJS for
the deps stuff to work correctly?