[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How to execute targets in Makefile-A from Makefile-B?
From: |
Dave Korn |
Subject: |
RE: How to execute targets in Makefile-A from Makefile-B? |
Date: |
Thu, 15 Nov 2007 16:26:33 -0000 |
On 15 November 2007 16:13, Jeremy Conlin wrote:
> I have the file structure as shown below. B.cpp includes A.h so
> whenever I compile B.cpp, I want to check if A.h and A.cpp have been
> updated and compile them if necessary. I could create a target in
> Makefile-B that would recompile A.cpp if needed, but this target
> already exists in Makefile-A. Is there anyway I could just execute
> the target in Makefile-A when my target in Makefile-B finds a need to
> update it?
> RootDir/
> PartA/
> Makefile-A
> A.cpp
> A.h
> PartB/
> Makefile-B
> B.cpp
> B.h
> PartC/
> Makefile-C
> C.cpp
> C.h
You need to read the classic paper "Recursive Make considered harmful",
available from http://aegis.sourceforge.net/auug97.pdf, to really appreciate
the problems you're going to run into here.
cheers,
DaveK
--
Can't think of a witty .sigline today....