help-make
[Top][All Lists]
Advanced

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

multi-arch builds and recursive makes


From: Robert P. J. Day
Subject: multi-arch builds and recursive makes
Date: Sun, 20 Jun 2004 11:49:32 -0400 (EDT)


(sorry, i managed to lose paul's response to my original query, so i just grabbed the salient bits out of the list archives.)

Regarding Paul's essay on multi-arch builds, Paul wrote:

The model is this: you run the make in the source directory.  That is
sort of the "master" make.  It will invoke a sub-make in the target
directory in order to build all the local targets.

_BUT_, that sub-make doesn't try to build any subdirectories.  Instead,
once the sub-make is done building the local targets it exits.  Then
it's up to the parent make (in the source directory) to run any
sub-makes.

In short, you want to put any recursion into the section of the makefile
that's invoked in the source directory, not the section invoked in the
target directory.

ok, that makes a lot more sense -- i was trying to determine what tricky part of the solution made the recursive part work.

what this pretty clearly suggests is that, if you have a sizable project with numerous levels of subdirectories, you have to modify the makefile at every level in every subdirectory, and extend it to have the general structure:

 ifeq (,$(filter _%,$(notdir $(CURDIR))))
 include target.mk
 else
 #----- End Boilerplate

 VPATH = $(SRCDIR)

   Normal makefile rules here

 #----- Begin Boilerplate
 endif

right? it just means that it will take time to convert an existing project from the regular build format to the multi-arch format, since you have to make that change throughout the software tree, correct?

rday






reply via email to

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