[phobos] Makefile

Walter Bright walter at digitalmars.com
Thu Feb 18 11:32:31 PST 2010

Andrei Alexandrescu wrote:
> I'm rewriting the Linux makefile. The existing one works well and is 
> small, but Walter complained about it being impenetrable and I agree. 
> It uses weird string expansions and stuff.
> Back when I wrote it that was the only method I could find to avoid 
> repeating a lot of stuff for all OSs, builds, unittests, etc. 
> Recently, inspired by Walter, I decided to go with a different 
> approach that relies on recursive make invocations. That simplifies 
> matters drastically: no more string expansions, no more '$$', no more 
> crap.
> By this I'm asking you what you'd like to see in the makefile. What 
> are the builds that you need and use, and what builds you'd like to 
> use that aren't there?

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

More information about the phobos mailing list