help-make
[Top][All Lists]
Advanced

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

recursive/multiplatform make


From: Bruce Jones
Subject: recursive/multiplatform make
Date: Fri, 04 Jul 2003 18:46:53 +0000

Sorry if this is a repeat.  I didn't see the first one I sent.

I am trying to create some Makefiles for multi-architecture builds as
described here http://make.paulandlesley.org/multi-arch.html.  I am
using the advanced VPATH method and that works fine.

My problem is that some of the directories have both source code and
sub-directories to build.  Normally I would do something like this.

all: subdirs src

subdirs:
for i in $(SUBDIRS); do \
$(MAKE) -C $$dir; \
done

src:
whatever

But using the VPATH method, the make switches to the obj directory first
and then fails because it can't find the subdirs.  What would be the best
way to handle this situation?  I guess I need some sort of test in the
if part to build subdirs before I include the target.mk file and switch
to the obj directory.

Thanks,
Bruce

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963





reply via email to

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