On Fri, Nov 02, 2007 at 07:04:42PM -0700, 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.
>
> [For phase 1, I'm only trying to build userspace examples.
> Phase 2 can add kernel modules. Then I want to move more examples
> out of .txt files into their own example source files as phase 3.]
>
> My patch is below. If anyone can suggest how to make this work,
> please let me know. TIA.
Hi Randy.
I have not yet looked into this (burined in the x86 stuff).
But I will try to find time soonish.
What I have in mind is just to use standard kbuild syntax and
then in the top-level Makefile use the following:
$(Q)$(MAKE) $(build)=Dcoumentation/
This will allow us to use things like:
> +++ linux-2.6.24-rc1-git11/Documentation/accounting/Makefile
> @@ -0,0 +1,4 @@
> +
> +$(obj)/getdelays: getdelays.c
> + $(HOSTCC) $(HOSTCFLAGS) -I$(srctree)/include getdelays.c $@
hostprogs-y := getdelays
And Documentation/Makefile would contain:
obj-y := accounting/
to tell Kbuild to descend into the accounting dir.
We will create a dummy built-in.o but that does not matter.
Could that work out for you?
Sam
-
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