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: Robert P. J. Day
Subject: Re: how well does multi-arch build handle recursive building?
Date: Fri, 12 May 2006 08:44:42 -0400 (EDT)

On Fri, 12 May 2006, Johan Bezem wrote:

> 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.

having just skimmed the above, yes, it makes sense.  all i needed was
the confirmation that i need to "restart" the multi-arch process in
each sub-directory.

after i read the above, i may have more questions later but at least i
know what the overall structure has to be.  thanks.

rday




reply via email to

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