From aa1fdb3f6fe08169143a3062ca257be487713531 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 20 Dec 2021 15:03:33 -0800 Subject: Put AM_V_GEN etc. first MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the recent changes to src/verbose.mk.in, it’s more important to be consistent about putting AM_V_GEN and similar macros at the start of a rule’s recipe, since ‘make’ now outputs the diagnostic before it executes the recipe rather than the shell outputting it. Most of the uses were already this way, but there were a few outliers. Problem reported by Pip Cet. * Makefile.in (${srcdir}/info/dir): * admin/unidata/Makefile.in (${unidir}/charprop.el, ${unifiles}) (${unidir}/emoji-labels.el): * lib/Makefile.in (libgnu.a, libegnu.a): * lisp/Makefile.in (TAGS): * src/Makefile.in (lisp.mk, Emacs): * test/Makefile.in (%.log, $(test_module)): Put AM_V_GEN and similar macros first. --- Makefile.in | 4 ++-- admin/unidata/Makefile.in | 9 ++++----- lib/Makefile.in | 8 ++++---- lisp/Makefile.in | 4 ++-- src/Makefile.in | 8 ++++---- test/Makefile.in | 8 ++++---- 6 files changed, 20 insertions(+), 21 deletions(-) diff --git a/Makefile.in b/Makefile.in index 202665ea9d0..e68658272f9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1074,8 +1074,8 @@ info_dir_deps = \ ## but then we would need to depend on ${INFOS}, which would ## slow down parallelization. ${srcdir}/info/dir: ${info_dir_deps} - $(AM_V_at)${MKDIR_P} ${srcdir}/info - $(AM_V_GEN)(cd ${srcdir}/doc && \ + $(AM_V_GEN)${MKDIR_P} ${srcdir}/info + $(AM_V_at)(cd ${srcdir}/doc && \ AWK='${AWK}' ../build-aux/make-info-dir ${info_dir_inputs} \ ) >$@.tmp && mv $@.tmp $@ diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in index 701fb92b817..011e97b3d10 100644 --- a/admin/unidata/Makefile.in +++ b/admin/unidata/Makefile.in @@ -63,21 +63,21 @@ unidata.txt: ${srcdir}/UnicodeData.txt ## pretend that it does since other Makefiles assume that if charprop ## is up-to-date, the unifiles are too. ${unidir}/charprop.el: ${unifiles} ${srcdir}/unidata-gen.el | ${srcdir}/unidata-gen.elc - $(AM_V_at)[ ! -f $@ ] || chmod +w $@ - $(AM_V_GEN)${emacs} -L ${srcdir} -l unidata-gen \ + $(AM_V_GEN)[ ! -f $@ ] || chmod +w $@ + $(AM_V_at)${emacs} -L ${srcdir} -l unidata-gen \ -f unidata-gen-charprop $@ ${unifiles}: ${srcdir}/unidata-gen.el \ ${srcdir}/UnicodeData.txt ${srcdir}/BidiMirroring.txt \ ${srcdir}/BidiBrackets.txt | \ ${srcdir}/unidata-gen.elc unidata.txt - $(AM_V_at)[ ! -f $@ ] || chmod +w $@ + $(AM_V_GEN)[ ! -f $@ ] || chmod +w $@ $(AM_V_at)${emacs} -L ${srcdir} -l unidata-gen \ -f unidata-gen-file $@ ${srcdir} ${unidir}/emoji-labels.el: ${unidir}/../international/emoji.el \ ${srcdir}/emoji-test.txt - $(AM_V_at)${emacs} -l emoji.el -f emoji--generate-file $@ + $(AM_V_GEN)${emacs} -l emoji.el -f emoji--generate-file $@ .PHONY: charscript.el charscript.el: ${unidir}/charscript.el @@ -120,4 +120,3 @@ gen-clean: ## ref: https://lists.gnu.org/r/emacs-devel/2013-11/msg01029.html maintainer-clean: gen-clean distclean - diff --git a/lib/Makefile.in b/lib/Makefile.in index ccb90c3d1b3..7fdbf192687 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -88,13 +88,13 @@ e-%.o: %.c all: libgnu.a $(if $(HYBRID_MALLOC),libegnu.a) libgnu.a: $(libgnu_a_OBJECTS) - $(AM_V_at)rm -f $@ - $(AM_V_AR)$(AR) $(ARFLAGS) $@ $(libgnu_a_OBJECTS) + $(AM_V_AR)rm -f $@ + $(AM_V_at)$(AR) $(ARFLAGS) $@ $(libgnu_a_OBJECTS) $(AM_V_at)$(RANLIB) $@ libegnu.a: $(libegnu_a_OBJECTS) - $(AM_V_at)rm -f $@ - $(AM_V_AR)$(AR) $(ARFLAGS) $@ $(libegnu_a_OBJECTS) + $(AM_V_AR)rm -f $@ + $(AM_V_at)$(AR) $(ARFLAGS) $@ $(libegnu_a_OBJECTS) $(AM_V_at)$(RANLIB) $@ ETAGS = ../lib-src/etags$(EXEEXT) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index df9e5c36ee1..0c0c3f12acb 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -255,9 +255,9 @@ ${ETAGS}: FORCE ## compile-main. But maybe this is not even necessary any more now ## that this uses relative filenames. TAGS: ${ETAGS} ${tagsfiles} - $(AM_V_at)rm -f $@ + $(AM_V_GEN)rm -f $@ $(AM_V_at)touch $@ - $(AM_V_GEN)ls ${tagsfiles} | xargs $(XARGS_LIMIT) "${ETAGS}" -a -o $@ + $(AM_V_at)ls ${tagsfiles} | xargs $(XARGS_LIMIT) "${ETAGS}" -a -o $@ # The src/Makefile.in has its own set of dependencies and when they decide diff --git a/src/Makefile.in b/src/Makefile.in index ee9a22469ea..ea4a7207ffb 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -525,11 +525,11 @@ endif ## but the second one seems like it could be more future-proof. shortlisp = lisp.mk: $(lispsource)/loadup.el - @rm -f $@ ${AM_V_GEN}( printf 'shortlisp = \\\n'; \ sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \ sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \ - echo "" ) > $@ + echo "" ) > $@.tmp + $(AM_V_at)mv -f $@.tmp $@ -include lisp.mk shortlisp_filter = leim/leim-list.el site-load.elc site-init.elc @@ -617,8 +617,8 @@ endif ifeq ($(HAVE_BE_APP),yes) Emacs: emacs$(EXEEXT) - cp -f emacs$(EXEEXT) $@ - $(AM_V_GEN) $(libsrc)/be-resources \ + $(AM_V_GEN) cp -f emacs$(EXEEXT) $@ + $(AM_V_at) $(libsrc)/be-resources \ $(etc)/images/icons/hicolor/32x32/apps/emacs.png $@ Emacs.pdmp: $(pdmp) $(AM_V_GEN) cp -f $(pdmp) $@ diff --git a/test/Makefile.in b/test/Makefile.in index 0bb35581d18..378a8fde7ed 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -183,8 +183,8 @@ testloadfile = $* endif %.log: %.elc - $(AM_V_at)${MKDIR_P} $(dir $@) - $(AM_V_GEN)HOME=$(TEST_HOME) $(emacs) \ + $(AM_V_GEN)${MKDIR_P} $(dir $@) + $(AM_V_at)HOME=$(TEST_HOME) $(emacs) \ -l ert ${ert_opts} -l $(testloadfile) \ $(TEST_RUN_ERT) @@ -291,8 +291,8 @@ FREE_SOURCE_1 = $(srcdir)/../lib/free.c # as source because those are not compiled with -fPIC. Therefore we # use only source files. $(test_module): $(test_module:${SO}=.c) ../src/emacs-module.h - $(AM_V_at)${MKDIR_P} $(dir $@) - $(AM_V_CCLD)$(CC) -shared $(CPPFLAGS) $(MODULE_CFLAGS) $(LDFLAGS) \ + $(AM_V_CCLD)${MKDIR_P} $(dir $@) + $(AM_V_at)$(CC) -shared $(CPPFLAGS) $(MODULE_CFLAGS) $(LDFLAGS) \ -o $@ $< $(LIBGMP) \ $(and $(GMP_H),$(srcdir)/../lib/mini-gmp-gnulib.c) \ $(FREE_SOURCE_$(REPLACE_FREE)) \ -- cgit v1.2.3