Re: [RFA/commit] Work around Solaris bourne shell limitation when building the sim

Mike Frysinger
2011-12-18T18:45:11Z

[-- Attachment #1: Type: Text/Plain, Size: 1037 bytes --]

On Sunday 18 December 2011 12:57:19 Joel Brobecker wrote:
> > > hw-config.h: Makefile.in $(srccom)/Make-common.in config.status
> > > Makefile
> > >
> > > rm -f tmp-hw.h
> > > echo "/* generated by Makefile */" > tmp-hw.h
> > >
> > > - for hw in $(SIM_HW) ; do \
> > >
> > sim_hw="$(SIM_HW)"; \
> >
> > for hw in $$sim_hw ; do \
>
> I had already tried that:
>
> Makefile:473: *** commands commence before first target. Stop.

that seems weird ... i just tried it locally and it seems to work for me ...

--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -462,7 +462,8 @@
hw-config.h: Makefile.in $(srccom)/Make-common.in config.status Makefile
rm -f tmp-hw.h
echo "/* generated by Makefile */" > tmp-hw.h
- for hw in $(SIM_HW) ; do \
+ sim_hw="$(SIM_HW)"; \
+ for hw in $$sim_hw ; do \
echo "extern const struct hw_descriptor dv_$${hw}_descriptor[];" ; \
done >> tmp-hw.h
echo "const struct hw_descriptor *hw_descriptors[] = {" >> tmp-hw.h
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]