scsh-users
[Top] [All Lists]

Install lib and development

To: scsh <scsh-users@scsh.net>
Subject: Install lib and development
From: Anthony Carrico <acarrico@memebeam.org>
Date: Fri, 22 Dec 2006 14:07:22 -0500
List-id: <scsh-users.list-id.scsh.net>
I'm trying to write a "load.scm" to put in my development directory
that will act like the "load.scm" that would eventually be generated
for an install directory. This way I can have programs use the dev
version of a library without installation by changing the
SCSH_LIB_DIRS.

So... installed config.scm normally looks like:
  (config)
  (load "/usr/local/lib/scsh-0.6/modules/0.6/mod-name/scheme/packages.scm")

The trick is to figure out how to teach the development config.scm
where it is. For example:

  (user)
  (run
   (let* ((config-name "mod-name/load.scm")
          (dir-name (file-name-directory
                    (find-library-file config-name (lib-dirs) #f))))
    ...))

That will put the needed path in "dir-name", but then how can I pass
the pathname over to the config environment to do the load? On #scsh,
Taylor Cambell said, "You can open the relevant structures in the exec
package itself. To get around warnings, you'll also have to do (EXEC
'(RUN ...)) after (EXEC '(OPEN ...))."

Is that the only way? If this issue was solved, perhaps "officially"
(to avoid my redundant search), then it seems like the install library
itself wouldn't have to hard code paths.

Note that my partial solution is slightly broken. I use #f for the
script's pathname, which works if you don't use the corresponding
special feature of find-library-file.

-- 
Anthony Carrico
http://giftfile.org

<Prev in Thread] Current Thread [Next in Thread>