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

Re: gEDA-user: gnetlist in a Makefile



That won't work.  Peter's problem is a toughie.

The problem is that gnetlist doesn't return an error code to the shell
based upon its success in netlisting.  Therefore, your suggestion
won't work.

My thought is to do something like this:

$(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 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
>