bug-automake
[Top][All Lists]
Advanced

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

Re: Problem with sh "shift" command in config.status on HP-UX


From: Ralf Wildenhues
Subject: Re: Problem with sh "shift" command in config.status on HP-UX
Date: Thu, 26 Mar 2009 20:38:08 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Daniel Richard G. wrote on Thu, Mar 26, 2009 at 04:56:11PM CET:
> >
> > But how can this be.  Just before the shift, one of the two "set"
> > commands is executed and sets $1 to "x".  Which is exactly what the
> > shift aims to undo!
> 
> I've confirmed that this works correctly for a small number of parameters, 
> but...
> 
> > Are you sure this is the position the error is
> > happening?
> 
> I added the following blurb just before the shift:
> 
>       echo "CONFIG_FILES = >$CONFIG_FILES<"
>       echo "# = >$#<"
>       echo "1 = >$1<"
>       echo "2 = >$2<"
>       echo "3 = >$3<"
> 
> The output:
> 
>       CONFIG_FILES = > Makefile doc/Makefile ... ttest/Makefile<
>       # = >0<
>       1 = ><
>       2 = ><
>       3 = ><
> 
> The CONFIG_FILES list is huge---541 makefiles.

Sounds like you found a shell bug.  Unfortunately, I cannot reproduce it
yet, on neither PA/B.11.00 nor on IA/11.23.

Can you try reproducing this with a simpler example script?  E.g.,
bottom up, as in

set makefile foo/makefile
for i in 2 3 4 5 6 7 8 9      # 2^i
do
  set $* $*
done
C="$*"
case $C in *\'*) eval set x "$C";; *) set x $C;; esac
shift
echo $#

or going down, as in simplifying the config.status script?
What would be interesting to know is whether it is the 'set' that is
broken with too many arguments, or the 'case' (e.g., neither of the
branches is executed)?
Does another of the shells on these systems have the same bug?

You can also send the config.status file to me, off-list, if you
prefer.

Thanks,
Ralf




reply via email to

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