| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to geda-help-bounces using -f |
| X-Recipient: | geda-help AT delorie DOT com |
| X-Mailer: | exmh version 2.7.2 01/07/2005 (debian 1:2.7.2-18) with nmh-1.3 |
| X-Exmh-Isig-CompType: | repl |
| X-Exmh-Isig-Folder: | inbox |
| To: | geda-help AT delorie DOT com |
| Subject: | Re: [geda-help] Dirt Dumb Level.. |
| In-reply-to: | <1355205873.14812.39.camel@hoho6.chidig.com> |
| References: | <1355205873 DOT 14812 DOT 39 DOT camel AT hoho6 DOT chidig DOT com> |
| Comments: | In-reply-to Bob Gustafson <bobgus AT rcn DOT com> |
| message dated "Tue, 11 Dec 2012 00:04:33 -0600." | |
| Mime-Version: | 1.0 |
| Message-Id: | <20121211084739.C023482204B9@turkos.aspodata.se> |
| Date: | Tue, 11 Dec 2012 09:47:39 +0100 (CET) |
| From: | karl AT aspodata DOT se (Karl Hammar) |
| X-Virus-Scanned: | ClamAV using ClamSMTP |
| Reply-To: | geda-help AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | geda-help AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
Bob G:
> I am just starting with gEDA...
Well, welcome then.
...
> Then I decided to get fancy and wrote gafrc file like this:
The gafrc should comply with guile (lisp) syntax.
> HOME="/home/user1/TapeDrive/"
Everything has to start with a ( and end with a ).
So the above should be written like
(define HOME "...")
For things like the above, you can test it by running guile:
$ guile
guile> (define HOME "...\n")
guile> (display HOME)
...
guile> (quit)
$
> (define gedasymbols "${HOME}/gschem-sym")
As you can see, guile doesn't evaluate ${HOME} for you:
guile> (define gedasymbols "${HOME}")
guile> (display gedasymbols)
${HOME}guile>
Note:
since gedasymbols doesn't contain "\n", the output and
the prompt (guile>) will be on the same line
try (getenv "HOME") and instead:
guile> (define gedasymbols (getenv "HOME"))
guile> (display gedasymbols)
/home/karlguile>
to combine the (getenv ...) and the "geshem-sym", you can use
build-path, but that is not in guile so you cannot test it seperately
try (in you gafrc file):
(define gedasymbols (build-path (getenv "HOME") "gschem-sym"))
> (component-library "${HOME}/gschem-sym")
dito.
> and it didn't work.
...
> I looked around for an example gafrc file, but nothing with the
> definition of HOME. Is it bash syntax, or guile syntax?
...
guile
This is my gafrc:
(define home (getenv "HOME"))
(load-scheme-dir (build-path home ".gEDA/gafrc.d"))
(component-library-search "/Net/cvs/cvs.gedasymbols.org/www/user" "cvs")
(source-library "${HOME}/git/openhw/share/gschem/include")
(component-library-search (build-path home "git/openhw/share/gschem") "lcl")
(component-library "include")
(component-library ".")
;(always-promote-attributes '("refdes"))
(source-library "include")
(source-library ".")
Note that source-library do expand the environment variable, it does
that internally. We could possible add that functionality to
load-scheme-dir and others.
Regards,
/Karl Hammar
-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |