std.parallelism is accepted into Phobos

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Apr 26 11:31:34 PDT 2011


On 4/26/11 1:06 PM, Robert Clipsham wrote:
> On 26/04/2011 18:55, Andrei Alexandrescu wrote:
>> That's pretty much it. There's also the documentation build, the debug
>> vs. release build. and portability-related stuff.
>>
>> I doubt it could be done in <10 lines of shell scripting because just
>> enumerating the modules would fill those. But if you feel strongly about
>> this definitely do it - if you come with something better we'd be glad
>> to replace things.
>
> Why enumerate them? * will do, if there are files you don't want
> including they shouldn't be in the directory. All the platform specific
> stuff is separated in its own folders too, so that's not an issue.

It's better to have control on the actual names on the files, otherwise 
what is built depends on what the builder has in that directory. 
Nevertheless, there's other stuff that takes 10 lines. Consider:

# Set CFLAGS
ifeq ($(CC),cc)
	CFLAGS += -m$(MODEL)
	ifeq ($(BUILD),debug)
		CFLAGS += -g
	else
		CFLAGS += -O3
	endif
endif

That's 10 lines. You may be able to reduce this but not dramatically. 
Overall I think you're mis-estimating what it would take to do the build 
in a shell script; in all likelihood the size of the script would be 
comparable to that of the makefile. I think you'd gain a much better 
appreciation of what's going on if you set out to write those 10 lines.

>>> If it does more than that then I'd be happy to look into writing the
>>> equivalent with redo (maybe even look at porting it to D so the build
>>> script can be written in idiomatic D). Of course if I did port it it'd
>>> have to be LGPL, writing from scratch could be any license. The minimal
>>> version that rebuilds everything each time is public domain.
>>
>> Probably the basic redo script would give us a good idea of how things
>> would be.
>
> A redo script could be the way to go if phobos was being built
> incrementally, but it seems like overkill given that most of the build
> is one command.

Documentation is built incrementally and unittests are executed 
incrementally (successful ones are not re-run). Also, the C zip library 
is built incrementally.


Andrei


More information about the Digitalmars-d mailing list