1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-18 03:40:47 -08:00

Prefer $(info) to @echo

Have GNU Make output some diagnostics directly, instead of forking
and execing a shell to do it.
* GNUmakefile (help):
* doc/lispref/two-volume.make (vol2.pdf, elisp2med-init)
(elisp2-init):
* doc/misc/Makefile.in (echo-info, echo-sources):
* lib-src/Makefile.in (archlibdir, install, check):
* src/verbose.mk.in (AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD)
(AM_V_CXXLD, AM_V_ELC, AM_V_ELN, AM_V_GEN, AM_V_GLOBALS)
(AM_V_RC):
* test/Makefile.in (subdirs, subdir-targets):
Prefer $(info) to @echo.
* GNUmakefile (MAKECMDGOALS, configure, Makefile):
Prefer $(warning) to @echo >&2.
* src/verbose.mk.in (AM_V_ELN): Output target, like the others.
This commit is contained in:
Paul Eggert 2021-12-20 12:14:07 -08:00
parent a34650acff
commit eaa44ca40e
6 changed files with 56 additions and 56 deletions

View file

@ -36,31 +36,31 @@
ifeq (help,$(filter help,$(MAKECMDGOALS))) ifeq (help,$(filter help,$(MAKECMDGOALS)))
help: help:
@echo "NOTE: This is a brief summary of some common make targets." $(info $ NOTE: This is a brief summary of some common make targets.)
@echo "For more detailed information, please read the files INSTALL," $(info $ For more detailed information, please read the files INSTALL,)
@echo "INSTALL.REPO, Makefile or visit this URL:" $(info $ INSTALL.REPO, Makefile or visit this URL:)
@echo "https://www.gnu.org/prep/standards/html_node/Standard-Targets.html" $(info $ https://www.gnu.org/prep/standards/html_node/Standard-Targets.html)
@echo "" $(info $ )
@echo "make all -- compile and build Emacs" $(info $ make all -- compile and build Emacs)
@echo "make install -- install Emacs" $(info $ make install -- install Emacs)
@echo "make TAGS -- update tags tables" $(info $ make TAGS -- update tags tables)
@echo "make clean -- delete built files but preserve configuration" $(info $ make clean -- delete built files but preserve configuration)
@echo "make mostlyclean -- like 'make clean', but leave those files that" $(info $ make mostlyclean -- like 'make clean', but leave those files that)
@echo " usually do not need to be recompiled" $(info $ usually do not need to be recompiled)
@echo "make distclean -- delete all build and configuration files," $(info $ make distclean -- delete all build and configuration files,)
@echo " leave only files included in source distribution" $(info $ leave only files included in source distribution)
@echo "make maintainer-clean -- delete almost everything that can be regenerated" $(info $ make maintainer-clean -- delete almost everything that can be regenerated)
@echo "make extraclean -- like maintainer-clean, and also delete" $(info $ make extraclean -- like maintainer-clean, and also delete)
@echo " backup and autosave files" $(info $ backup and autosave files)
@echo "make bootstrap -- delete all compiled files to force a new bootstrap" $(info $ make bootstrap -- delete all compiled files to force a new bootstrap)
@echo " from a clean slate, then build in the normal way" $(info $ from a clean slate, then build in the normal way)
@echo "make uninstall -- remove files installed by 'make install'" $(info $ make uninstall -- remove files installed by 'make install')
@echo "make check -- run the Emacs test suite" $(info $ make check -- run the Emacs test suite)
@echo "make docs -- generate Emacs documentation in info format" $(info $ make docs -- generate Emacs documentation in info format)
@echo "make html -- generate documentation in html format" $(info $ make html -- generate documentation in html format)
@echo "make ps -- generate documentation in ps format" $(info $ make ps -- generate documentation in ps format)
@echo "make pdf -- generate documentation in pdf format " $(info $ make pdf -- generate documentation in pdf format )
@exit @:
.PHONY: help .PHONY: help
@ -79,7 +79,7 @@ else
ifeq ($(filter-out %clean,$(or $(MAKECMDGOALS),default)),) ifeq ($(filter-out %clean,$(or $(MAKECMDGOALS),default)),)
$(MAKECMDGOALS): $(MAKECMDGOALS):
@echo >&2 'No Makefile; skipping $@.' $(warning No Makefile; skipping $@.)
else else
@ -97,18 +97,18 @@ default $(ORDINARY_GOALS): Makefile
.NOTPARALLEL: .NOTPARALLEL:
configure: configure:
@echo >&2 'There seems to be no "configure" file in this directory.' $(warning There seems to be no "configure" file in this directory.)
@echo >&2 Running ./autogen.sh ... $(warning Running ./autogen.sh ...)
./autogen.sh ./autogen.sh
@echo >&2 '"configure" file built.' @echo >&2 '"configure" file built.'
Makefile: configure Makefile: configure
@echo >&2 'There seems to be no Makefile in this directory.' $(warning There seems to be no Makefile in this directory.)
ifeq ($(configure),default) ifeq ($(configure),default)
@echo >&2 'Running ./configure ...' $(warning Running ./configure ...)
./configure ./configure
else else
@echo >&2 'Running ./configure '$(configure)'...' $(warning Running ./configure $(configure)...)
./configure $(configure) ./configure $(configure)
endif endif
@echo >&2 'Makefile built.' @echo >&2 'Makefile built.'

View file

@ -35,7 +35,7 @@ vol1.pdf: elisp1med-fns-ready elisp1med-aux-ready elisp1med-toc-ready
$(tex1) $(tex1)
# #
vol2.pdf: elisp2med-fns-ready elisp2med-aux-ready elisp2med-toc-ready vol2.pdf: elisp2med-fns-ready elisp2med-aux-ready elisp2med-toc-ready
@echo "Final TeX run for volume 2..." $(info Final TeX run for volume 2...)
cp elisp2med-toc-ready elisp2-toc-ready.toc cp elisp2med-toc-ready elisp2-toc-ready.toc
cp elisp2med-fns-ready vol2.fns cp elisp2med-fns-ready vol2.fns
cp elisp2med-aux-ready vol2.aux cp elisp2med-aux-ready vol2.aux
@ -123,7 +123,7 @@ elisp1med-init: elisp1-fns-ready elisp1-aux-ready elisp1init-toc-ready $(texinfo
mv vol1.toc elisp1med-toc mv vol1.toc elisp1med-toc
# #
elisp2med-init: elisp2-fns-ready elisp2-aux-ready elisp2init-toc-ready $(texinfodir)/texinfo.tex elisp2med-init: elisp2-fns-ready elisp2-aux-ready elisp2init-toc-ready $(texinfodir)/texinfo.tex
@echo "Final TeX run for volume 2..." $(info Final TeX run for volume 2...)
cp elisp2init-toc-ready elisp2-toc-ready.toc cp elisp2init-toc-ready elisp2-toc-ready.toc
cp elisp2-fns-ready vol2.fns cp elisp2-fns-ready vol2.fns
cp elisp2-aux-ready vol2.aux cp elisp2-aux-ready vol2.aux
@ -211,7 +211,7 @@ elisp1-init: elisp.texi
touch $@ touch $@
# #
elisp2-init: elisp.texi elisp2-init: elisp.texi
@echo "Initial TeX run for volume 2..." $(info Initial TeX run for volume 2...)
rm -f vol2.aux vol2.toc rm -f vol2.aux vol2.toc
$(tex2) $(tex2)
texindex vol2.?? texindex vol2.??

View file

@ -130,12 +130,12 @@ info: $(INFO_TARGETS)
## Used by top-level Makefile. ## Used by top-level Makefile.
## Base file names of output info files. ## Base file names of output info files.
INFO_BASES = $(patsubst %.info,%,$(notdir $(INFO_INSTALL)))
echo-info: echo-info:
@echo "$(INFO_INSTALL) " | \ @: $(info $(addsuffix .info,$(INFO_BASES)))
sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ */.info /g"
echo-sources: echo-sources:
@echo ${SOURCES} @: $(info $(SOURCES))
dvi: $(DVI_TARGETS) dvi: $(DVI_TARGETS)

View file

@ -297,8 +297,8 @@ maybe-blessmail: $(BLESSMAIL_TARGET)
## up if chown or chgrp fails, as the package responsible for ## up if chown or chgrp fails, as the package responsible for
## installing Emacs can fix this problem later. ## installing Emacs can fix this problem later.
$(DESTDIR)${archlibdir}: all $(DESTDIR)${archlibdir}: all
@echo $(info $ )
@echo "Installing utilities run internally by Emacs." $(info Installing utilities run internally by Emacs.)
umask 022 && ${MKDIR_P} "$(DESTDIR)${archlibdir}" umask 022 && ${MKDIR_P} "$(DESTDIR)${archlibdir}"
exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd` && \ exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd` && \
if [ "$$exp_archlibdir" != "`/bin/pwd`" ]; then \ if [ "$$exp_archlibdir" != "`/bin/pwd`" ]; then \
@ -339,8 +339,8 @@ $(DESTDIR)${archlibdir}: all
.PHONY: bootstrap-clean check tags .PHONY: bootstrap-clean check tags
install: $(DESTDIR)${archlibdir} install: $(DESTDIR)${archlibdir}
@echo $(info $ )
@echo "Installing utilities for users to run." $(info Installing utilities for users to run.)
umask 022 && ${MKDIR_P} "$(DESTDIR)${bindir}" umask 022 && ${MKDIR_P} "$(DESTDIR)${bindir}"
for file in ${INSTALLABLES} ; do \ for file in ${INSTALLABLES} ; do \
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} \ $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} \
@ -375,7 +375,7 @@ bootstrap-clean maintainer-clean: distclean
## Test the contents of the directory. ## Test the contents of the directory.
check: check:
@echo "We don't have any tests for the lib-src/ directory yet." $(info We don't have any tests for the lib-src/ directory yet.)
tagsfiles = $(wildcard ${srcdir}/*.[ch]) tagsfiles = $(wildcard ${srcdir}/*.[ch])

View file

@ -33,26 +33,26 @@ AM_V_GLOBALS =
AM_V_NO_PD = AM_V_NO_PD =
AM_V_RC = AM_V_RC =
else else
AM_V_AR = @echo " AR " $@; AM_V_AR = @$(info $ AR $@)
AM_V_at = @ AM_V_at = @
AM_V_CC = @echo " CC " $@; AM_V_CC = @$(info $ CC $@)
AM_V_CXX = @echo " CXX " $@; AM_V_CXX = @$(info $ CXX $@)
AM_V_CCLD = @echo " CCLD " $@; AM_V_CCLD = @$(info $ CCLD $@)
AM_V_CXXLD = @echo " CXXLD " $@; AM_V_CXXLD = @$(info $ CXXLD $@)
ifeq ($(HAVE_NATIVE_COMP),yes) ifeq ($(HAVE_NATIVE_COMP),yes)
ifeq ($(NATIVE_DISABLED),1) ifeq ($(NATIVE_DISABLED),1)
AM_V_ELC = @echo " ELC " $@; AM_V_ELC = @$(info $ ELC $@)
AM_V_ELN = AM_V_ELN =
else else
AM_V_ELC = @echo " ELC+ELN " $@; AM_V_ELC = @$(info $ ELC+ELN $@)
AM_V_ELN = @echo " ELN " $@; AM_V_ELN = @$(info $ ELN $@)
endif endif
else else
AM_V_ELC = @echo " ELC " $@; AM_V_ELC = @$(info $ ELC $@)
AM_V_ELN = AM_V_ELN =
endif endif
AM_V_GEN = @echo " GEN " $@; AM_V_GEN = @$(info $ GEN $@)
AM_V_GLOBALS = @echo " GEN " globals.h; AM_V_GLOBALS = @$(info $ GEN globals.h)
AM_V_NO_PD = --no-print-directory AM_V_NO_PD = --no-print-directory
AM_V_RC = @echo " RC " $@; AM_V_RC = @$(info $ RC $@)
endif endif

View file

@ -375,10 +375,10 @@ check-declare:
.PHONY: subdirs subdir-targets generate-test-jobs .PHONY: subdirs subdir-targets generate-test-jobs
subdirs: subdirs:
@echo $(SUBDIRS) @: $(info $(SUBDIRS))
subdir-targets: subdir-targets:
@echo $(SUBDIR_TARGETS) @: $(info $(SUBDIR_TARGETS))
generate-test-jobs: generate-test-jobs:
@$(MAKE) -C infra generate-test-jobs SUBDIRS="$(SUBDIRS)" @$(MAKE) -C infra generate-test-jobs SUBDIRS="$(SUBDIRS)"