[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ensure a VPATH build
From: |
Keith MARSHALL |
Subject: |
Re: ensure a VPATH build |
Date: |
Tue, 21 Feb 2006 11:50:18 +0000 |
Ralf Wildenhues wrote, quoting me:
>> I fixed it by moving the backticked expression outside of the
>> outer quotes.
>
> Yes. Note that some more quotes are unnecessary here; this
> MATCH="$MATCH"`echo --$OPT | $GREP "^$OPTNAME"`
>
> can safely be rewritten like this:
> MATCH=$MATCH`echo --$OPT | $GREP "^$OPTNAME"`
>
> simply because the shell does not do word-splitting on the right
> hand sides of assignments.
Agreed, the double quotes here are redundant; but they are also
harmless, and I happen to prefer the quoted form, in this case.
> By the way, what about the other mentioned issue in above thread?
> The
> ./pdfroff: 561: Syntax error: "}" unexpected (expecting "fi")
This has since been fixed too.
> I do not have access to a system exposing this issue, but a wild
> guess would be that the shell in question has trouble with this
> construct:
> "${foo+"set"}"
Not such a wild guess; the problem was related to this, in a more
complex construct:
CS_FILTER="$STREAM $SED -n '/${DOT}${CS_MACRO-"CS"}/,\
/${DOT}${CE_MACRO-"CE"}/p'"
Moving the default substitutions for CS_MACRO and CE_MACRO out of
the expression, initialising them on a preceeding line on their own,
was sufficient to eliminate the problem.
Curiously, these similar constructs:
IFS="${PATH_SEPARATOR-":"}" prog=':'
and
test "${SHOW_PROGRESS+"set"}" = "set" && SAY=echo
didn't result in a similar problem, and I overlooked them when I
applied the original correction. There haven't been any further bug
reports in the eight months since, but it may still be wise to apply
your patch proactively. Thanks.
> 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.
Regards,
Keith.
- Re: ensure a VPATH build (was: new macro), (continued)
- Re: ensure a VPATH build (was: new macro), Keith Marshall, 2006/02/18
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/18
- Re: ensure a VPATH build, Keith Marshall, 2006/02/18
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/18
- Re: ensure a VPATH build, Keith Marshall, 2006/02/18
- double-quoted command substitutions (was: ensure a VPATH build), Ralf Wildenhues, 2006/02/18
- Re: double-quoted command substitutions (was: ensure a VPATH build), Keith Marshall, 2006/02/18
- Re: ensure a VPATH build, Keith Marshall, 2006/02/18
- Re: ensure a VPATH build, Andreas Schwab, 2006/02/18
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/19
- Re: ensure a VPATH build,
Keith MARSHALL <=
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/21
- Possible zsh contention in pdfroff (Re: [autoconf] ensure a VPATH build), Keith MARSHALL, 2006/02/21
- Re: [Groff] Possible zsh contention in pdfroff (Re: [autoconf] ensure a VPATH build), Pedro A. López-Valencia, 2006/02/22
- Re: ensure a VPATH build, Andreas Schwab, 2006/02/18
- Re: ensure a VPATH build, Julien Lecomte, 2006/02/19
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/19
- Re: ensure a VPATH build, Julien Lecomte, 2006/02/19
- Re: ensure a VPATH build, Ralf Wildenhues, 2006/02/19