Re: Moving include/asm-* [was: Re: Moving sound/* to drivers/ ?]

From: Sam Ravnborg
Date: Thu May 22 2008 - 13:17:43 EST


On Thu, May 22, 2008 at 06:26:07AM +0100, Al Viro wrote:
> On Thu, May 22, 2008 at 12:20:59AM -0400, Jeff Dike wrote:
> > On Wed, May 21, 2008 at 06:29:43PM -0700, Linus Torvalds wrote:
> > > >
> > > > What about say, sparc64 that has a lot of #include <asm-sparc/foo.h>
> > >
> > > Ahh, I didn't realize people did that.
> > >
> > > I assume (but am too lazy to check) that UML probably does something
> > > similar for its arch-specific stuff.
> >
> > Not quite - there's the include/asm-um/arch link, which points to
> > ../asm-foo and a bunch of #include <asm/arch/foo.h>. Same idea though.
>
> It's a bit worse, though - there is target-dependent stuff in arch/um/include
> *and* in include/asm-um; the latter is done in a very painful way - see
> include/asm-um/module-i386.h and include/asm-um/module-x86_64.h, etc. and
> logics that creates a symlink for each of those.
>
> Is there any reason why module.h is not simply
>
> #include <sysdep/module.h>
>
> with these suckers sitting in arch/um/include/sysdep-{i386,x86_64}/ resp.?
If you create a structure along the following lines you can drop
the symlinks:

arch/um/include/{i386,x86_64}/sysdep/
The cost is a directory extra - but I assume we will find
more that fits the {i386,x86_64} folders

And then we just change KBUILD_CFLAGS -I ... depending on target.
All the dependency checks than "just works" and if arch changes
then all the proper files will get rebuild.

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/