I like to partition up my projects into several libraries, so that
certain functionality can be easily reused.
When I build on top of those libraries, I can use 'load' (I do not use
require and provide since they are declared obsolete). However, what
is the best place to add the load ?
- In the application itself, at the beginning of the file ? This seems
to work for just executing an application. When compiling, however, it
seems I can get different problems :
- compiling the file in itself fails because of unresolved
dependencies.
- loading the libraries before the compilation solves this problem,
but this is a duplication.
- not including a load in the application requires the user to check
the file itself for dependencies.
The thing is that I am used to Perl's use and Python's import
statements, but these languages are not compiled. When I use Common
Lisp only as an interpreter, load works fine. It is just that when I
want to compile files, things go awry.
I know about asdf, but I am working cross-platform, and asdf's use of
symbolic links gives problems on Windows (CLISP under Windows/Linux,
and SBCL under Linux).
So, what gives ? When one does not use asdf or another build system,
what is the best recourse to take ?
Regards,
Jurgen
|
|
0
|
|
|
|
Reply
|
jurgen.defurne1 (118)
|
8/31/2007 8:39:58 AM |
|
In article <1188549598.717160.128010@i13g2000prf.googlegroups.com>,
jurgen_defurne <jurgen.defurne@pandora.be> wrote:
> I like to partition up my projects into several libraries, so that
> certain functionality can be easily reused.
>
> When I build on top of those libraries, I can use 'load' (I do not use
> require and provide since they are declared obsolete). However, what
> is the best place to add the load ?
REQUIRE and PROVIDE are useful as simple user-level functions
on top of a DEFSYSTEM.
>
> - In the application itself, at the beginning of the file ? This seems
> to work for just executing an application. When compiling, however, it
> seems I can get different problems :
> - compiling the file in itself fails because of unresolved
> dependencies.
> - loading the libraries before the compilation solves this problem,
> but this is a duplication.
> - not including a load in the application requires the user to check
> the file itself for dependencies.
>
> The thing is that I am used to Perl's use and Python's import
> statements, but these languages are not compiled. When I use Common
> Lisp only as an interpreter, load works fine. It is just that when I
> want to compile files, things go awry.
>
> I know about asdf, but I am working cross-platform, and asdf's use of
> symbolic links gives problems on Windows (CLISP under Windows/Linux,
> and SBCL under Linux).
>
> So, what gives ? When one does not use asdf or another build system,
> what is the best recourse to take ?
Before you write your own, you can use an existing DEFSYSTEM.
I use a derivative of Mark Kantrowitz' DEFSYSTEM.
See for example:
http://www.cliki.net/mk-defsystem
>
> Regards,
>
> Jurgen
--
http://lispm.dyndns.org
|
|
0
|
|
|
|
Reply
|
joswig8642 (2198)
|
8/31/2007 8:51:27 AM
|
|
jurgen_defurne wrote:
> I know about asdf, but I am working cross-platform, and asdf's use of
> symbolic links gives problems on Windows (CLISP under Windows/Linux,
> and SBCL under Linux).
You may want to have a look at *system-definition-search-functions* in
asdf.lisp. This is a list of functions to be called in order when
looking for an asd file (the default sysdef-central-registry-search is
what implements the unix-friendly "look in the *central-registry* chase
symlinks"), and can be extended/replaced with something that searches
for definition files in whatever places you're likely to keep them.
-dan
|
|
0
|
|
|
|
Reply
|
dan4698 (39)
|
9/2/2007 12:25:43 AM
|
|
|
2 Replies
35 Views
(page loaded in 0.072 seconds)
Similiar Articles: Runge-Kutta method for solving IVPs - comp.lang.fortranWhat is the best FORTRAN library for solving initial value problems (low number ... to include not only the driver file D02BJF but also D02AGF and other dependencies. Getting rid of libstdc++? - comp.unix.programmer-G fooN foo1.o -o foo.o What is the objcopy step suppose to do? I just did a quick ... This is only expected when the object C++ > dependencies are extremely trivial, such ... trouble with Windows gfortran - comp.lang.fortranWhat is the problem? Thanks for your help. H:\fortran>gfortran -v Using built ... mingw --enable-languages=c,for tran --with-gmp=/home/brad/gfortran/dependencies ... Communication between server/client (sockets)! - comp.unix ...anyway, what is the best way to communicate? I've seen the http protocoll using ... Also going ascii helps remove machine dependencies. # My server needs input ... python ... Generate a CRUD matrix - comp.databases.oracle.serverYou can use user_dependencies to find the names of the objects. > Whether this is ... You create a package specification and define all the variables there. As ... FREE Animations you can e-mail - comp.sys.mac.appsFREE Animations you can e-mail - comp.sys.mac.apps [PSP8] What is the opposite of ... Hello, I want to get in a batch program the dependencies from an ... FREE Animations ... Clearing classloader cache - comp.lang.java.helpIf the applet dependencies are kept to a minimum, then you barely need to use a ... cache - comp.lang.java.help what is this file? vmcore.0 - comp ... what is this ... Errors when integrating MatLab code into C# program - comp.soft ...... 0.0.0, Culture=neutral, PublicKeyToken=e1d84a0da19db86f' or one of its dependencies. ... BASIC code into MATLAB, so ... into MATLAB? > > For example: > /* C */ > #define ... loadlibrary netapi32 32bit versus 64bit - comp.os.ms-windows ...You can use Dependency Walker to a) check whether any dependencies are missing and b ... and they will learn to differentiate what is important to back up and what is ... Worker Threads and EDT - comp.lang.java.guiThe business objects are manipulated via worker threads, and their dependencies cause ... I kinda get where you're going, but a priori, I don't really know what is causing ... Dependencies | Define Dependencies at Dictionary.comnoun, plural de·pend·en·cies. 1. the state of being dependent ; dependence . 2. something dependent or subordinate; appurtenance. 3. an outbuilding or annex. 4. a ... Defining Dependencies for Task Groups and Tasks in Plug-in FilesWhen you add a task group or a task to a plug-in file, you must add them in the correct sequence and declare any dependencies that the group or task has on the ... 7/24/2012 12:11:10 PM
|