help-make
[Top][All Lists]
Advanced

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

Re: how well does multi-arch build handle recursive building?


From: Johan Bezem
Subject: Re: how well does multi-arch build handle recursive building?
Date: Fri, 12 May 2006 14:44:14 +0200
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

Robert P. J. Day wrote:
...
but how does the multi-arch approach work if one tries to extend it to
a recursive make structure?  you know -- the kind where part of the
top-level makefile defines a number of SUBDIRS and reinvokes make with
"make -C" for each of those SUBDIRS?

if you're trying to emulate the original recursive build, that would
seem to mean that, for each sub-directory you move into, you need to
redefine vpath to the corresponding sub-directory for the sources, no?

yes, in my personal system, this is true. My command line to initiate a recursive call of make looks like this (all one line):
  address@hidden(MAKE) --directory=$(YT_OBJBASE)/$@/$(YT_OBJDIR_SUFFIX)
  YT_SRCVPATH=$(YT_SRCVPATH)/$@ YT_OBJBASE=$(YT_OBJBASE)/$@
  YT_TARGETNAME=$@ -f $(YT_SRCVPATH)/$@/Makefile --no-print-directory
  $(MAKECMDGOALS)

$@ is the next directory, because I have defined the directories being targets; OBJBASE represents the root of the object's tree, OBJDIR_SUFFIX contains the version (multiple compilers, versions, debug/release, etc); SRCVPATH is used to set the VPATH/vpath in the next recursion.

Furthermore, I determine the directories to recurse through automatically, by looking for 'Makefile' in each subdirectory of the current one, and offer the possibility of creating libraries for each subdirectory, or "copy-down" all objects of one directory level to its parent's level.

BUT: All makefiles in all directories are two-liners, just including a common makefile from a central location. All the rest is automatically inferred, unless you (as "make-man") want something special. But then the single makefiles may expand beyond the default two-liner also. And BTW: This structure runs on Solaris, Linux and Windows/Cygwin all the same.

Does this make sense to you? At least I hope this helps somewhat.

Johan Bezem
--
JB Enterprises - Johan Bezem         Tel:   +49 172 5463210
Software Architect - Project Manager Fax:   +49 172 50 5463210
Realtime / Embedded Consultant       Email: address@hidden
Design - Development - Test - QA     Web:   http://www.bezem.de




reply via email to

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