A question about modules - suggestion for convention

Myron Alexander someone at somewhere.com
Wed Jun 13 04:18:59 PDT 2007


Julio César Carrascal Urquijo wrote:
> Myron Alexander wrote:
> I am copying my library source tree into the project, not a
>> great solution.
> 
> If you are using Subversion for both projects you can setup one folder 
> to automatically import the other project (Even on different 
> repositories) using an external property. That is what I usually do.

I didn't know you could do this.

Although this will work for my project, it does not solve the library 
distribution problem. We end up having the same problem that the C 
repositories have. I'm hoping to solve that problem once and for all.

Perhaps for now, we could come up with a convention such as this:

All external libraries exist under an ext directory. The ext directory 
has the following structure:

ext/<libname>/di/<toplevel>/...
ext/<libname>/<libname>.lib

Then with the rebuild/bud/dmd tool or whatever, you could just have an 
option such as -import=<libname> and it would add the .di to the include 
path, and the .lib to the link path. This is a workable solution until 
we get binary modules.

If that works, we could go to the next level where we zip up the 
library. Same directory structure, just zipped up and call it .dlz for D 
library zipped. Then the rebuild/bud or library tool could unzip the 
contents into a temp/cache directory and add those directories/.libs to 
the paths. It does not have to be built into bud/rebuild, it could be a 
separate library tool that creates a few environment variables to add to 
the bud/rebuild/dmd command line.

What do you think?

Regards,

Myron.



More information about the Digitalmars-d mailing list