bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] build: ensure that a release build fails when a submodule is


From: Jim Meyering
Subject: Re: [PATCH] build: ensure that a release build fails when a submodule is unclean
Date: Sun, 03 May 2009 15:40:21 +0200

Eric Blake wrote:
> According to Jim Meyering on 5/2/2009 2:34 PM:
>> * top/maint.mk (no-submodule-changes): New rule.
>> (alpha beta major): Depend on it.
>> +.PHONY: no-submodule-changes
>> +no-submodule-changes:
>> +    if test -d .git; then                                           \
>
> Can we please make this VPATH safe?  $(srcdir)/.git
>
>> +      diff=$$(git submodule -q foreach git diff-index --name-only HEAD) \
>
> diff=$$(cd $(srcdir) && git submodule...

Of course.
Thanks!

How about this?

>From ab74569073c6e4937fd830a5c291d9a34812ef3e Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Sun, 3 May 2009 15:39:00 +0200
Subject: [PATCH] maint: make the new no-submodule-changes rule VPATH-safe

* top/maint.mk (no-submodule-changes): Don't assume a srcdir build.
---
 ChangeLog    |    5 +++++
 top/maint.mk |    5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e8dbe51..8815e48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-03  Eric Blake  <address@hidden>
+
+       maint: make the new no-submodule-changes rule VPATH-safe
+       * top/maint.mk (no-submodule-changes): Don't assume a srcdir build.
+
 2009-05-03  Jim Meyering  <address@hidden>
             Bruno Haible  <address@hidden>

diff --git a/top/maint.mk b/top/maint.mk
index f34f6bf..fb50518 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -678,8 +678,9 @@ endef

 .PHONY: no-submodule-changes
 no-submodule-changes:
-       if test -d .git; then                                           \
-         diff=$$(git submodule -q foreach git diff-index --name-only HEAD) \
+       if test -d $(srcdir)/.git; then                                 \
+         diff=$$(cd $(srcdir) && git submodule -q foreach              \
+                 git diff-index --name-only HEAD)                      \
            || exit 1;                                                  \
          case $$diff in '') ;;                                         \
            *) echo '$(ME): submodule files are locally modified:';     \
--
1.6.3.rc4.190.g4648




reply via email to

[Prev in Thread] Current Thread [Next in Thread]