1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00

Replace AC_SUBST_FILE in configure with include in Makefiles.

* configure.ac (DEPDIR, MKDEPDIR, deps_frag, lwlib_deps_frag)
(oldxmenu_deps_frag, lisp_frag): Remove output variables/files.
(AUTO_DEPEND): New output variable.
* lwlib/Makefile.in (AUTO_DEPEND): New, set by configure.
(DEPFLAGS, MKDEPDIR): Set directly via conditional.
(lwlib_deps_frag): Replace by conditional include.
* lwlib/autodeps.mk: Remove file.
* oldXMenu/Makefile.in (AUTO_DEPEND): New, set by configure.
(DEPFLAGS, MKDEPDIR): Set directly via conditional.
(oldxmenu_deps_frag): Replace by conditional include.
* oldXMenu/autodeps.mk: Remove file.
* src/Makefile.in (AUTO_DEPEND): New, set by configure.
(DEPFLAGS, MKDEPDIR): Set directly via conditional.
(lisp_frag): Replace by an include.
(deps_frag): Replace by conditional include.
* src/autodeps.mk: Remove file.
This commit is contained in:
Glenn Morris 2015-05-15 20:51:45 -04:00
parent c7e93c4107
commit 48e384d710
10 changed files with 49 additions and 59 deletions

View file

@ -1661,9 +1661,7 @@ dnl AC_C_BIGENDIAN is done by gnulib.
dnl check for Make feature dnl check for Make feature
DEPFLAGS= AUTO_DEPEND=no
MKDEPDIR=":"
deps_frag=deps.mk
dnl check if we have GCC and autodepend is on. dnl check if we have GCC and autodepend is on.
if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
AC_MSG_CHECKING([whether gcc understands -MMD -MF]) AC_MSG_CHECKING([whether gcc understands -MMD -MF])
@ -1675,24 +1673,10 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
rm -rf deps.d rm -rf deps.d
AC_MSG_RESULT([$ac_enable_autodepend]) AC_MSG_RESULT([$ac_enable_autodepend])
if test $ac_enable_autodepend = yes; then if test $ac_enable_autodepend = yes; then
DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' AUTO_DEPEND=yes
## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
MKDEPDIR='${MKDIR_P} ${DEPDIR}'
deps_frag=autodeps.mk
fi fi
fi fi
lwlib_deps_frag=$srcdir/lwlib/$deps_frag AC_SUBST(AUTO_DEPEND)
oldxmenu_deps_frag=$srcdir/oldXMenu/$deps_frag
deps_frag=$srcdir/src/$deps_frag
AC_SUBST(MKDEPDIR)
AC_SUBST(DEPFLAGS)
AC_SUBST_FILE(deps_frag)
AC_SUBST_FILE(lwlib_deps_frag)
AC_SUBST_FILE(oldxmenu_deps_frag)
lisp_frag=$srcdir/src/lisp.mk
AC_SUBST_FILE(lisp_frag)
dnl checks for operating system services dnl checks for operating system services
AC_SYS_LONG_FILE_NAMES AC_SYS_LONG_FILE_NAMES

View file

@ -70,10 +70,15 @@ am__v_at_0 = @
am__v_at_1 = am__v_at_1 =
DEPDIR = deps DEPDIR = deps
## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. AUTO_DEPEND = @AUTO_DEPEND@
DEPFLAGS = @DEPFLAGS@
## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. ifeq ($(AUTO_DEPEND),yes)
MKDEPDIR = @MKDEPDIR@ DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
MKDEPDIR = ${MKDIR_P} ${DEPDIR}
else
DEPFLAGS =
MKDEPDIR = :
endif
## ../src is where the generated file (config.h, globals.h) are. ## ../src is where the generated file (config.h, globals.h) are.
## $(srcdir)/../src is where the non-generated files (lisp.h) are. ## $(srcdir)/../src is where the non-generated files (lisp.h) are.
@ -102,8 +107,11 @@ globals_h = ../src/globals.h
$(globals_h): $(globals_h):
$(MAKE) -C ../src globals.h $(MAKE) -C ../src globals.h
## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. ifeq ($(AUTO_DEPEND),yes)
@lwlib_deps_frag@ -include $(ALLOBJS:%.o=${DEPDIR}/%.d)
else
include $(srcdir)/deps.mk
endif
.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean

