[Top][All Lists]

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

Re: determining targets with recursive makefiles

From: Jan M
Subject: Re: determining targets with recursive makefiles
Date: Thu, 21 Jul 2005 19:11:45 +0100

Hi Paul,

Thanks for your help. Yes, all-recursive: is defined as rule
$(RECURSIVE_TARGETS): where it handles the subdirectories.



----- Original Message -----
From: "Paul D. Smith" <address@hidden>
To: "Jan M" <address@hidden>
Cc: <address@hidden>
Sent: Wednesday, July 20, 2005 3:41 PM
Subject: Re: determining targets with recursive makefiles

> %% "Jan M" <address@hidden> writes:
>   jm> The GNU make manual reference to recursion doesnt provide a hint
>   jm> as to how, with this method of recursion, make is finding the
>   jm> sub-makefiles
> It uses exactly the same method as the top-level makefile: a -f
> argument, or the default names for makefiles, or MAKEFILES variable.
>   jm> BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
>   jm> RECURSIVE_TARGETS = ... all-recursive ...
>   jm> all: $(BUILT_SOURCES) config.h
>   jm>     $(MAKE) $(AM_MAKEFLAGS) all-recursive
>   jm> Exactly what is happening here?
> I'm not sure what you're question is... this invokes sub-makes, but in
> the same directory.  So, it reads all the same makefiles as below.
> But, since you explicitly invoked the "all-recursive" target it will run
> that target instead of the "all" target.
>   jm> By what mechanism is make locating the other makefiles (cd
>   jm> <subdirectory> appears not to be used as in the example of
>   jm> recursion in the manual)?
> THIS invocation is NOT locating "the other makefiles"; it's re-reading
> the same makefiles.  The cd to the subdirectory and the read of those
> makefiles will happen in the command script for the -recursive targets.
>   jm> What is the significance of all-recursive, which is declared but
>   jm> appears not to be defined?
> It is defined.  Look more closely at your makefile.
> If it weren't defined you'd get an error "don't know how to make target"
> or similar.

reply via email to

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