aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2015-05-15 20:51:45 -0400
committerGlenn Morris2015-05-15 20:51:45 -0400
commit48e384d7104dce8219b169c55a29c9f85024c83f (patch)
tree4b1e1cae593af4c1253af05172b23c05a3b63096
parentc7e93c41078193d4df8ca165d3aea50a51c40519 (diff)
downloademacs-48e384d7104dce8219b169c55a29c9f85024c83f.tar.gz
emacs-48e384d7104dce8219b169c55a29c9f85024c83f.zip
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.
-rw-r--r--configure.ac22
-rw-r--r--lwlib/Makefile.in20
-rw-r--r--lwlib/autodeps.mk5
-rw-r--r--lwlib/deps.mk2
-rw-r--r--oldXMenu/Makefile.in20
-rw-r--r--oldXMenu/autodeps.mk5
-rw-r--r--oldXMenu/deps.mk2
-rw-r--r--src/Makefile.in25
-rw-r--r--src/autodeps.mk5
-rw-r--r--src/deps.mk2
10 files changed, 49 insertions, 59 deletions
diff --git a/configure.ac b/configure.ac
index 90a40552a35..1cddeb1e45f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1661,9 +1661,7 @@ dnl AC_C_BIGENDIAN is done by gnulib.
1661 1661
1662dnl check for Make feature 1662dnl check for Make feature
1663 1663
1664DEPFLAGS= 1664AUTO_DEPEND=no
1665MKDEPDIR=":"
1666deps_frag=deps.mk
1667dnl check if we have GCC and autodepend is on. 1665dnl check if we have GCC and autodepend is on.
1668if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then 1666if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
1669 AC_MSG_CHECKING([whether gcc understands -MMD -MF]) 1667 AC_MSG_CHECKING([whether gcc understands -MMD -MF])
@@ -1675,24 +1673,10 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
1675 rm -rf deps.d 1673 rm -rf deps.d
1676 AC_MSG_RESULT([$ac_enable_autodepend]) 1674 AC_MSG_RESULT([$ac_enable_autodepend])
1677 if test $ac_enable_autodepend = yes; then 1675 if test $ac_enable_autodepend = yes; then
1678 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' 1676 AUTO_DEPEND=yes
1679 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
1680 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
1681 deps_frag=autodeps.mk
1682 fi 1677 fi
1683fi 1678fi
1684lwlib_deps_frag=$srcdir/lwlib/$deps_frag 1679AC_SUBST(AUTO_DEPEND)
1685oldxmenu_deps_frag=$srcdir/oldXMenu/$deps_frag
1686deps_frag=$srcdir/src/$deps_frag
1687AC_SUBST(MKDEPDIR)
1688AC_SUBST(DEPFLAGS)
1689AC_SUBST_FILE(deps_frag)
1690AC_SUBST_FILE(lwlib_deps_frag)
1691AC_SUBST_FILE(oldxmenu_deps_frag)
1692
1693lisp_frag=$srcdir/src/lisp.mk
1694AC_SUBST_FILE(lisp_frag)
1695
1696 1680
1697dnl checks for operating system services 1681dnl checks for operating system services
1698AC_SYS_LONG_FILE_NAMES 1682AC_SYS_LONG_FILE_NAMES
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index 1f332e92939..2fd59598e3e 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -70,10 +70,15 @@ am__v_at_0 = @
70am__v_at_1 = 70am__v_at_1 =
71 71
72DEPDIR = deps 72DEPDIR = deps
73## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. 73AUTO_DEPEND = @AUTO_DEPEND@
74DEPFLAGS = @DEPFLAGS@ 74
75## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. 75ifeq ($(AUTO_DEPEND),yes)
76MKDEPDIR = @MKDEPDIR@ 76DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
77MKDEPDIR = ${MKDIR_P} ${DEPDIR}
78else
79DEPFLAGS =
80MKDEPDIR = :
81endif
77 82
78## ../src is where the generated file (config.h, globals.h) are. 83## ../src is where the generated file (config.h, globals.h) are.
79## $(srcdir)/../src is where the non-generated files (lisp.h) are. 84## $(srcdir)/../src is where the non-generated files (lisp.h) are.
@@ -102,8 +107,11 @@ globals_h = ../src/globals.h
102$(globals_h): 107$(globals_h):
103 $(MAKE) -C ../src globals.h 108 $(MAKE) -C ../src globals.h
104 109
105## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. 110ifeq ($(AUTO_DEPEND),yes)
106@lwlib_deps_frag@ 111-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
112else
113include $(srcdir)/deps.mk
114endif
107 115
108.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean 116.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
109 117
diff --git a/lwlib/autodeps.mk b/lwlib/autodeps.mk
deleted file mode 100644
index f7109295ce2..00000000000
--- a/lwlib/autodeps.mk
+++ /dev/null
@@ -1,5 +0,0 @@
1### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs
2
3## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes.
4
5-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
diff --git a/lwlib/deps.mk b/lwlib/deps.mk
index 11cc0567428..a19e51f34d1 100644
--- a/lwlib/deps.mk
+++ b/lwlib/deps.mk
@@ -20,7 +20,7 @@
20 20
21### Commentary: 21### Commentary:
22 22
23## This file is inserted in lwlib/Makefile if AUTO_DEPEND=no. 23## This file is included in lwlib/Makefile if AUTO_DEPEND=no.
24## It defines static dependencies between the various source files. 24## It defines static dependencies between the various source files.
25 25
26### Code: 26### Code:
diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in
index ef2a3600a6b..de5b8e1114c 100644
--- a/oldXMenu/Makefile.in
+++ b/oldXMenu/Makefile.in
@@ -112,10 +112,15 @@ am__v_at_0 = @
112am__v_at_1 = 112am__v_at_1 =
113 113
114DEPDIR = deps 114DEPDIR = deps
115## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. 115AUTO_DEPEND = @AUTO_DEPEND@
116DEPFLAGS = @DEPFLAGS@ 116
117## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. 117ifeq ($(AUTO_DEPEND),yes)
118MKDEPDIR = @MKDEPDIR@ 118DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
119MKDEPDIR = ${MKDIR_P} ${DEPDIR}
120else
121DEPFLAGS =
122MKDEPDIR = :
123endif
119 124
120ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ 125ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
121 $(C_SWITCH_X_SITE) $(DEPFLAGS) \ 126 $(C_SWITCH_X_SITE) $(DEPFLAGS) \
@@ -132,8 +137,11 @@ libXMenu11.a: $(OBJS) $(EXTRA)
132 $(AM_V_at)$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA) 137 $(AM_V_at)$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA)
133 $(AM_V_at)$(RANLIB) $@ 138 $(AM_V_at)$(RANLIB) $@
134 139
135## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. 140ifeq ($(AUTO_DEPEND),yes)
136@oldxmenu_deps_frag@ 141-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
142else
143include $(srcdir)/deps.mk
144endif
137 145
138.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean 146.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
139 147
diff --git a/oldXMenu/autodeps.mk b/oldXMenu/autodeps.mk
deleted file mode 100644
index f7109295ce2..00000000000
--- a/oldXMenu/autodeps.mk
+++ /dev/null
@@ -1,5 +0,0 @@
1### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs
2
3## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes.
4
5-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
diff --git a/oldXMenu/deps.mk b/oldXMenu/deps.mk
index cdb89f9ead9..54ce3587574 100644
--- a/oldXMenu/deps.mk
+++ b/oldXMenu/deps.mk
@@ -32,7 +32,7 @@
32 32
33### Commentary: 33### Commentary:
34 34
35## This file is inserted in oldXMenu/Makefile if AUTO_DEPEND=no. 35## This file is included in oldXMenu/Makefile if AUTO_DEPEND=no.
36## It defines static dependencies between the various source files. 36## It defines static dependencies between the various source files.
37 37
38### Code: 38### Code:
diff --git a/src/Makefile.in b/src/Makefile.in
index 1c03b27c2c3..51a5b982474 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -323,10 +323,15 @@ am__v_at_0 = @
323am__v_at_1 = 323am__v_at_1 =
324 324
325DEPDIR=deps 325DEPDIR=deps
326## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. 326AUTO_DEPEND = @AUTO_DEPEND@
327DEPFLAGS=@DEPFLAGS@ 327
328## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. 328ifeq ($(AUTO_DEPEND),yes)
329MKDEPDIR=@MKDEPDIR@ 329DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
330MKDEPDIR = ${MKDIR_P} ${DEPDIR}
331else
332DEPFLAGS =
333MKDEPDIR = :
334endif
330 335
331## DO NOT use -R. There is a special hack described in lastfile.c 336## DO NOT use -R. There is a special hack described in lastfile.c
332## which is used instead. Some initialized data areas are modified 337## which is used instead. Some initialized data areas are modified
@@ -413,9 +418,7 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
413FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ 418FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
414ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) 419ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
415 420
416## Configure inserts the file lisp.mk at this point, defining $lisp. 421include $(srcdir)/lisp.mk
417@lisp_frag@
418
419 422
420## Construct full set of libraries to be linked. 423## Construct full set of libraries to be linked.
421LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ 424LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
@@ -667,8 +670,10 @@ endif
667 @: Compile some files earlier to speed up further compilation. 670 @: Compile some files earlier to speed up further compilation.
668 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" 671 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
669 672
670## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. 673ifeq ($(AUTO_DEPEND),yes)
671@deps_frag@ 674-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
672 675else
676include $(srcdir)/deps.mk
677endif
673 678
674### Makefile.in ends here 679### Makefile.in ends here
diff --git a/src/autodeps.mk b/src/autodeps.mk
deleted file mode 100644
index 8b014a7508c..00000000000
--- a/src/autodeps.mk
+++ /dev/null
@@ -1,5 +0,0 @@
1### autodeps.mk --- src/Makefile fragment for GNU Emacs
2
3## This is inserted in src/Makefile if AUTO_DEPEND=yes.
4
5-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
diff --git a/src/deps.mk b/src/deps.mk
index 71a5f42d22e..23789384fdb 100644
--- a/src/deps.mk
+++ b/src/deps.mk
@@ -20,7 +20,7 @@
20 20
21## Commentary: 21## Commentary:
22## 22##
23## This file is inserted in src/Makefile if AUTO_DEPEND=no. 23## This file is included in src/Makefile if AUTO_DEPEND=no.
24## It defines static dependencies between the various source files. 24## It defines static dependencies between the various source files.
25 25
26## FIXME some of these dependencies are platform-specific. 26## FIXME some of these dependencies are platform-specific.