Re: [PATCH] samples: build fix

From: Sam Ravnborg
Date: Thu Feb 14 2008 - 15:43:42 EST


On Thu, Feb 14, 2008 at 12:02:57PM -0800, Roland McGrath wrote:
> I don't have any axe to grind here, I just could not figure out how to get
> the samples/ modules built (without resorting to make M=.../samples/foo and
> clobbering my source directory).

> If there is another plan, point me to its documentation.

I just double checked and the usual:
make O=output samples/

It works as expected and build all the samples.
It is documented by make help like this:
$ make help
...
dir/ - Build all files in dir and below


The above is generic functionality and I do not see any
need for a special target to build the samples.

> I can't see the point of the Kconfig option for samples at all.
> What does it do?
The samples were added so we avoided them to bit-rot.
We do not want to build samples unconditionally - that should be pretty
obvious.
So maybe I did not get what you actually was asking?

> Because they are only ever modules, the samples are never built in.
There is _nothing_ preventing us from adding stuff tomorrow that has
be build as built-in. Some sample code documenting early cpu init
stuff for instance. And we do not want this code to clash with
other kernel code if global symbols are duplicated.

This thinking that samples are solely modules are wrong. It is correct that
most of it is expected to be modules but not all of it.

I only found one little glitch.
$ make modules
does not build the samples.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/