maint.mk: fix VC_LIST_EXCEPT for srcdir != builddir
authorJiri Denemark <jdenemar@redhat.com>
Thu, 21 Jan 2010 13:23:17 +0000 (14:23 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 21 Jan 2010 18:32:00 +0000 (19:32 +0100)
* top/maint.mk (VC_LIST_EXCEPT): Preprocess the output of
$(VC_LIST) to remove a prefix of '$(srcdir)/', so that it works
from a non-srcdir build.

ChangeLog
top/maint.mk

index a92aec0..681b56a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-01-21  Jiri Denemark  <jdenemar@redhat.com>
+
+       maint.mk: fix VC_LIST_EXCEPT for srcdir != builddir
+       * top/maint.mk (VC_LIST_EXCEPT): Preprocess the output of
+       $(VC_LIST) to remove a prefix of '$(srcdir)/', so that it works
+       from a non-srcdir build.
+
 2010-01-20  Eric Blake  <ebb9@byu.net>
 
        warn-on-use: use instead of link-warning
index 366d12a..bbf8a91 100644 (file)
@@ -41,9 +41,11 @@ VC_LIST = $(build_aux)/vc-list-files -C $(srcdir)
 VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$
 
 VC_LIST_EXCEPT = \
-  $(VC_LIST) | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
-              else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
-       | grep -Ev -e '$(VC_LIST_ALWAYS_EXCLUDE_REGEX)'
+  $(VC_LIST) | sed 's|^$(srcdir)/||' \
+       | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
+         else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
+       | grep -Ev -e '$(VC_LIST_ALWAYS_EXCLUDE_REGEX)' \
+       | sed 's|^|$(srcdir)/|'
 
 ifeq ($(origin prev_version_file), undefined)
   prev_version_file = $(srcdir)/.prev-version