+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
# 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)' \