discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting subprojects to link with main projects


From: Nicola Pero
Subject: Re: Getting subprojects to link with main projects
Date: Tue, 7 Aug 2001 12:26:28 +0100 (BST)

> Hi all,
> 
> What is the correct settings/flags in the makefile system to include
> subprojects in the main project?


Ok - this seems a FAQ (btw, if you look in the mailing list archives I
sent an email about this some weeks ago) - probably we need some
documentation about this somewhere.

Anyway - there are really two different things - 

* aggregate projects 

* subprojects

Unfortunately, for historical reasons, aggregate projects use the makefile
variable SUBPROJECTS - which seems to be quite confusing ... ! (also
because subprojects use xxx_SUBPROJECTS)

I wish I could change that variable name without breaking nearly every
GNUmakefile out there!  But we probably need to do something as you seem
to confirm my fears that the variable names are seriously confusing
people.  Perhaps we might introduce an alias AGGREGATE_PROJECTS - and
while still supporting SUBPROJECTS, encourage people to use the better
named AGGREGATE_PROJECTS in new GNUmakefiles.

Anyway, the net result is that SUBPROJECTS is currently used for aggregate
projects, while xxx_SUBPROJECTS is used for subprojects.


> aggregate.make directive.
> The SUBPROJECTS entry contains an entry for each of the subprojects.

> The subprojects do compile but their compiled code does not seem to be
> included in the main library after the build.

Ok - if you expect the compiled code to be linked into your library, then
what you want is really `subprojects', not `aggregate projects' - so you
need to use

myLibrary_SUBPROJECTS = xxx yyy zzz

rather than 

SUBPROJECTS = xxx yyy zzz

(if you think about it, it makes sense, because you want the object files
from the subprojects to be linked into the library, so you need to tell
the GNUmakefile which library the subprojects belong to)

do not include aggregate.make - no need for it - xxx_SUBPROJECTS should
work automatically with any project type.  Only include aggregate.make
when you want to have aggregate projects.

Let me know if you have any problems.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]