[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: gnetlist in a Makefile
Ok, there is missing semi-columns in your statement, "make" will put all
lines ended with "\" together in a single line
if cmd1; then cmd2; else cmd3; fi
Although, personally, I prefer to not use bash to do ifs in Makefiles.
so:
$(objects).drc : $(objects).sch
gnetlist -g drc2 $(objects).sch -o $(objects).drc
$(objects).cir : $(objects).sch $(objects).drc
grep -qv ERROR $(objects).drc
gnetlist -g spice-sdb $(objects).sch -o $(objects).cir
On Wed, 2005-02-02 at 17:47, zeroguy wrote:
> 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
> > >
> >
--
Richard Prescott
LTRIM Technologies Inc.
450-681-3171 ext. 230