On Sat, 03 Nov 2007 09:40:13 +0100 Giacomo Catenazzi wrote: > Randy Dunlap wrote: > > rfh == request for help. > > > > I tried to do $subject and failed miserably. > > > > For how to cause the Documentation/ examples to be built, > > I considered using a new CONFIG_ symbol, an environment variable > > (or a command-line variable), a completely separate Makefile, > > or a "check" string (these are special-cased in the top-level > > Makefile). I ended up trying to use a command-line variable "X", > > as in: > > > > $ make X=1 all > > > > which sets KBUILD_EX to 1, and then I (tried to) use KBUILD_EX > > in top-level and subordinate Makefiles to control building the > > example source files. > > I don't like the method you selected.
I don't care so much which method is used so long as it works. > I think the most used use is to read and build examples > directly from one directory, so we should design the > system from this assumption. I suppose that it depends on what the goal(s) is/are. My goal is to make sure that the examples build with no errors and to make sure that we have a way to check that. > So I will do a simple recursive Makefiles > (and every makefile will include a ../../scripts/Makefile.example), > so that we can do "make" for every example. > > A simple "examples" rules in main makefile: > > USERSPACE_EXAMPLES_DIRS := Documentation/foo/ Documentation/bar > examples: > for d in $(USERSPACE_EXAMPLES_DIRS) do ( cd $d; $(MAKE) );;done > > > BTW: the problem on your makefile: you use > make -f dir/Makefile > but you still remain in the CWD. Yes, I noticed that. Thanks, --- ~Randy - To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
