aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2009-11-14 15:17:38 +0000
committerJan Djärv2009-11-14 15:17:38 +0000
commita53cfbe58781e8f967d298d937e34efa3db93c1d (patch)
tree8aa46fd5982fc66cc1073d9677a7441045979756 /src
parent603f5979461a6524340d8010eb088abc89655664 (diff)
downloademacs-a53cfbe58781e8f967d298d937e34efa3db93c1d.tar.gz
emacs-a53cfbe58781e8f967d298d937e34efa3db93c1d.zip
Use gcc-generated dependency files if we can (GNU Make and gcc required).
* Makefile.in: If AUTO_DEPEND is defined, make gcc generate dependency files in deps/. Include those files into Makefile. * config.in: Generated (AUTO_DEPEND). * configure.in: --enable-autodepend is new. Check for GNU Make and that gcc supports -MMD -MF. Define AUTO_DEPEND if we can use gcc and GNU make to generate dependencies.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/Makefile.in32
-rw-r--r--src/config.in35
3 files changed, 53 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fb1093ae1f8..37ff8860779 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12009-11-14 Jan Djärv <jan.h.d@swipnet.se>
2
3 * Makefile.in: If AUTO_DEPEND is defined, make gcc generate
4 dependency files in deps/. Include those files into Makefile.
5
6 * config.in: Generated (AUTO_DEPEND).
7
12009-11-13 Michael Albinus <michael.albinus@gmx.de> 82009-11-13 Michael Albinus <michael.albinus@gmx.de>
2 9
3 * dbusbind.c (Vdbus_registered_objects_table): Renamed from 10 * dbusbind.c (Vdbus_registered_objects_table): Renamed from
diff --git a/src/Makefile.in b/src/Makefile.in
index adb1c817f30..e6fa649e682 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -79,6 +79,10 @@ SHELL=/bin/sh
79#define NOT_C_CODE 79#define NOT_C_CODE
80#include "config.h" 80#include "config.h"
81 81
82#ifdef AUTO_DEPEND
83DEPFLAGS = -MMD -MF deps/$*.d
84#endif
85
82/* Do not let the file name mktime.c get messed up. */ 86/* Do not let the file name mktime.c get messed up. */
83#ifdef mktime 87#ifdef mktime
84#undef mktime 88#undef mktime
@@ -257,13 +261,19 @@ DBUS_OBJ = dbusbind.o
257 261
258/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM 262/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
259 since it may have -I options that should override those two. */ 263 since it may have -I options that should override those two. */
260ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ 264ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_X_SITE C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS}
261ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@ 265ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
262 266
263.SUFFIXES: .m 267.SUFFIXES: .m
264.c.o: 268.c.o:
269#ifdef AUTO_DEPEND
270 @test -d deps || mkdir deps
271#endif
265 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< 272 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
266.m.o: 273.m.o:
274#ifdef AUTO_DEPEND
275 @test -d deps || mkdir deps
276#endif
267 $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< 277 $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
268 278
269#ifndef LIBX11_SYSTEM 279#ifndef LIBX11_SYSTEM
@@ -958,7 +968,7 @@ temacs${EXEEXT}: $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} pre
958/* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE 968/* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
959 often contain options that have to do with using Emacs''s crt0, 969 often contain options that have to do with using Emacs''s crt0,
960 which are only good with temacs. */ 970 which are only good with temacs. */
961prefix-args${EXEEXT}: prefix-args.c $(config_h) 971prefix-args${EXEEXT}: prefix-args.o $(config_h)
962 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args 972 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
963 973
964#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK) 974#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK)
@@ -1024,6 +1034,11 @@ stamp-oldxmenu:
1024 @echo "Please run the `configure' script again." 1034 @echo "Please run the `configure' script again."
1025 exit 1 1035 exit 1
1026 1036
1037ecrt0.o: ecrt0.c $(config_h)
1038 CRT0_COMPILE ${srcdir}/ecrt0.c
1039doc.o: buildobj.h
1040
1041#ifndef AUTO_DEPEND
1027/* Nearly all the following files depend on lisp.h, 1042/* Nearly all the following files depend on lisp.h,
1028 but it is not included as a dependency because 1043 but it is not included as a dependency because
1029 it is so often changed in ways that do not require any recompilation 1044 it is so often changed in ways that do not require any recompilation
@@ -1056,8 +1071,6 @@ cm.o: cm.c frame.h cm.h termhooks.h termchar.h lisp.h $(config_h)
1056cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h $(config_h) \ 1071cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h $(config_h) \
1057 msdos.h dispextern.h keyboard.h keymap.h 1072 msdos.h dispextern.h keyboard.h keymap.h
1058pre-crt0.o: pre-crt0.c 1073pre-crt0.o: pre-crt0.c
1059ecrt0.o: ecrt0.c $(config_h)
1060 CRT0_COMPILE ${srcdir}/ecrt0.c
1061dbusbind.o: dbusbind.c termhooks.h frame.h keyboard.h lisp.h $(config_h) 1074dbusbind.o: dbusbind.c termhooks.h frame.h keyboard.h lisp.h $(config_h)
1062dired.o: dired.c commands.h buffer.h lisp.h $(config_h) character.h charset.h \ 1075dired.o: dired.c commands.h buffer.h lisp.h $(config_h) character.h charset.h \
1063 coding.h regex.h systime.h blockinput.h atimer.h 1076 coding.h regex.h systime.h blockinput.h atimer.h
@@ -1066,8 +1079,7 @@ dispnew.o: dispnew.c systime.h commands.h process.h frame.h \
1066 disptab.h indent.h $(INTERVALS_H) \ 1079 disptab.h indent.h $(INTERVALS_H) \
1067 xterm.h blockinput.h atimer.h character.h msdos.h composite.h keyboard.h \ 1080 xterm.h blockinput.h atimer.h character.h msdos.h composite.h keyboard.h \
1068 syssignal.h lisp.h $(config_h) 1081 syssignal.h lisp.h $(config_h)
1069doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h character.h \ 1082doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h character.h
1070 buildobj.h
1071doprnt.o: doprnt.c character.h lisp.h $(config_h) 1083doprnt.o: doprnt.c character.h lisp.h $(config_h)
1072dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ 1084dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \
1073 msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \ 1085 msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \
@@ -1252,6 +1264,8 @@ intervals.o: intervals.c buffer.h $(INTERVALS_H) keyboard.h puresize.h \
1252textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVALS_H) \ 1264textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVALS_H) \
1253 lisp.h $(config_h) 1265 lisp.h $(config_h)
1254 1266
1267#endif /* ! AUTO_DEPEND */
1268
1255/* System-specific programs to be made. 1269/* System-specific programs to be made.
1256 OTHER_FILES 1270 OTHER_FILES
1257 select which of these should be compiled. */ 1271 select which of these should be compiled. */
@@ -1287,6 +1301,7 @@ mostlyclean:
1287 rm -f buildobj.h 1301 rm -f buildobj.h
1288clean: mostlyclean 1302clean: mostlyclean
1289 rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT} 1303 rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
1304 -rm -rf deps
1290#ifdef HAVE_NS 1305#ifdef HAVE_NS
1291 rm -fr ${ns_appdir} 1306 rm -fr ${ns_appdir}
1292#endif 1307#endif
@@ -1385,3 +1400,8 @@ bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
1385#endif /* ! defined (CANNOT_DUMP) */ 1400#endif /* ! defined (CANNOT_DUMP) */
1386 @: Compile some files earlier to speed up further compilation. 1401 @: Compile some files earlier to speed up further compilation.
1387 cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe} 1402 cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe}
1403
1404#ifdef AUTO_DEPEND
1405ALLOBJS=$(STARTFILES) ${obj} ${otherobj} prefix-args.o
1406-include $(ALLOBJS:%.o=deps/%.d)
1407#endif
diff --git a/src/config.in b/src/config.in
index 4241b3eee41..04b6de5714d 100644
--- a/src/config.in
+++ b/src/config.in
@@ -27,6 +27,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
27#define EMACS_CONFIG_H 27#define EMACS_CONFIG_H
28 28
29 29
30/* Generate dependencies with gcc. */
31#undef AUTO_DEPEND
32
30/* Define to 1 if the mktime function is broken. */ 33/* Define to 1 if the mktime function is broken. */
31#undef BROKEN_MKTIME 34#undef BROKEN_MKTIME
32 35
@@ -828,6 +831,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
828/* Define to 1 if you don't have struct exception in math.h. */ 831/* Define to 1 if you don't have struct exception in math.h. */
829#undef NO_MATHERR 832#undef NO_MATHERR
830 833
834/* Define to 1 if `NSInteger' is defined. */
835#undef NS_HAVE_NSINTEGER
836
831/* Define to 1 if you are using NS windowing under MacOS X. */ 837/* Define to 1 if you are using NS windowing under MacOS X. */
832#undef NS_IMPL_COCOA 838#undef NS_IMPL_COCOA
833 839
@@ -921,21 +927,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
921 XPointer or XPointer*. */ 927 XPointer or XPointer*. */
922#undef XRegisterIMInstantiateCallback_arg6 928#undef XRegisterIMInstantiateCallback_arg6
923 929
924/* Define to 1 if on AIX 3.
925 System headers sometimes define this.
926 We just want to avoid a redefinition error message. */
927#ifndef _ALL_SOURCE
928# undef _ALL_SOURCE
929#endif
930
931/* Number of bits in a file offset, on hosts where this is settable. */ 930/* Number of bits in a file offset, on hosts where this is settable. */
932#undef _FILE_OFFSET_BITS 931#undef _FILE_OFFSET_BITS
933 932
934/* Enable GNU extensions on systems that have them. */
935#ifndef _GNU_SOURCE
936# undef _GNU_SOURCE
937#endif
938
939/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 933/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
940#undef _LARGEFILE_SOURCE 934#undef _LARGEFILE_SOURCE
941 935
@@ -952,16 +946,27 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
952/* Define to 1 if you need to in order for `stat' and other things to work. */ 946/* Define to 1 if you need to in order for `stat' and other things to work. */
953#undef _POSIX_SOURCE 947#undef _POSIX_SOURCE
954 948
955/* Enable extensions on Solaris. */ 949/* Enable extensions on AIX 3, Interix. */
956#ifndef __EXTENSIONS__ 950#ifndef _ALL_SOURCE
957# undef __EXTENSIONS__ 951# undef _ALL_SOURCE
958#endif 952#endif
953/* Enable GNU extensions on systems that have them. */
954#ifndef _GNU_SOURCE
955# undef _GNU_SOURCE
956#endif
957/* Enable threading extensions on Solaris. */
959#ifndef _POSIX_PTHREAD_SEMANTICS 958#ifndef _POSIX_PTHREAD_SEMANTICS
960# undef _POSIX_PTHREAD_SEMANTICS 959# undef _POSIX_PTHREAD_SEMANTICS
961#endif 960#endif
961/* Enable extensions on HP NonStop. */
962#ifndef _TANDEM_SOURCE 962#ifndef _TANDEM_SOURCE
963# undef _TANDEM_SOURCE 963# undef _TANDEM_SOURCE
964#endif 964#endif
965/* Enable general extensions on Solaris. */
966#ifndef __EXTENSIONS__
967# undef __EXTENSIONS__
968#endif
969
965 970
966/* Define to rpl_ if the getopt replacement functions and variables should be 971/* Define to rpl_ if the getopt replacement functions and variables should be
967 used. */ 972 used. */