[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
maintainer-makefile vs vc-list-files/useless-if-before-free
From: |
Simon Josefsson |
Subject: |
maintainer-makefile vs vc-list-files/useless-if-before-free |
Date: |
Mon, 27 Apr 2009 11:39:54 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.92 (gnu/linux) |
In a project that use maintainer-makefile, I get:
address@hidden:~/src/libidn master$ make syntax-check
avoid_if_before_free
/bin/sh: line 2: /build-aux/vc-list-files: No such file or directory
/bin/sh: line 2: /build-aux/useless-if-before-free: No such file or directory
The patch below makes the error messages better. Ok to push?
I prefer that maintainer-makefile do not depend on vc-list-files and
useless-if-before-free modules: not every use of maint.mk requires
syntax-check to work, and not every use of syntax-check needs
useless-if-before-free tests.
/Simon
diff --git a/top/maint.mk b/top/maint.mk
index 9a683a7..cb73cc8 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -32,7 +32,8 @@ GIT = git
VC = $(GIT)
VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)'
-VC_LIST = $(gnulib_dir)/build-aux/vc-list-files -C $(srcdir)
+VC_LIST_FILES ?= $(gnulib_dir)/build-aux/vc-list-files
+VC_LIST = $(VC_LIST_FILES) -C $(srcdir)
VC_LIST_EXCEPT = \
$(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@;
else grep -v ChangeLog; fi
@@ -83,7 +84,13 @@ $(patsubst %, %.m, $(syntax-check-rules)):
local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available))
-syntax-check: $(local-check)
+check-vc-list-files:
+ test -x $(VC_LIST_FILES) || \
+ { echo '$(ME): need gnulib module vc-list-files' 1>&2; \
+ exit 1; } || :
+.PHONY: check-vc-list-files
+
+syntax-check: check-vc-list-files $(local-check)
# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
# $$(find -type f -name '*.[chly]') && \
# { echo '$(ME): found conditional include' 1>&2; \
@@ -111,6 +118,9 @@ define _prohibit_regexp
endef
sc_avoid_if_before_free:
+ test -x $(gnulib_dir)/build-aux/useless-if-before-free || \
+ { echo '$(ME): need gnulib module useless-if-before-free' 1>&2; \
+ exit 1; } || :
@$(gnulib_dir)/build-aux/useless-if-before-free \
$(useless_free_options) \
$$($(VC_LIST_EXCEPT)) && \
- maintainer-makefile vs vc-list-files/useless-if-before-free,
Simon Josefsson <=
- Re: maintainer-makefile vs vc-list-files/useless-if-before-free, Jim Meyering, 2009/04/27
- Re: maintainer-makefile vs vc-list-files/useless-if-before-free, Eric Blake, 2009/04/27
- Re: maintainer-makefile vs vc-list-files/useless-if-before-free, Simon Josefsson, 2009/04/27
- Re: maintainer-makefile vs vc-list-files/useless-if-before-free, Eric Blake, 2009/04/27
- Re: maintainer-makefile vs vc-list-files/useless-if-before-free, Jim Meyering, 2009/04/27
- Re: maintainer-makefile vs vc-list-files/useless-if-before-free, Simon Josefsson, 2009/04/27
- Re: maintainer-makefile vs vc-list-files/useless-if-before-free, Eric Blake, 2009/04/27
- Re: maintainer-makefile vs vc-list-files/useless-if-before-free, Simon Josefsson, 2009/04/27