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

Re: gEDA: accessing gnetlistrc variables



Hi Dan,

>Is it possible to access gnetlistrc variables inside of a particular
>gnetlist backend?  I'm wanting to have a way to override a default
>setting

	Ah yes, the infamous *m4-pcbdir* variable.  To help with this 
annoyance, I have checked some code into CVS which provides a mechanism
to set variables after the backend scheme code has been loaded/evaluated:

1) Create pcbpath.scm in your current directory (or where ever) which
   contains:

   (define *m4-pcbdir* "/new/path/to/pcb/m4")

2) Modify gschem2pcb or run gnetlist like this:

   gnetlist -g PCBboard -m pcbpath.scm file1.sch file2.sch ...

The -m flag is the new feature which allows the loading of scheme files
after the backend scheme code has been loaded/evaluated but before the
guile procedure is executed.  This flag is similar to -l but that loads
scheme files before the backend scheme code is loaded.

   You will need to update to the version in CVS.  I might update gschem2pcb
to take a filename as well, so that end users will not have to muck with 
that script.  Not sure if this is the final solution, but it works great
for users who execute gnetlist directly.

								-Ales