Re: install file with more details or help installing CL.environment, clx, ...

Marco Antoniotti <[email protected]> Mon, 29 Mar 2004 09:57:12 -0500
Newsgroups gmane.lisp.clocc.general
Message-ID <[email protected]>
On Sunday, Mar 28, 2004, at 14:55 America/New_York, Joe Corneli wrote:

>> From ~/lisp-systems/clocc/src/port/environment/
>
>   Load the file named 'load-cl-environment.lisp'.
>
>         (load "load-cl-environment.lisp")
>
>   Be careful about the directory you are in and/or the actual location
>   of the aforementioned file.  The package is actually loaded from the
>   directory of *LOAD-TRUENAME* as bound by the call to LOAD.
>
> How can I set this `*LOAD-TRUENAME*' or work around this complexity?
> Is there some kind of `save-excursion' I can use to load from the
> correct directory in my .clisprc (regardless of what directory I
> start CLISP in)?

Just do

	(load "/PATH/to/clocc/whatever/load-cl-environment.lisp")

and you are home free.

*LOAD-TRUENAME* (and *LOAD-PATHNAME*) is set dynamically by the LOAD 
function.  In the case above, most likely
*LOAD-TRUENAME* will be bound to

	#S(PATHNAME :HOST NIL
                                        :DEVICE NIL
                                        :DIRECTORY (:ABSOLUTE "PATH" 
"to" "clocc" "whatever")
                                        :NAME "load-cl-environment"
                                        :TYPE "lisp"
                                        :VERSION :NEWEST)

while LOAD is being executed.



>
> I think it would be *very* helpful if the INSTALL file that ships
> with CLOCC would contain full instructions on compiling and loading
> files.  It saves you a little space to include say "..." here and
> there, but for someone who is relatively new to common lisp, it
> would be more helpful to list all the details.
>
> For example, where you say
>
> ;; * compile some systems
> (dolist (l '("clocc:src;port;" "clocc:src;cllib;" 
> "clocc:src;ext;queues;"
>              "clocc:src;port;configuration;" 
> "clocc:src;port;environment;"
>              "clocc:src;ext;union-find;" "clocc:src;tools;metering;"
>              "clocc:src;f2cl;" "clocc:src;f2cl;packages;"))
>   (mk:add-registry-location (translate-logical-pathname l)))
> (mk:oos "cllib" :compile)
> (mk:oos "f2cl" :compile)
> ...

> I can't figure out how to generalize from the examples to the "..."
> to actually be able to load the things I want to load.


The key is the MK:OOS function (which stands for MK:OPERATE-ON-SYSTEM).
Essentially, every directory in the CLOCC should contain a dir.system 
file.
Calling

	(mk:oos "dir" :compile)

should just compile the systems (think of a "system" as a collection of 
files and directories, and think of MK:DEFSYSTEM in the CLOCC as a 
"make")

Cheers

--
Marco Antoniotti					http://bioinformatics.nyu.edu
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click