bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] top/maint.mk: Fix VC_LIST_EXCEPT for srcdir != builddir


From: Jim Meyering
Subject: Re: [PATCH 1/2] top/maint.mk: Fix VC_LIST_EXCEPT for srcdir != builddir
Date: Sat, 23 Jan 2010 19:28:23 +0100

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)/||' \




reply via email to

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