aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2017-03-21 09:59:10 -0700
committerPaul Eggert2017-03-21 09:59:31 -0700
commitbf8cf95d7d13ebc5d351cc2a8048f6695ab9faca (patch)
tree1aa66a743bb6b542c2764e4c77979ede678d6881 /lib
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 'lib')
-rw-r--r--lib/Makefile.in10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 4e51ac6b029..832704f3a8d 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -65,16 +65,12 @@ ifneq ($(SYSTEM_TYPE),windows-nt)
65 libgnu_a_SOURCES += openat-die.c save-cwd.c 65 libgnu_a_SOURCES += openat-die.c save-cwd.c
66endif 66endif
67 67
68# Dependencies. When !AUTO_DEPEND, don't bother with a dependencies file,
69# as the default dependencies are often adequate.
70DEPDIR = deps 68DEPDIR = deps
71ifeq ($(AUTO_DEPEND),yes) 69ifeq ($(AUTO_DEPEND),yes)
72 DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP 70 DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP
73 MKDEPDIR = $(MKDIR_P) $(DEPDIR)
74 -include $(ALLOBJS:%.o=$(DEPDIR)/%.d) 71 -include $(ALLOBJS:%.o=$(DEPDIR)/%.d)
75else 72else
76 DEPFLAGS = 73 DEPFLAGS =
77 MKDEPDIR = :
78endif 74endif
79 75
80.PRECIOUS: ../config.status Makefile 76.PRECIOUS: ../config.status Makefile
@@ -90,10 +86,8 @@ libegnu_a_OBJECTS = $(patsubst %.o,e-%.o,$(libgnu_a_OBJECTS))
90$(libegnu_a_OBJECTS) $(libgnu_a_OBJECTS): $(BUILT_SOURCES) 86$(libegnu_a_OBJECTS) $(libgnu_a_OBJECTS): $(BUILT_SOURCES)
91 87
92.c.o: 88.c.o:
93 @$(MKDEPDIR)
94 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< 89 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
95e-%.o: %.c 90e-%.o: %.c
96 @$(MKDEPDIR)
97 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -Demacs -o $@ $< 91 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -Demacs -o $@ $<
98 92
99all: libgnu.a $(if $(HYBRID_MALLOC),libegnu.a) 93all: libgnu.a $(if $(HYBRID_MALLOC),libegnu.a)
@@ -118,10 +112,10 @@ TAGS: $(ETAGS) $(tagsfiles)
118.PHONY: $(ETAGS) tags 112.PHONY: $(ETAGS) tags
119 113
120clean mostlyclean: 114clean mostlyclean:
121 rm -f *.[ao] \#* 115 rm -f *.[ao] \#* $(DEPDIR)/*
122 -rm -rf $(DEPDIR)
123distclean: clean 116distclean: clean
124 rm -f Makefile $(BUILT_SOURCES) 117 rm -f Makefile $(BUILT_SOURCES)
118 rm -fr $(DEPDIR)
125bootstrap-clean: distclean 119bootstrap-clean: distclean
126 rm -f TAGS 120 rm -f TAGS
127maintainer-clean: bootstrap-clean 121maintainer-clean: bootstrap-clean