On Sat, 2 Feb 2008, Felix Fietkau wrote: > 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.... ah, i think i see what you're getting at -- the "make clean" target has a different definition during that second pass, i just wasn't looking hard enough. clearly, i need to spend some time going over the entire build process. i do have a pretty good grounding in makefiles, i just need to read *this* particular build structure more carefully. (there are a few make observations i'll post later.) rday p.s. openwrt vs buildroot? how closely is openwrt modelled on basic buildroot, given that i can see that openwrt refers to "buildroot-ng"? does openwrt attempt to track buildroot? or who follows who? thanks again. once i figure all this out, i *will* attempt to start being productive. :-) -- ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA Home page: http://crashcourse.ca Fedora Cookbook: http://crashcourse.ca/wiki/index.php/Fedora_Cookbook ======================================================================== _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel