]> code.delx.au - gnu-emacs/commitdiff
Replace AC_SUBST_FILE in configure with include in Makefiles.
authorGlenn Morris <rgm@gnu.org>
Sat, 16 May 2015 00:51:45 +0000 (20:51 -0400)
committerGlenn Morris <rgm@gnu.org>
Sat, 16 May 2015 00:51:45 +0000 (20:51 -0400)
* 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.

configure.ac
lwlib/Makefile.in
lwlib/autodeps.mk [deleted file]
lwlib/deps.mk
oldXMenu/Makefile.in
oldXMenu/autodeps.mk [deleted file]
oldXMenu/deps.mk
src/Makefile.in
src/autodeps.mk [deleted file]
src/deps.mk

index 90a40552a35d3991d749c3863c214a9ad87a1260..1cddeb1e45ff434d630261f3e639911228816a05 100644 (file)
@@ -1661,9 +1661,7 @@ dnl AC_C_BIGENDIAN is done by gnulib.
 
 dnl check for Make feature
 
-DEPFLAGS=
-MKDEPDIR=":"
-deps_frag=deps.mk
+AUTO_DEPEND=no
 dnl check if we have GCC and autodepend is on.
 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
    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
    AC_MSG_RESULT([$ac_enable_autodepend])
    if test $ac_enable_autodepend = yes; then
-      DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
-      ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
-      MKDEPDIR='${MKDIR_P} ${DEPDIR}'
-      deps_frag=autodeps.mk
+      AUTO_DEPEND=yes
    fi
 fi
-lwlib_deps_frag=$srcdir/lwlib/$deps_frag
-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)
-
+AC_SUBST(AUTO_DEPEND)
 
 dnl checks for operating system services
 AC_SYS_LONG_FILE_NAMES
index 1f332e92939d1de7f87c471fa6b7b5547aad32a4..2fd59598e3ecf6a713fd7ac2f7d85fbb6ac25343 100644 (file)
@@ -70,10 +70,15 @@ am__v_at_0 = @
 am__v_at_1 =
 
 DEPDIR = deps
-## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty.
-DEPFLAGS = @DEPFLAGS@
-## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'.
-MKDEPDIR = @MKDEPDIR@
+AUTO_DEPEND = @AUTO_DEPEND@
+
+ifeq ($(AUTO_DEPEND),yes)
+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.
 ## $(srcdir)/../src is where the non-generated files (lisp.h) are.
@@ -102,8 +107,11 @@ globals_h = ../src/globals.h
 $(globals_h):
        $(MAKE) -C ../src globals.h
 
-## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk.
-@lwlib_deps_frag@
+ifeq ($(AUTO_DEPEND),yes)
+-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
+else
+include $(srcdir)/deps.mk
+endif
 
 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
 
diff --git a/lwlib/autodeps.mk b/lwlib/autodeps.mk
deleted file mode 100644 (file)
index f710929..0000000
+++ /dev/null
@@ -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)
index 11cc0567428ccaa1565adcd7d07490364add1fed..a19e51f34d15ae9a6b033fd28e52076134b3c827 100644 (file)
@@ -20,7 +20,7 @@
 
 ### 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.
 
 ### Code:
index ef2a3600a6b0820550f603048e7e4c4e797336f9..de5b8e1114c052253949d3b1c770b41fc2ad5e0c 100644 (file)
@@ -112,10 +112,15 @@ am__v_at_0 = @
 am__v_at_1 =
 
 DEPDIR = deps
-## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty.
-DEPFLAGS = @DEPFLAGS@
-## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'.
-MKDEPDIR = @MKDEPDIR@
+AUTO_DEPEND = @AUTO_DEPEND@
+
+ifeq ($(AUTO_DEPEND),yes)
+DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
+MKDEPDIR = ${MKDIR_P} ${DEPDIR}
+else
+DEPFLAGS =
+MKDEPDIR = :
+endif
 
 ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
   $(C_SWITCH_X_SITE) $(DEPFLAGS) \
@@ -132,8 +137,11 @@ libXMenu11.a: $(OBJS) $(EXTRA)
        $(AM_V_at)$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA)
        $(AM_V_at)$(RANLIB) $@
 
-## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk.
-@oldxmenu_deps_frag@
+ifeq ($(AUTO_DEPEND),yes)
+-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
+else
+include $(srcdir)/deps.mk
+endif
 
 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
 
diff --git a/oldXMenu/autodeps.mk b/oldXMenu/autodeps.mk
deleted file mode 100644 (file)
index f710929..0000000
+++ /dev/null
@@ -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)
index cdb89f9ead9d1a9b313b6a3a318215576e2c16c6..54ce3587574633a038475502b4d8ef90f7460587 100644 (file)
@@ -32,7 +32,7 @@
 
 ### 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.
 
 ### Code:
index 1c03b27c2c3f59cca70f30b4f7f7eb1a4140ab39..51a5b9824741bd0af37cf0eeab668051adeada59 100644 (file)
@@ -323,10 +323,15 @@ am__v_at_0 = @
 am__v_at_1 =
 
 DEPDIR=deps
-## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty.
-DEPFLAGS=@DEPFLAGS@
-## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'.
-MKDEPDIR=@MKDEPDIR@
+AUTO_DEPEND = @AUTO_DEPEND@
+
+ifeq ($(AUTO_DEPEND),yes)
+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
 ## 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@
 ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
 
-## Configure inserts the file lisp.mk at this point, defining $lisp.
-@lisp_frag@
-
+include $(srcdir)/lisp.mk
 
 ## Construct full set of libraries to be linked.
 LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
@@ -667,8 +670,10 @@ endif
        @: Compile some files earlier to speed up further compilation.
        $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
 
-## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk.
-@deps_frag@
-
+ifeq ($(AUTO_DEPEND),yes)
+-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
+else
+include $(srcdir)/deps.mk
+endif
 
 ### Makefile.in ends here
diff --git a/src/autodeps.mk b/src/autodeps.mk
deleted file mode 100644 (file)
index 8b014a7..0000000
+++ /dev/null
@@ -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)
index 71a5f42d22ecf64da322e865563a7bc34548ca47..23789384fdb7ab3d895b666ba82d0d06b45661f6 100644 (file)
@@ -20,7 +20,7 @@
 
 ## 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.
 
 ## FIXME some of these dependencies are platform-specific.