Building subprojects (Re: envy for "Writing Go Packages")

Graham Fawcett fawcett at uwindsor.ca
Thu May 13 07:56:11 PDT 2010


Hi BCS,

On Thu, 13 May 2010 01:53:34 +0000, BCS wrote:
> Hello Graham,
> 
>> If so, what's the minimum harnessing we can impose upon a subproject
>> writer, to make their library compilable by an automated tool?
> 
> For many cases, there is a zero config solution that will work much of
> the time: Compile all files and pack them into a .lib/.a

Right. Last night I reviewed a set of dsource.org projects, and I see
how a zero-config solution would work for many of them. 

> Until that doesn't work, the writer shouldn't have to do anything
> but supply a name for the lib and a list of files.

It won't take long before more options are needed (I would still vote to 
have recommended linker flags be declarable, to support wrappers to C 
libraries), but this is a good start. 

Any preferences re: how to declare the list of files? (Would you want 
glob patterns, exclusions, etc.?)

I'm tempted to support a truly zero-config version that 

(a) derives the library name from the parent directory name of the
    source (skipping intermediary directories like 'branches/foo/',
    'trunk', etc.);

(b) derives the list of files by including all *.d files, except those
    in directories named 'test' and except those which contain a
    main() function.

Graham


More information about the Digitalmars-d mailing list