OLDXMENU_TARGET="really-lwlib"
fi
AC_SUBST(LIBXT_OTHER)
-AC_SUBST(OLDXMENU_TARGET)
## The X Menu stuff is present in the X10 distribution, but missing
## from X11. If we have X10, just use the installed library;
LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
else
- OLDXMENU=
+ ## For a syntactically valid Makefile; not actually used for anything.
+ ## See comments in src/Makefile.in.
+ OLDXMENU=nothing
## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
if test "${HAVE_X_WINDOWS}" = "yes"; then
LIBXMENU="-lXMenu"
fi
if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
- OLDXMENU=
+ OLDXMENU_TARGET=
+ OLDXMENU=nothing
LIBXMENU=
OLDXMENU_DEPS=
fi
+AC_SUBST(OLDXMENU_TARGET)
AC_SUBST(OLDXMENU)
AC_SUBST(LIBXMENU)
AC_SUBST(LIBX_OTHER)
## Only used if HAVE_X_WINDOWS.
LIBXT_OTHER=@LIBXT_OTHER@
-## Only used if HAVE_X11 && !USE_GTK.
-## really-lwlib if USE_X_TOOLKIT, else really-oldxmenu.
+## If !HAVE_X11 || USE_GTK, empty.
+## Else if USE_X_TOOLKIT really-lwlib, else really-oldxmenu.
OLDXMENU_TARGET=@OLDXMENU_TARGET@
## If !HAVE_X11 || USE_GTK, empty.
## Else if USE_X_TOOLKIT, ${lwlibdir}liblw.a.
## Else ${oldXMenudir}libXMenu11.a.
+## (Actually, rather than being empty, it is set to "nothing".
+## It is never actually used for anything in this case.
+## This is done because there is a rule with target $(OLDXMENU) below,
+## and I think it might be a syntax error with some makes to have
+## an empty target, even if the associated rule is never run.
+## http://lists.gnu.org/archive/html/help-make/2010-05/msg00058.html
+## The alternative would be to put that rule in a makefile fragment.)
OLDXMENU=@OLDXMENU@
## If HAVE_X11 && !USE_GTK, ${OLDXMENU} ../src/${OLDXMENU}; else empty.
## -MMD -MF ${DEPDIR}/$*.d if AUTO_DEPEND; else empty.
DEPFLAGS=@DEPFLAGS@
## test -d ${DEPDIR} || mkdir ${DEPDIR} (if AUTO_DEPEND); else ':'.
+## FIXME This can fail in parallel builds. Use mkinstalldirs instead?
MKDEPDIR=@MKDEPDIR@
# ========================== start of cpp stuff =======================
$(CC) $(LDFLAGS) prefix-args.o -o prefix-args
-/* Only (possibly) used if HAVE_X11 && !USE_GTK, but no harm in always
- defining. */
+/* The following oldxmenu-related rules are only (possibly) used if
+ HAVE_X11 && !USE_GTK, but there is no harm in always defining them
+ (provided we take a little care that OLDXMENU is never empty). */
really-lwlib:
cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
stamp-oldxmenu: ${OLDXMENU_DEPS}
touch stamp-oldxmenu
-/* HAVE_X11 implies HAVE_X_WINDOWS and HAVE_MENUS. */
-#if defined (HAVE_X11) && ! defined (USE_GTK)
/* Supply an ordering for parallel make. */
../src/$(OLDXMENU): ${OLDXMENU}
$(OLDXMENU): $(OLDXMENU_TARGET)
-#endif /* HAVE_X11 && !USE_GTK */
../config.status:: epaths.in
@echo "The file epaths.h needs to be set up from epaths.in."