Who here actually uses D?
nedbrek
nedbrek at yahoo.com
Sun Feb 13 17:36:04 PST 2011
Hello,
"gölgeliyele" <usuldan at gmail.com> wrote in message
news:9F28E8ED-939D-4EDB-AB1F-0A4F9B72DA44%usuldan at gmail.com...
>>
>> I use an incremental build with Makefiles.
>>
> Can you tell me how you used incremental build with Makefiles? I
> don't know much about D1, but it most likely has similar module and
> build support as D2. I have been playing around with incremental build
> with dmd today (I couldn't find good info on the web). My solution was
> to use a makefile as well, but it required some advanced techniques,
> such as:
>
> - dmd compiler's -deps option to find out what are the dependencies of
> a module, which required simple post processing
Yes, you have to build a dependency list for each .d file. I use an Awk
script, but I should probably use dmd -deps...
> - GNU make's auto-dependency generation capabilities (mostly the
> ability to generate dependency stuff during make and at the same time
> include them into the makefile)
Yes, I am also using some tricks I found on the web to support building
outside of the source tree.
I currently have all the dependendcies in one file, and regenerate manually.
I have gotten auto-dependency generation to work with C++ (it is just a
matter of breaking the dependencies into separate files).
> I have too worries about this:
> 1) Requires experience with make and DMD, not easily gained through
> reading documentation
> 2) GNU make is not easily available on all platforms
I use Cygwin on Windows. Make is somewhat hard to learn at first. Once you
have some tricks, you can apply them to all projects.
> If you have a solution that is more straightforward please let me
> know.
>
> Also: How much time it takes for you to do a wholesale compilation
> versus incremental (say after changing a single file)?
I find file I/O to be very slow on Windows. Cygwin seems to compound this
problem. Build time on my project isn't real bad, maybe a few seconds for
one or two files. A full rebuild might take a minute (I seem to have broken
my build, so I can't test it right now :)
Ned
More information about the Digitalmars-d
mailing list