summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-03-21 09:59:10 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-03-21 09:59:31 -0700
commitbf8cf95d7d13ebc5d351cc2a8048f6695ab9faca (patch)
tree1aa66a743bb6b542c2764e4c77979ede678d6881 /lib
parent14d8b6858a49e97f9b69593df5a8a7886430d43f (diff)
downloademacs-bf8cf95d7d13ebc5d351cc2a8048f6695ab9faca.tar.gz
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)
libgnu_a_SOURCES += openat-die.c save-cwd.c
endif
-# Dependencies. When !AUTO_DEPEND, don't bother with a dependencies file,
-# as the default dependencies are often adequate.
DEPDIR = deps
ifeq ($(AUTO_DEPEND),yes)
DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP
- MKDEPDIR = $(MKDIR_P) $(DEPDIR)
-include $(ALLOBJS:%.o=$(DEPDIR)/%.d)
else
DEPFLAGS =
- MKDEPDIR = :
endif
.PRECIOUS: ../config.status Makefile
@@ -90,10 +86,8 @@ libegnu_a_OBJECTS = $(patsubst %.o,e-%.o,$(libgnu_a_OBJECTS))
$(libegnu_a_OBJECTS) $(libgnu_a_OBJECTS): $(BUILT_SOURCES)
.c.o:
- @$(MKDEPDIR)
$(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
e-%.o: %.c
- @$(MKDEPDIR)
$(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -Demacs -o $@ $<
all: libgnu.a $(if $(HYBRID_MALLOC),libegnu.a)
@@ -118,10 +112,10 @@ TAGS: $(ETAGS) $(tagsfiles)
.PHONY: $(ETAGS) tags
clean mostlyclean:
- rm -f *.[ao] \#*
- -rm -rf $(DEPDIR)
+ rm -f *.[ao] \#* $(DEPDIR)/*
distclean: clean
rm -f Makefile $(BUILT_SOURCES)
+ rm -fr $(DEPDIR)
bootstrap-clean: distclean
rm -f TAGS
maintainer-clean: bootstrap-clean