Eric Blake wrote: > According to Jim Meyering on 1/21/2010 8:51 AM: >> Here are a pair of maint.mk patches. >> The first is from Jiri Denemark and makes VC_LIST-using >> rules like "make syntax-check" also work when run from >> a non-srcdir build. >> >> The second tweaks things so that the pre-filter works robustly >> even when $(srcdir) contains a '.'. > > This isn't working for VPATH builds, although I haven't had time to figure > out why. I'm now getting large dumps like: > >> grep: ../../tests/Makefile.am: No such file or directory >> : No such file or directory >> grep: ../../src/symtab.c: No such file or directory >> (standard input) >> maint.mk: the above files do not call set_program_name >> make: *** [sc_program_name] Error 1 >> make: *** Waiting for unfinished jobs.... >> grep: ../../.gitattributes: No such file or directory >> grep: ../../.gitignore: No such file or directory > > when I built in a subdirectory of the checkout. Somehow, the VPATH > location of '../' got turned into '../../'.
Thanks! Looks like I introduced that. This seems to fix the original problem without breaking anything. I'll push it after a little more testing: diff --git a/top/maint.mk b/top/maint.mk index 1ef28d3..fa64f18 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -43,7 +43,7 @@ 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)) +_dot_escaped_srcdir := $(shell echo '$(srcdir)'|sed 's/\./\\./') VC_LIST_EXCEPT = \ $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \