[Top][All Lists]

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

Re: using VPATH in

From: Stepan Kasal
Subject: Re: using VPATH in
Date: Thu, 20 Oct 2005 11:03:46 +0200
User-agent: Mutt/1.4.1i

Hello Harald,

I'm afraid I cannot judge your suggestion either; we'll have to wait
for Alexandre.

But _if_ it'll be accepted, I would like to point some glitches:

Your proposal, reformatted:

        `test -f '%SOURCE%' || (VPATH=$(VPATH); test "$$VPATH" \
        || VPATH=$(srcdir); for i in \`IFS=:; set $$VPATH; unset IFS; \
           echo "$$@"\`; do test -f $$i/'%SOURCE%' && echo $$i/ && break; \

1) it's not necessary to spawn a subshell
2) `unset' is not portable
3) According to the Autoconf manual, nested backticks are not portable
4) $(srcdir) should be always checked before VPATH, for consistency with
   the case when builddir = srcdir

So I suppose something like this

        `IFS=:; for d in '' '$(srcdir)' $(VPATH); do \
                test -n "$$d" && d=$$d/; \
                test -f "$$d"%SOURCE% && echo "$$d" && break; \

Could you test whether this works for you?

And, for the sake of redability of the commands on the screen, this long
version should be used only if VPATH was seen in this

Have a nice day,
        Stepan Kasal

reply via email to

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