Mercurial > hg > octave-lojdl > gnulib-hg
changeset 12768:f12919d53a60
maint.mk: make VC_LIST_EXCEPT robustly handle a srcdir containing "."
* top/maint.mk (_dot_escaped_srcdir): Define.
(VC_LIST_EXCEPT): Use it in LHS of preprocessing sed substitution.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Thu, 21 Jan 2010 16:47:34 +0100 |
parents | 941bc7981053 |
children | 5663df33b7f1 |
files | ChangeLog top/maint.mk |
diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-21 Jim Meyering <meyering@redhat.com> + + maint.mk: handle source file names containing "." robustly + * top/maint.mk (_dot_escaped_srcdir): Define. + (VC_LIST): Use it in LHS of sed substitution. + 2010-01-21 Jiri Denemark <jdenemar@redhat.com> maint.mk: fix VC_LIST_EXCEPT for srcdir != builddir
--- a/top/maint.mk +++ b/top/maint.mk @@ -40,8 +40,13 @@ # matching files to ignore. VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$ +# This is to preprocess robustly the output of $(VC_LIST), so that even +# when $(srcdir) is a pathological name like "....", the leading sed command +# removes only the intended prefix. +_dot_escaped_srcdir = $(subst .,\\.,$(srcdir)) + VC_LIST_EXCEPT = \ - $(VC_LIST) | sed 's|^$(srcdir)/||' \ + $(VC_LIST) | sed 's|^$(_dot_escaped_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)' \