DS3

Bill Baxter dnewsgroup at billbaxter.com
Mon Aug 27 11:05:54 PDT 2007


David B. Held wrote:
> Gregor Richards wrote:
>> [...]
>> First, make a dsss.conf that looks something like this:
>> name = <somename>
>> [lib.d]
>> type = library
>>
>> Then, run unit tests like this:
>> dsss build --test
> 
> Ok, this gets me further...great!  Now, I like to develop in Eclipse 
> (and the latest Descent version makes this a very compelling option), 
> which likes to organize stuff into a src/ and bin/ dir that are sisters, 
> like so:
> 
> project/
>   dsss.conf
>   src/
>     lib.d
>     main.d
>   bin/
>     lib.obj
>     main.obj
>     main.exe
> 
> I tried 'dsss build --bindir=bin --test' using the unit test example, 
> but all the build artifacts ended up in my project/ dir anyway.  Any 
> suggestions on how to convince dsss to really use bin/?
> 
> Also, putting things in a directory doesn't work out so well.  With a 
> dsss.conf that looks like so:
> 
> name = test
> [src\lib.d]
> type = library
> 
> I get this:
> 
> ---------------------------------8<--------------------------------------
> Creating imports for src\lib
> 
> src\lib.d => src\lib
> + D:\dsss\bin\rebuild.exe -Idsss_imports\ -I. -S.\ -ID:\dsss\include\d 
> -SD:\dsss
> \lib\  -ID:\dsss\include\d -SD:\dsss\lib  -oqdsss_objs  -explicit -lib 
> -full src
> \lib.d -ofSsrc\lib.lib
> Digital Mars Librarian Version 8.02n
> Copyright (C) Digital Mars 2000-2007 All Rights Reserved
> http://www.digitalmars.com/ctg/lib.html
> 
> Error: unable to create 'Ssrc\lib.lib' : No such file or directory
> Command D:\dsss\bin\rebuild.exe returned with code -1, aborting.
> ---------------------------------8<--------------------------------------
> 
> Clearly, I'm not doing something right, but I'm also not sure what 
> "something" is, or "right".
> 
> Dave

DSSS doesn't really like working from .conf files in directories other 
than where the "meat" is.

So for your case, you need to have a dsss.conf in the src directory like:

name=test
[lib.d]
type = library

and if you want to build from the directory one above you can add a 
dsss.conf there like:

name=project
[src]
type = subdir

I think that will fix the basic getting-it-to-build issue.  But probably 
won't fix your --bindir issue.

--
I have a similar directory issue with package library projects.  Right 
now DSSS really wants you to organize your source like

topdir
- dsss.conf
+ mymodule
   + source1.d
   + source2.d

With a dsss conf like:

[mymodule]
type=library

But that makes it so that all other build tools have to work harder to 
get the locations of sources to build with.  They'll need a -Itopdir for 
each such library, whereas without dsss-ification they worked just fine 
all being in a common directory with one -Icommon.

--bb



More information about the Digitalmars-d mailing list