Robert P. J. Day wrote: > i'm just following the logic for the simple clean targets, and i'm > confused as to how "make clean" and "make dirclean" work. in a > fully-cleaned openwrt tree, running either of those dumps one into > "make menuconfig", which would seem to be a pointless exercise if the > tree is already clean. clean and dirclean are dependent on the target selection, thus depend on the .config file.
> so i can see that either of those targets requires a rebuild of > .config if it isn't already there, which strikes me as weird. > > i'm also puzzled by that second rule and its command: > > @$(MAKE) $@ > > i'm sure i'm just missing something, but doesn't that just reinvoke > its own target? how *does* that work? thanks for any enlightenment. 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. - Felix _______________________________________________ openwrt-devel mailing list [email protected] http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
