autoconf
[Top][All Lists]
Advanced

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

Re: ensure a VPATH build


From: Ralf Wildenhues
Subject: Re: ensure a VPATH build
Date: Tue, 21 Feb 2006 13:32:34 +0100
User-agent: Mutt/1.5.11

Hi Keith,

* Keith MARSHALL wrote on Tue, Feb 21, 2006 at 12:50:18PM CET:
> 
[ lots of explanations ]

Thanks!

> Ralf Wildenhues wrote, quoting me:
> > BTW, in the patch [snipped], the
> >   >> $REFFILE
> > looks problematic to me.  What is it supposed to do?
> 
> I've never encountered a shell which has trouble with this idiom
> for touching a file, leaving it unmodified if it already exists, or
> creating it (empty) if it doesn't;  (even MS-DOS' command.com can
> handle it, in the form `>> %REFFILE%', in its .bat language).  I
> won't change this, unless you can provide evidence of a specific
> arena in which it fails.

Some zsh versions have NULLCMD set to `cat' by default, so the command
will be equivalent to
   cat >> $REFFILE
and thus will read from stdin until EOF.  If stdin is connected to the
terminal, the innocent user will think the program hangs; if it points
to an open file, that file will end up in $REFFILE.

Quoting relevant parts of (CVS) autoconf.info:
| Zsh
|      To detect whether you are running `zsh', test whether
|      `ZSH_VERSION' is set.  By default `zsh' is _not_ compatible with
|      the Bourne shell: you must execute `emulate sh', and for `zsh'
|      versions before 3.1.6-dev-18 you must also set `NULLCMD' to `:'.
|      *Note Compatibility: (zsh)Compatibility, for details.
| 
|      The default Mac OS X `sh' was originally Zsh; it was changed to
|      Bash in Mac OS X 10.2.

| `NULLCMD'
|      When executing the command `>foo', `zsh' executes `$NULLCMD >foo'
|      unless it is operating in Bourne shell compatibility mode and the
|      `zsh' version is newer than 3.1.6-dev-18.  If are using an older
|      `zsh' and forget to set `NULLCMD', your script might be suspended
|      waiting for data on its standard input.

Cheers,
Ralf




reply via email to

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