summaryrefslogtreecommitdiff
path: root/top
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2014-06-04 12:52:33 -0600
committerEric Blake <eblake@redhat.com>2014-06-04 13:07:49 -0600
commit088f50493889e02d1d12b40db5a15880af5d6133 (patch)
tree4249529e854b947f43b0568c07b3362ef5d1613c /top
parenteb0662ed9a6c84deae8c443d6d9a09f5b9c435f1 (diff)
downloadgnulib-088f50493889e02d1d12b40db5a15880af5d6133.tar.gz
maintainer-makefile: avoid spurious error messages
Ever since commit 3f51bf41, we are leaving garbage in the console if a user executes commands without first running configure, as shown in the following pseudo-transcript: $ git clone $sv/coreutils.git $ cd coreutils $ ./bootstrap $ make make: -n: Command not found There seems to be no Makefile in this directory. You must run ./configure before running 'make'. make: *** [abort-due-to-no-makefile] Error 1 The first line stems from the fact that we have a $(shell $(SED) -n) use, which gets unconditionally executed even though $(SED) is only guaranteed to be defined if Makefile was included. We also end up trying to invoke /vc-list-files to compute the set of syntax check rules to run due to a $(shell $(VC_LIST)), even though that file likely doesn't exist in the root directory, but where the error message was squelched. Since we already have the nice hooks in place to remind the user they haven't created Makefile yet, and since 'make syntax-check' makes no sense without a Makefile, it is easier to just avoid $(shell) computations of internal state associated with syntax check, by using the same conditional as GNUmakefile in determining if Makefile exists. * top/maint.mk (syntax-check): Guard definition and use of $(shell) by whether Makefile is present. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'top')
-rw-r--r--top/maint.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/top/maint.mk b/top/maint.mk
index b6cd5a2031..2e1bae6325 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -155,6 +155,7 @@ export LC_ALL = C
## Sanity checks. ##
## --------------- ##
+ifneq ($(_gl-Makefile),)
_cfg_mk := $(wildcard $(srcdir)/cfg.mk)
# Collect the names of rules starting with 'sc_'.
@@ -196,6 +197,7 @@ local-check := \
$(filter-out $(local-checks-to-skip), $(local-checks-available)))
syntax-check: $(local-check)
+endif
# _sc_search_regexp
#