discuss-gnustep
[Top][All Lists]
Advanced

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

Re: How to control when SUBPROJECTS are compiled ?


From: Chris Vetter
Subject: Re: How to control when SUBPROJECTS are compiled ?
Date: Mon, 31 Jul 2006 00:57:46 +0200

On 2006-07-30 19:03:12 +0200 Quentin Mathé <address@hidden> wrote:
[...]
> If you don't move your project code in subprojects, this isn't going  to work 
> because Project X and Project Y aren't subprojects but just  different 
> targets for the project (which owns the subprojects)…  Hoping I have made no 
> mistakes in my understanding of Yves' proposal :-)

Yes, that's correct, however, if you put the main project (let's say the actual 
application) in a separate subdirectory, you will have a cleaner code base 
(from a file/directory point of view). And your main project can be a 
subproject (as specified in the top level GNUmakefile) as well as an 
application (from a logical point of view).

Let's say you have 3 libraries in directories foo/, bar/ and baz/ that your 
application depend upon. libbar depends on libbaz to be build first. So 
naturally, you would say
  SUBPROJECTS = foo baz bar
to make sure, libbaz is build before libbar. (libfoo in this case could be 
build as second or even as third).

Personally, I would now put the classes that belong to the application directly 
in a fourth subdirectory, say myapp/, and specify
  SUBPROJECTS = foo baz bar myapp
to have the application build last.

That way, all I have in the top-level is a GNUmakefile (and maybe 
GNUmakefile.[local|preamble|postamble]) and 4 subdirectories containing the 
actual source. I just have to make sure that I specify the correct order in 
which the source has to be build.

-- 
Chris





reply via email to

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