]> Savannah Git Hosting - gnulib.git/commit
maintainer-makefile: avoid spurious error messages
authorEric Blake <eblake@redhat.com>
Wed, 4 Jun 2014 18:52:33 +0000 (12:52 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 4 Jun 2014 19:07:49 +0000 (13:07 -0600)
commit088f50493889e02d1d12b40db5a15880af5d6133
tree4249529e854b947f43b0568c07b3362ef5d1613c
parenteb0662ed9a6c84deae8c443d6d9a09f5b9c435f1
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>
ChangeLog
top/maint.mk