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: Sun, 19 Feb 2006 14:40:13 +0100
User-agent: Mutt/1.5.9i

Hi Keith,

* Keith Marshall wrote on Sat, Feb 18, 2006 at 06:00:45PM CET:
> On Saturday 18 February 2006 12:53 pm, Ralf Wildenhues wrote:
> >
> > Could you point me to the bug report?
> http://lists.gnu.org/archive/html/groff/2005-06/msg00032.html
> 
> If you follow the thread, you will see that this one was the double 
> quotes nested within a double quoted backticked substitution;

Agreed.

> 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.


By the way, what about the other mentioned issue in above thread?
The
  ./pdfroff: 561: Syntax error: "}" unexpected (expecting "fi")

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"}"

and since neither of the characters s, e, t, are special to the shell,
you could safely apply the patch below, and ask the bug reporter whether
it fixes the issue.  It would be even better if someone with access
could analyze the issue further, so that we could add an appropriate
warning to autoconf.texi.  (I left the inner quotes in the other hunk,
because they help readability -- I'd otherwise confuse `-:' with `:-'.)

BTW, in the patch below, the
  >> $REFFILE
looks problematic to me.  What is it supposed to do?  Please note that
some versions of zsh (which may be /bin/sh on some system) set $NULLCMD
differently than others, and that may influence what this line does.
CVS Autoconf has AS_BOURNE_COMPATIBLE to help with issues like that,
but in this case it's probably best to explicitly write what was meant,
i.e., either `cat' or `:'.

Cheers,
Ralf

--- groff-current/contrib/pdfmark/pdfroff.sh.orig       2006-02-19 
14:22:15.000000000 +0100
+++ groff-current/contrib/pdfmark/pdfroff.sh    2006-02-19 14:35:03.000000000 
+0100
@@ -45,7 +45,7 @@
   #
   # Usage:  searchpath progname path
   #
-    IFS="${PATH_SEPARATOR-":"}" prog=':'
+    IFS=${PATH_SEPARATOR-":"} prog=':'
     for dir in $2
     do
       for ext in '' '.exe'
@@ -374,7 +374,7 @@
   then
     >> $REFFILE
     echo kickstart > $REFCOPY
-    test "${SHOW_PROGRESS+"set"}" = "set" && SAY=echo
+    test "${SHOW_PROGRESS+set}" = "set" && SAY=echo
 #
 #   In order to correctly resolve 'pdfmark' references,
 #   we need to have both the 'awk' and 'diff' programs available.




reply via email to

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