summaryrefslogtreecommitdiff
path: root/lwlib
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 /lwlib
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 'lwlib')
-rw-r--r--lwlib/Makefile.in28
1 files changed, 10 insertions, 18 deletions
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index d6a8f50ce74..ee7a2040e89 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -22,6 +22,9 @@
# This was taken from the output of Imake using Lucid's Imakefile.
# and set up to be configured by ../configure.
+all: liblw.a
+.PHONY: all
+
srcdir=@srcdir@
# MinGW CPPFLAGS may use this.
abs_top_srcdir=@abs_top_srcdir@
@@ -71,15 +74,14 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-DEPDIR = deps
AUTO_DEPEND = @AUTO_DEPEND@
-
+DEPDIR = deps
ifeq ($(AUTO_DEPEND),yes)
-DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP
-MKDEPDIR = ${MKDIR_P} ${DEPDIR}
+ DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP
+ -include $(ALLOBJS:%.o=$(DEPDIR)/%.d)
else
-DEPFLAGS =
-MKDEPDIR = :
+ DEPFLAGS =
+ include $(srcdir)/deps.mk
endif
## ../src is where the generated file (config.h, globals.h) are.
@@ -94,11 +96,7 @@ ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
-Demacs -I../src \
-I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
-all: liblw.a
-.PHONY: all
-
.c.o:
- @$(MKDEPDIR)
$(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
liblw.a: $(OBJS)
@@ -110,20 +108,14 @@ globals_h = ../src/globals.h
$(globals_h):
$(MAKE) -C ../src globals.h
-ifeq ($(AUTO_DEPEND),yes)
--include $(ALLOBJS:%.o=${DEPDIR}/%.d)
-else
-include $(srcdir)/deps.mk
-endif
-
.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
clean mostlyclean:
- rm -f *.o liblw.a \#*
- -rm -rf ${DEPDIR}
+ rm -f *.o liblw.a \#* $(DEPDIR)/*
distclean: clean
rm -f Makefile
+ rm -fr $(DEPDIR)
bootstrap-clean maintainer-clean: distclean
rm -f TAGS