diff options
| author | Paul Eggert | 2017-03-21 09:59:10 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-03-21 09:59:31 -0700 |
| commit | bf8cf95d7d13ebc5d351cc2a8048f6695ab9faca (patch) | |
| tree | 1aa66a743bb6b542c2764e4c77979ede678d6881 /lwlib | |
| parent | 14d8b6858a49e97f9b69593df5a8a7886430d43f (diff) | |
| download | emacs-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.in | 28 |
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 | ||
| 25 | all: liblw.a | ||
| 26 | .PHONY: all | ||
| 27 | |||
| 25 | srcdir=@srcdir@ | 28 | srcdir=@srcdir@ |
| 26 | # MinGW CPPFLAGS may use this. | 29 | # MinGW CPPFLAGS may use this. |
| 27 | abs_top_srcdir=@abs_top_srcdir@ | 30 | abs_top_srcdir=@abs_top_srcdir@ |
| @@ -71,15 +74,14 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) | |||
| 71 | am__v_at_0 = @ | 74 | am__v_at_0 = @ |
| 72 | am__v_at_1 = | 75 | am__v_at_1 = |
| 73 | 76 | ||
| 74 | DEPDIR = deps | ||
| 75 | AUTO_DEPEND = @AUTO_DEPEND@ | 77 | AUTO_DEPEND = @AUTO_DEPEND@ |
| 76 | 78 | DEPDIR = deps | |
| 77 | ifeq ($(AUTO_DEPEND),yes) | 79 | ifeq ($(AUTO_DEPEND),yes) |
| 78 | DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP | 80 | DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP |
| 79 | MKDEPDIR = ${MKDIR_P} ${DEPDIR} | 81 | -include $(ALLOBJS:%.o=$(DEPDIR)/%.d) |
| 80 | else | 82 | else |
| 81 | DEPFLAGS = | 83 | DEPFLAGS = |
| 82 | MKDEPDIR = : | 84 | include $(srcdir)/deps.mk |
| 83 | endif | 85 | endif |
| 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 | ||
| 97 | all: 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 | ||
| 104 | liblw.a: $(OBJS) | 102 | liblw.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 | ||
| 113 | ifeq ($(AUTO_DEPEND),yes) | ||
| 114 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) | ||
| 115 | else | ||
| 116 | include $(srcdir)/deps.mk | ||
| 117 | endif | ||
| 118 | |||
| 119 | .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean | 111 | .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean |
| 120 | 112 | ||
| 121 | clean mostlyclean: | 113 | clean mostlyclean: |
| 122 | rm -f *.o liblw.a \#* | 114 | rm -f *.o liblw.a \#* $(DEPDIR)/* |
| 123 | -rm -rf ${DEPDIR} | ||
| 124 | 115 | ||
| 125 | distclean: clean | 116 | distclean: clean |
| 126 | rm -f Makefile | 117 | rm -f Makefile |
| 118 | rm -fr $(DEPDIR) | ||
| 127 | 119 | ||
| 128 | bootstrap-clean maintainer-clean: distclean | 120 | bootstrap-clean maintainer-clean: distclean |
| 129 | rm -f TAGS | 121 | rm -f TAGS |