[RFA:] sim/common/aclocal.m4: correct duplicate arg test for --enable-sim-hardware=...

Daniel Jacobowitz drow@false.org
Tue Mar 28 22:40:00 GMT 2006


On Sat, Mar 25, 2006 at 05:22:58PM +0100, Hans-Peter Nilsson wrote:
> -    case " $f " in
> -      x) ;;
> -      *" $i "*) ;;
> +    case " $sim_hw,$i " in
> +      *",x "* | *" $i,"*) ;;
>        *) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;

I don't think that's right.  Don't you want:

  for i in $hardware ; do
    case " $sim_hw " in
      *" $i "*) ;;
      *) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;
    esac
  done

The "in x $hardware" bit is not necessary (that's only necessary from
Makefiles), and the commas don't work like you'd think, since sim_hw is
space separated.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list