Errors compiling DSSS

Jacob Carlborg doob at me.com
Wed Nov 28 12:06:39 PST 2012


On 2012-11-28 20:39, Andrei Alexandrescu wrote:

> I recall you have written such a tool (Orbit), so it is natural to have
> a vested interest in promoting it and argue for its usefulness. Such
> arguments don't eliminate the need for simpler tools that obviate
> Orbit's use for a subset of cases.

1. Orbit is a package manager, not a build tool (although I'm developing 
that as well). A package manager deals with a packages, a build tool 
deals with files

2. I would not create a tool that cannot be used in the most simple uses 
cases. I'm thinking of scale. From the most simple use cases to the more 
advance use cases.

The build tool I'm developing will work like this. In it's most simple 
usage it can be used as:

$ build main.d

Which will do basically what RDMD does, but without running the 
executable. You can also pass arbitrary compile and link flags:

$ build main.d -release -L-lcurl

So far still just basically what RDMD does. The interesting thing is 
when you need to do more advanced build setups or avoiding repeating 
compile flags. Then you can start using a build script. The most simple 
build script will look something like this:

target :main

If there's a file named "main.d" it will build an executable, just like 
RDMD does. If there's a folder named "main" it will build a library of 
all files in that folder, recursively. Not something that RDMD can 
currently handle.

Adding some flags to the build script:

target :main do
   flags :build << "-release"
   flags :link << "-lcurl"
end

Then adding some special settings for a platform:

target :main do
   flags.build << "-release"
   flags.link << "-lcurl"

   if platform.windows
     flags.link << "some flag"
   end
end

Then adding a task for creating a release of the software:

task :release do
   # some code
end

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list