help-make
[Top][All Lists]
Advanced

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

How to execute targets in Makefile-A from Makefile-B?


From: Jeremy Conlin
Subject: How to execute targets in Makefile-A from Makefile-B?
Date: Thu, 15 Nov 2007 11:13:14 -0500

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?

Thanks,
Jeremy

RootDir/
   PartA/
       Makefile-A
       A.cpp
       A.h
   PartB/
       Makefile-B
       B.cpp
       B.h
   PartC/
       Makefile-C
       C.cpp
       C.h




reply via email to

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