[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] maint.mk: improve the public-submodule-commit rule
From: |
Jim Meyering |
Subject: |
Re: [PATCH] maint.mk: improve the public-submodule-commit rule |
Date: |
Fri, 21 Jan 2011 09:05:46 +0100 |
Eric Blake wrote:
> On 01/20/2011 04:34 AM, Jim Meyering wrote:
>> This is in preparation for hooking this rule to "check"
>> at least in coreutils. Today I was burned once again by
>> pushing a non-public submodule reference (coreutils).
>> The fact that this check is currently run only at release time
>> is good, but obviously not enough.
>>
>> It probably belongs on a server-side commit hook, too.
>>
>> As a possible follow-on idea, ...
>> So far, I don't see a down-side to adding this line to maint.mk:
>>
>> check: public-submodule-commit
>
> The rule is a no-op for projects that use gnulib and maintainer-makefile
> but do not use git submodules (or even git at all), so I'm okay with it
> on that front.
>
> However, there are times when I specifically commit a private gnulib
> commit to my private clone of a repository, since that makes it easier
> to pull from my private clone on multiple machines to test whether a
> potential gnulib patch has merit. I guess it would be easy enough to
> use 'make -k check' in those cases, although it becomes a bit more
> effort to inspect the logs in those cases to ensure the only failure was
> indeed from the known-private submodule and not from a regression
> introduced by using the candidate gnulib commit.
>
> I'm 60:40 in favor of including the 'check: public-submodule-commit'
> hook at the moment.
With this you can disable it:
(BTW, I'm about to down-case that new GL_ variable name,
gl_... is the prevailing)
>From c8d55a78ee3f5fce518f71478e20c69eaae6c638 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 20 Jan 2011 21:49:06 +0100
Subject: [PATCH] maint.mk: make "check" depend on public-submodule-commit by
default
* top/maint.mk (GL_PUBLIC_SUBMODULE_COMMIT): New overridable variable.
---
ChangeLog | 5 +++++
top/maint.mk | 8 ++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8ac17f9..be6a9ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-20 Jim Meyering <address@hidden>
+
+ maint.mk: make "check" depend on public-submodule-commit by default
+ * top/maint.mk (GL_PUBLIC_SUBMODULE_COMMIT): New overridable variable.
+
2011-01-20 Bruno Haible <address@hidden>
mbfile, mbiter: Complete change from 2008-12-21.
diff --git a/top/maint.mk b/top/maint.mk
index 25f4736..c57acd3 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1134,6 +1134,14 @@ public-submodule-commit:
else \
: ; \
fi
+# This rule has a high enough utility/cost ratio that it should be a
+# dependent of "check" by default. However, some of us do occasionally
+# commit a temporary change that deliberately points to a non-public
+# submodule commit, and want to be able to use rules like "make check".
+# In that case, run e.g., "make check GL_PUBLIC_SUBMODULE_COMMIT="
+# to disable this test.
+GL_PUBLIC_SUBMODULE_COMMIT ?= public-submodule-commit
+check: $(GL_PUBLIC_SUBMODULE_COMMIT)
.PHONY: alpha beta stable
ALL_RECURSIVE_TARGETS += alpha beta stable
--
1.7.3.5