Robert P. J. Day wrote:
>> It works like this: When a build system target is called, the OPENWRT_BUILD
>> variable is unset and that means, the preparatory work is to be done first.
>> Package directories are scanned, prerequisites are checked, the .config is
>> checked for if the target requests it, etc.
>> At this point, the variable OPENWRT_BUILD is exported and when a real
>> target is called, @$(MAKE) $@ will call the Makefile again, but because of
>> the different set of variables, the real build system logic is included now
>> and thus provides access to the real targets.
>> Hope this helps.
> 
> sorry, i probably sounded a bit dense when i first asked that
> question.  i'm actually familiar with two-pass makefiles, i just
> didn't understand that exact rule command:
> 
>       @$(MAKE) $@
> 
> since $@ does, of course, simply refer to the target of that very
> rule, which seemed pointlessly recursive.  but now i'm assuming that
> the variable $(MAKE) expands to more than just a simple "make"
> invocation -- i'm guessing it has to include a change directory of
> some kind, right?  *then* it would make perfect sense.
No, $(MAKE) is the regular make command, but because a variable has been
exported by the first pass, this particular line will invoke the second
pass....

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to