diff options
author | Eric Blake <eblake@redhat.com> | 2011-02-16 14:15:51 -0700 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-02-16 14:26:04 -0700 |
commit | aa0f5d7586efe7044f6ca9e07be3f579ee0d5618 (patch) | |
tree | 1b71c5a5f52003c5e0ac6d8c6b44f0a54d7a9d9b /top | |
parent | 157f0c2dde33c4e5067b3fc0fab27cf1f6e219bc (diff) | |
download | gnulib-aa0f5d7586efe7044f6ca9e07be3f579ee0d5618.tar.gz |
maintainer-makefile: make syntax-check a no-op from tarballs
* top/maint.mk (no-vc-detected): New rule.
(local-checks-available): Use it to avoid hanging if someone tries
'make syntax-check' from a tarball. Also append to any non-syntax
checks already defined in cfg.mk.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'top')
-rw-r--r-- | top/maint.mk | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/top/maint.mk b/top/maint.mk index 606d42ed18..ff2fbbb382 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -126,8 +126,13 @@ syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \ $(srcdir)/$(ME) $(_cfg_mk))) .PHONY: $(syntax-check-rules) -local-checks-available = \ - $(syntax-check-rules) +ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0) +local-checks-available += $(syntax-check-rules) +else +local-checks-available += no-vc-detected +no-vc-detected: + @echo "No version control files detected; skipping syntax check" +endif .PHONY: $(local-checks-available) # Arrange to print the name of each syntax-checking rule just before running it. |