aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-03-21 09:59:10 -0700
committerPaul Eggert2017-03-21 09:59:31 -0700
commitbf8cf95d7d13ebc5d351cc2a8048f6695ab9faca (patch)
tree1aa66a743bb6b542c2764e4c77979ede678d6881 /src
parent14d8b6858a49e97f9b69593df5a8a7886430d43f (diff)
downloademacs-bf8cf95d7d13ebc5d351cc2a8048f6695ab9faca.tar.gz
emacs-bf8cf95d7d13ebc5d351cc2a8048f6695ab9faca.zip
Streamline dependency-file generation
* configure.ac (AUTODEPEND_PARENTS): New var. mkdir the dependency directories here, to simplify ‘make’. Remove dependency files just before outputting Makefiles, so that they are preserved if ‘configure’ exits early due to some other problem. * lib/Makefile.in, lwlib/Makefile.in, oldXMenu/Makefile.in: * src/Makefile.in: Adjust deps strategies to be similar, as follows: (MKDEPDIR): Remove. All uses removed. This cuts down on the number of processes spun off by ‘make’. (clean mostlyclean): Remove $(DEPDIR) contents, not $(DEPDIR) itself. (distclean): Remove $(DEPDIR) itself. * lwlib/Makefile.in (all): Move to front, so that depdir includes do not alter default action.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 60aa6866718..5a3d0bd0445 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -347,15 +347,14 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
347am__v_at_0 = @ 347am__v_at_0 = @
348am__v_at_1 = 348am__v_at_1 =
349 349
350DEPDIR=deps
351AUTO_DEPEND = @AUTO_DEPEND@ 350AUTO_DEPEND = @AUTO_DEPEND@
352 351DEPDIR = deps
353ifeq ($(AUTO_DEPEND),yes) 352ifeq ($(AUTO_DEPEND),yes)
354DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP 353 DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP
355MKDEPDIR = ${MKDIR_P} ${DEPDIR} 354 -include $(ALLOBJS:%.o=$(DEPDIR)/%.d)
356else 355else
357DEPFLAGS = 356 DEPFLAGS =
358MKDEPDIR = : 357 include $(srcdir)/deps.mk
359endif 358endif
360 359
361# Flags that might be in WARN_CFLAGS but are not valid for Objective C. 360# Flags that might be in WARN_CFLAGS but are not valid for Objective C.
@@ -383,10 +382,8 @@ ALL_OBJC_CFLAGS = $(EMACS_CFLAGS) \
383 382
384.SUFFIXES: .m 383.SUFFIXES: .m
385.c.o: 384.c.o:
386 @$(MKDEPDIR)
387 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $< 385 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $<
388.m.o: 386.m.o:
389 @$(MKDEPDIR)
390 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $(PROFILING_CFLAGS) $< 387 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $(PROFILING_CFLAGS) $<
391 388
392## lastfile must follow all files whose initialized data areas should 389## lastfile must follow all files whose initialized data areas should
@@ -650,8 +647,7 @@ mostlyclean:
650 rm -f globals.h gl-stamp 647 rm -f globals.h gl-stamp
651 rm -f *.res *.tmp 648 rm -f *.res *.tmp
652clean: mostlyclean 649clean: mostlyclean
653 rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT) 650 rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT) $(DEPDIR)/*
654 -rm -rf $(DEPDIR)
655 651
656## bootstrap-clean is used to clean up just before a bootstrap. 652## bootstrap-clean is used to clean up just before a bootstrap.
657## It should remove all files generated during a compilation/bootstrap, 653## It should remove all files generated during a compilation/bootstrap,
@@ -666,6 +662,7 @@ bootstrap-clean: clean
666 662
667distclean: bootstrap-clean 663distclean: bootstrap-clean
668 rm -f Makefile lisp.mk 664 rm -f Makefile lisp.mk
665 rm -fr $(DEPDIR)
669 666
670maintainer-clean: distclean 667maintainer-clean: distclean
671 rm -f TAGS 668 rm -f TAGS
@@ -755,11 +752,3 @@ else
755endif 752endif
756 @: Compile some files earlier to speed up further compilation. 753 @: Compile some files earlier to speed up further compilation.
757 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" 754 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
758
759ifeq ($(AUTO_DEPEND),yes)
760-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
761else
762include $(srcdir)/deps.mk
763endif
764
765### Makefile.in ends here