Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh and line breaks



On Thu, 15 Apr 2004, Clint Adams wrote:

Greetings Clint,

> >                   args and a fix to the install.html target to use sdir.
>
> Wait, why are you doing this?  It breaks the install target completely
> for VPATH builds.

I fail to see how.  Make may be able to resolve the source and target
files implicitly from VPATH, reguardless of the current directory at the
time, but the shell code it executes for commands does not use VPATH and
breaks when run from a build directory which is not the same as the
source directory.  Here's the diff lines from Doc/Makefile.in:

 install.html: html
        ${SHELL} $(sdir_top)/mkinstalldirs $(DESTDIR)$(htmldir)
-       for file in zsh*.html; do \
+       for file in ${sdir}/zsh*.html; do \
            $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir) || exit 1; \
        done

The use of the shell wildcard (zsh*.html) makes the shell do a pattern
match against the list of files in the directory in which it is run.  If
I was building from a work directory (say zsh-4.2.0/.build/Doc) and
installing into a destination root other that "/" (say zsh-4.2.0/.inst)
make executes this bit of shell code and it fails to find any zsh*.html
files because make isn't currently in that directory (it's in
.build/Doc).  Prepending ${sdir} ensures the zsh*.html files are
addressable to the shell code.  Another solution would be to have a
static list, like the list of man pages in the MAN macro, but even then,
the shell code references the files using $(sdir).

So how, exactly, does this break VPATH?  Can you give me an example?
I'll try and correct it, but I don't yet see how it's broken.

-- 
Peter A. Castro <doctor@xxxxxxxxxxxx> or <Peter.Castro@xxxxxxxxxx>
	"Cats are just autistic Dogs" -- Dr. Tony Attwood



Messages sorted by: Reverse Date, Date, Thread, Author