[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[no subject]
- To: undisclosed-recipients: ;
- From: cnieves@xxxxxxxxxx
- Date: Sat, 5 Feb 2005 05:44:35 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: geda-user-outgoing@seul.org
- Delivered-to: geda-user@seul.org
- Delivery-date: Sat, 05 Feb 2005 05:45:10 -0500
- Reply-to: geda-user@xxxxxxxx
- Sender: owner-geda-user@xxxxxxxx
From cnieves@xxxxxxxxxx Sat Feb 5 00:53:29 2005
Subject: Re: gEDA-user: gnetlist in a Makefile
From: Carlos Nieves =?ISO-8859-1?Q?=D3nega?= <cnieves@xxxxxxxxxx>
To: geda-user <geda-user@xxxxxxxx>
In-Reply-To: <20050204233011.GD5545@xxxxxxxxxxxxxxxxxxxx>
References: <74ee72ca05020214051e2f173@xxxxxxxxxxxxxx>
<20050202174734.517a9e84@sabin> <1107455134.32592.233.camel@richard>
<200502041759.49385.peter@xxxxxxxxxxxx> <1107552149.1300.12.camel@otilio>
<20050204233011.GD5545@xxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1
X-Evolution-Format: text/plain
X-Evolution-Account: cnieves@xxxxxxxxxx
X-Evolution-Transport: smtp://cnieves@xxxxxxxxxxxxxxx
X-Evolution-Fcc: email://local@local/Sent
X-Mailer: Evolution 2.0.3
Date: Sat, 05 Feb 2005 00:53:29 +0100
Message-Id: <1107561209.1286.42.camel@otilio>
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
if-filter0: Y
El vie, 04-02-2005 a las 18:30 -0500, Dan McMahill escribió:
> On Fri, Feb 04, 2005 at 10:22:29PM +0100, Carlos Nieves ?nega wrote:
> > Hi Peter,
> > I think it'd be nice to have the backend returning some value depending
> > on the number of errors and warnings, so it would be easy to do that
> > kind of tests in Makefiles.
> >
> > So maybe return a different value for each possible situation:
> > - No errors.
> > - Only warnings.
> > - Errors.
>
> agreed. Using (error "errorstring") in the scheme code you can
> make gnetlist error out with a non-zero error code, but I'm not sure
> how to signal to gnetlist that there are warnings and it should return
> that.
I haven't tried but gnetlist execute the backend using gh_eval_str.
Maybe the return value of this function has something to do with the
return value of the backend...
> What do you think of having a command line option which prevents warnings
> from giving an error code?
>
> > Using your makefile, you will only run the spice backend if there are no
> > errors. The drc2 backend can also raise warnings, and a lazy user will
> > not check those if the spice backend was run and no message about
> > warnings was printed, so I would print a message warning the user if
> > there are warnings.
>
> print the warnings from gnetlist directly or detect them in the makefile?
The drc2 backend always print warnings and errors, depending on how it
is configured, so gnetlist has nothing to do with them. I was talking
about the Makefile.
When including gnetlist -g drc2 into a makefile, the proposal was:
- Run gnetlist -g drc2 schematic.sch -o schematic.drc
- If schematic.drc contains the word "ERROR", then don't execute the
spice backend.
- else
- Execute the spice backend.
This way, warnings are not taken into account in the Makefile, and more
messages are printed in the screen when running the spice backend, so
the user may haven't noticed that there are DRC warnings. So my proposal
is:
- Run gnetlist -g drc2 schematic.sch -o schematic.drc
- If schematic.drc contains the word "ERROR", then don't execute the
spice backend
- else {
- Execute the spice backend.
- If schematic.drc contains the word "WARNING", then print a message
warning the user that there are warnings.
- }
This way, the user only has to check the last lines of the screen to see
if there are warnings or errors.
If gnetlist can return the value returned by the backend, then there's
no need to use grep in the Makefile to search for "ERROR" or "WARNING".
Regards,
Carlos
--
Carlos Nieves Ónega <cnieves@xxxxxxxxxx>
---Publicidad--------------------------------------------------------
Haz tu apuesta Online y gana 20 Euros ¡ Apuesta ya con UNIBET !
http://tracker.tradedoubler.com/click?p=21232&a=1037797