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

Re: gEDA-user: gnetlist in a Makefile



On Thu, Feb 03, 2005 at 01:25:34PM -0500, Richard Prescott wrote:
> 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
 
 
ah, this is nicer.  Except -q is not a portable option to grep.

try
	grep -v ERROR $(objects).drc >/dev/null 2>&1

-Dan

--