View file

@ -1,5 +0,0 @@
### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs
## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes.
-include $(ALLOBJS:%.o=${DEPDIR}/%.d)

View file

@ -20,7 +20,7 @@
### Commentary: ### Commentary:
## This file is inserted in lwlib/Makefile if AUTO_DEPEND=no. ## This file is included in lwlib/Makefile if AUTO_DEPEND=no.
## It defines static dependencies between the various source files. ## It defines static dependencies between the various source files.
### Code: ### Code:

View file

@ -112,10 +112,15 @@ am__v_at_0 = @
am__v_at_1 = am__v_at_1 =
DEPDIR = deps DEPDIR = deps
## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. AUTO_DEPEND = @AUTO_DEPEND@
DEPFLAGS = @DEPFLAGS@
## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. ifeq ($(AUTO_DEPEND),yes)
MKDEPDIR = @MKDEPDIR@ DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
MKDEPDIR = ${MKDIR_P} ${DEPDIR}
else
DEPFLAGS =
MKDEPDIR = :
endif
ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
$(C_SWITCH_X_SITE) $(DEPFLAGS) \ $(C_SWITCH_X_SITE) $(DEPFLAGS) \
@ -132,8 +137,11 @@ libXMenu11.a: $(OBJS) $(EXTRA)
$(AM_V_at)$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA) $(AM_V_at)$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA)
$(AM_V_at)$(RANLIB) $@ $(AM_V_at)$(RANLIB) $@
## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. ifeq ($(AUTO_DEPEND),yes)
@oldxmenu_deps_frag@ -include $(ALLOBJS:%.o=${DEPDIR}/%.d)
else
include $(srcdir)/deps.mk
endif
.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean

View file

@ -1,5 +0,0 @@
### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs
## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes.
-include $(ALLOBJS:%.o=${DEPDIR}/%.d)

View file

@ -32,7 +32,7 @@
### Commentary: ### Commentary:
## This file is inserted in oldXMenu/Makefile if AUTO_DEPEND=no. ## This file is included in oldXMenu/Makefile if AUTO_DEPEND=no.
## It defines static dependencies between the various source files. ## It defines static dependencies between the various source files.
### Code: ### Code:

View file

@ -323,10 +323,15 @@ am__v_at_0 = @
am__v_at_1 = am__v_at_1 =
DEPDIR=deps DEPDIR=deps
## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. AUTO_DEPEND = @AUTO_DEPEND@
DEPFLAGS=@DEPFLAGS@
## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. ifeq ($(AUTO_DEPEND),yes)
MKDEPDIR=@MKDEPDIR@ DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
MKDEPDIR = ${MKDIR_P} ${DEPDIR}
else
DEPFLAGS =
MKDEPDIR = :
endif
## DO NOT use -R. There is a special hack described in lastfile.c ## DO NOT use -R. There is a special hack described in lastfile.c
## which is used instead. Some initialized data areas are modified ## which is used instead. Some initialized data areas are modified
@ -413,9 +418,7 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
## Configure inserts the file lisp.mk at this point, defining $lisp. include $(srcdir)/lisp.mk
@lisp_frag@
## Construct full set of libraries to be linked. ## Construct full set of libraries to be linked.
LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
@ -667,8 +670,10 @@ endif
@: Compile some files earlier to speed up further compilation. @: Compile some files earlier to speed up further compilation.
$(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. ifeq ($(AUTO_DEPEND),yes)
@deps_frag@ -include $(ALLOBJS:%.o=${DEPDIR}/%.d)
else
include $(srcdir)/deps.mk
endif
### Makefile.in ends here ### Makefile.in ends here

View file

@ -1,5 +0,0 @@
### autodeps.mk --- src/Makefile fragment for GNU Emacs
## This is inserted in src/Makefile if AUTO_DEPEND=yes.
-include $(ALLOBJS:%.o=${DEPDIR}/%.d)

View file

@ -20,7 +20,7 @@
## Commentary: ## Commentary:
## ##
## This file is inserted in src/Makefile if AUTO_DEPEND=no. ## This file is included in src/Makefile if AUTO_DEPEND=no.
## It defines static dependencies between the various source files. ## It defines static dependencies between the various source files.
## FIXME some of these dependencies are platform-specific. ## FIXME some of these dependencies are platform-specific.