[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] maint.mk: cache VC_LIST output.
From: |
Martin von Gagern |
Subject: |
[PATCH 2/4] maint.mk: cache VC_LIST output. |
Date: |
Thu, 21 Jan 2010 15:39:48 +0100 |
Several syntax checks work on the list of all versioned files. Regenerating
this list for every such check can be quite time-consuming. To avoid this,
a wrapper target could generate this list once, perform all checks, and
clean up the list afterwards.
As an added benefit, this allows us to pass -k (--keep-going) to the
sub-make, so that it will perform all syntax checks instead of aborting at
the first one to fail.
---
top/maint.mk | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/top/maint.mk b/top/maint.mk
index 366d12a..2a90932 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -112,7 +112,11 @@ $(patsubst %, %.m, $(syntax-check-rules)):
local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available))
-syntax-check: $(local-check)
+syntax-check:
+ @$(VC_LIST) > .vc.list
+ @$(MAKE) -k $(local-check) VC_LIST='cat .vc.list'
+ @$(RM) .vc.list
+
# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
# $$(find -type f -name '*.[chly]') && \
# { echo '$(ME): found conditional include' 1>&2; \
@@ -776,7 +780,7 @@ no-submodule-changes:
.PHONY: alpha beta stable
ALL_RECURSIVE_TARGETS += alpha beta stable
-alpha beta stable: $(local-check) writable-files no-submodule-changes
+alpha beta stable: syntax-check writable-files no-submodule-changes
test $@ = stable \
&& { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
--
1.6.6
Re: Improvements for maint.mk, Eric Blake, 2010/01/21
Re: maintainer-makefile troubles and suggestions, Eric Blake, 2010/01/21
Re: maintainer-makefile troubles and suggestions, Bruno Haible, 2010/01/31