[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gnetlist in a Makefile



On Wed, 2 Feb 2005 17:13:54 -0500 (EST)
sdb@xxxxxxxxxx (Stuart Brorson) wrote:

> [snip]
> 
> $(objects).cir: $(objects).sch $(objects).spc
>         gnetlist -g drc2 $(objects).sch -o $(objects).drc
> 	if [-z [grep ERROR $(objects).drc]]; then  \
>           gnetlist -g spice-sdb $(objects).sch  -o $(objects).cir \
> 	else \
> 	  echo "Failed DRC test!" \
> 	fi
> 

I think if you replace the if statement with:

if grep ERROR $(objects).drc >/dev/null 2>&1 ; then \
    echo "Failed DRC test!" \
else \
    gnetlist -g spice-sdb $(objects).sch  -o $(objects).cir \
fi

Then that should work. I haven't tested this at all, either, but I don't
think my bash skills are all that terrible. Hope that helps.

 -zeroguy

> I haven't tested this and my bash skills are terrible, but if you play
> around with this you might get somewhere. . . .
> 
> Stuart
> 
> 
> > 
> > how about:
> > 
> > $(objects).cir: $(objects).sch $(objects).spc
> >        gnetlist -g drc2 $(objects).sch -o $(objects).drc && \
> >        gnetlist -g spice-sdb $(objects).sch  -o $(objects).cir
> > 
> > Regards,
> > Mark
> > markrages@gmail
> > 
> > On Wed, 2 Feb 2005 22:58:08 +0100, Peter Kaiser <peter@xxxxxxxxxxxx>
wrote:
> > > 
> > > Hello to all Makefile Gurus,
> > > 
> > > I use make to create a netlist from my schematic. I just
introduced the
> > > fabulous drc2 to my flow. It looks like this:
> > > 
> > > > $(objects).cir: $(objects).sch $(objects).spc
> > > >        gnetlist -g drc2 $(objects).sch -o $(objects).drc \
> > > >        gnetlist -g spice-sdb $(objects).sch  -o $(objects).cir
> > > 
> > > I want make to stop when a ERROR in DRC appears.
> > > 
> > > Can anybody give me a hint, what's the best and easiest way to do
this.
> > > 
> > > Thank's
> > > Peter
> > > 
> > > 
> > 
> > 
> > -- 
> > "We act as though comfort and luxury were the chief requirements of
> > life, when all that we need to make us happy is something to be
> > enthusiastic about."
> > 
> > - Einstein
> > 
>