aboutsummaryrefslogtreecommitdiffstats
path: root/lwlib
diff options
context:
space:
mode:
authorPaul Eggert2017-03-21 09:59:10 -0700
committerPaul Eggert2017-03-21 09:59:31 -0700
commitbf8cf95d7d13ebc5d351cc2a8048f6695ab9faca (patch)
tree1aa66a743bb6b542c2764e4c77979ede678d6881 /lwlib
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 '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 @@
22# This was taken from the output of Imake using Lucid's Imakefile. 22# This was taken from the output of Imake using Lucid's Imakefile.
23# and set up to be configured by ../configure. 23# and set up to be configured by ../configure.
24 24
25all: liblw.a
26.PHONY: all
27
25srcdir=@srcdir@ 28srcdir=@srcdir@
26# MinGW CPPFLAGS may use this. 29# MinGW CPPFLAGS may use this.
27abs_top_srcdir=@abs_top_srcdir@ 30abs_top_srcdir=@abs_top_srcdir@
@@ -71,15 +74,14 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
71am__v_at_0 = @ 74am__v_at_0 = @
72am__v_at_1 = 75am__v_at_1 =
73 76
74DEPDIR = deps
75AUTO_DEPEND = @AUTO_DEPEND@ 77AUTO_DEPEND = @AUTO_DEPEND@
76 78DEPDIR = deps
77ifeq ($(AUTO_DEPEND),yes) 79ifeq ($(AUTO_DEPEND),yes)
78DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP 80 DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP
79MKDEPDIR = ${MKDIR_P} ${DEPDIR} 81 -include $(ALLOBJS:%.o=$(DEPDIR)/%.d)
80else 82else
81DEPFLAGS = 83 DEPFLAGS =
82MKDEPDIR = : 84 include $(srcdir)/deps.mk
83endif 85endif
84 86
85## ../src is where the generated file (config.h, globals.h) are. 87## ../src is where the generated file (config.h, globals.h) are.
@@ -94,11 +96,7 @@ ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
94 -Demacs -I../src \ 96 -Demacs -I../src \
95 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib 97 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
96 98
97all: liblw.a
98.PHONY: all
99
100.c.o: 99.c.o:
101 @$(MKDEPDIR)
102 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< 100 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
103 101
104liblw.a: $(OBJS) 102liblw.a: $(OBJS)
@@ -110,20 +108,14 @@ globals_h = ../src/globals.h
110$(globals_h): 108$(globals_h):
111 $(MAKE) -C ../src globals.h 109 $(MAKE) -C ../src globals.h
112 110
113ifeq ($(AUTO_DEPEND),yes)
114-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
115else
116include $(srcdir)/deps.mk
117endif
118
119.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean 111.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
120 112
121clean mostlyclean: 113clean mostlyclean:
122 rm -f *.o liblw.a \#* 114 rm -f *.o liblw.a \#* $(DEPDIR)/*
123 -rm -rf ${DEPDIR}
124 115
125distclean: clean 116distclean: clean
126 rm -f Makefile 117 rm -f Makefile
118 rm -fr $(DEPDIR)
127 119
128bootstrap-clean maintainer-clean: distclean 120bootstrap-clean maintainer-clean: distclean
129 rm -f TAGS 121 rm -f TAGS