From: Hannah Schroeter
Subject: Re: How to load a batch of files in common-lisp
Date:
Message-ID: <al5qhu$go$2@c3po.schlund.de>
Hello!
[Crosspost + F'up c.l.lisp, as it isn't (Open)MCL specific]
Jacktian <···········@yahoo.co.uk> wrote:
>In common I use eg.
>(compile-file "/tmp/hello.lisp") and
>(load "/tmp/hello.fasl")
>to load a file into common-lisp enviroment.
>But when I have thousands of files, it seems difficult to load the
>files one by one. I wonder if there is any easier way to load them?
However, you surely have to have a list of files anyhow.
Use that to write or generate either a system definition file
or just a file containing a list of base names, like
file-list
("hello-package" "hello-foo" "hello-bar")
Then you can do something like
(let ((file-list (with-open-file (f "file-list") (read f))))
(mapcar (lambda (name) (compile-file name) (load name)) file-list))
You could call it a poor (wo)man's defsystem replacement *g*
Kind regards,
Hannah.