[phobos] Makefile

Sean Kelly sean at invisibleduck.org
Fri Mar 26 13:15:40 PDT 2010


The safest way to build druntime and phobos is to override dmd.conf with one specific to the project.  Import paths in dmd.conf take precedence over those specified on the command-line, so if you have existing older core or std files in dmd.conf-specified locations then they'll be read by the compiler instead of the ones you're working on and Weird Things can happen.  What I've been doing recently is just wiping my import directories before building.

On Mar 23, 2010, at 9:01 PM, Andrei Alexandrescu wrote:

> The posix.mak file in the root of druntime outputs the file to lib/:
> 
> DRUNTIME=lib/libdruntime.a
> 
> No?
> 
> Regarding object.d, hmmm... probably we'd want to be as independent of dmd.conf as possible. I made the change you suggest and checked in.
> 
> 
> Andrei
> 
> On 03/23/2010 04:55 AM, Lars Tandle Kyllingstad wrote:
>> I am experiencing some problems with the new makefile.
>> 
>> 
>> Firstly, the location of libdruntime.a is specified as
>> 
>> DRUNTIME = $(DRUNTIME_PATH)/lib/libdruntime.a
>> 
>> while I believe it should be
>> 
>> DRUNTIME = $(DRUNTIME_PATH)/libdruntime.a
>> 
>> Secondly, when I just enter 'make', DMD complains that it can't find
>> object.d. I have to run
>> 
>> make -f GNUmakefile OS=posix BUILD=debug DFLAGS=-I../druntime/import
>> 
>> to make it work. It seems DMD isn't receiving the druntime imports
>> directory by default.
>> 
>> 
>> -Lars
>> 
>> 
>> Andrei Alexandrescu wrote:
>>> I finally found time to rewrite the makefile. It's now short, sweet
>>> and easy to look at and modify.
>>> 
>>> The key is to use recursive invocations of make, each focused on one
>>> build (a given OS and a given flavor). That way dependencies are easy
>>> to set up without duplication. It took me a while to figure out how to
>>> do that stuff... the result is quite simple.
>>> 
>>> I actually copied Walter's description below as the documentation. The
>>> only differences are that I changed "doc" to "html" because some day
>>> we might have other doc formats, and also that I do not remove the
>>> successful unittests. This is because I don't want two successive
>>> invocations of make unittest to redo all successful unittests before
>>> it stops at the failing one.
>>> 
>>> I've only tested the Linux build, but I'm confident that the others
>>> need only minor adjustments, and most importantly that it's not
>>> difficult to figure how to make those adjustments. Let me know!
>>> 
>>> 
>>> Andrei
>>> 
>>> On 02/18/2010 01:32 PM, Walter Bright wrote:
>>>> make clean => removes all targets built by the makefile
>>>> make zip => creates a zip file of all the sources (not targets) referred
>>>> to by the makefile, including the makefile
>>>> make release => makes release build of the library (this is also the
>>>> default target)
>>>> make doc => makes html documentation
>>>> make debug => makes debug build of the library
>>>> make unittest => builds all unittests, runs them, deletes all built
>>>> unittest files upon successful completion
>>>> make install => copies library to /usr/lib
>>> 
>>> 
>>> ------------------------------------------------------------------------
>>> 
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos



More information about the phobos mailing list