* headers-y for machines
@ 2008-11-20 8:48 Mikael Starvik
2008-11-20 19:08 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Mikael Starvik @ 2008-11-20 8:48 UTC (permalink / raw)
To: linux-kernel, sam
Lets say you have arch/arm/mach-xx/include/mach/myfile.h and want to add myfile.h to header-y. How do you do that?
I tried to add
header-y += ../../maxh-xx/
in arch/arm/include/asm/Kbuild
and then
header-y += myfile.h in arch/arm/mach-xx/include/mach/Kbuild
but with that the file is installed is in /usr/mach-xx and not anywere under usr/include.
Thanks in advance
/Mikael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: headers-y for machines
2008-11-20 8:48 headers-y for machines Mikael Starvik
@ 2008-11-20 19:08 ` Sam Ravnborg
2008-11-20 20:36 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2008-11-20 19:08 UTC (permalink / raw)
To: Mikael Starvik; +Cc: linux-kernel
Hi Mikael.
On Thu, Nov 20, 2008 at 09:48:45AM +0100, Mikael Starvik wrote:
> Lets say you have arch/arm/mach-xx/include/mach/myfile.h and want to add myfile.h to header-y. How do you do that?
>
> I tried to add
>
> header-y += ../../maxh-xx/
>
> in arch/arm/include/asm/Kbuild
>
> and then
> header-y += myfile.h in arch/arm/mach-xx/include/mach/Kbuild
When we did the header file rearrange I had not foreseen that we would export header files
located anywhere else than include/* and arch/$ARCH/include so there is
no way to properly export files located in arch/$ARCH/mach-foo/...
Do we really want to export files form this location to userspace?
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: headers-y for machines
2008-11-20 19:08 ` Sam Ravnborg
@ 2008-11-20 20:36 ` Sam Ravnborg
2008-11-21 6:48 ` Mikael Starvik
0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2008-11-20 20:36 UTC (permalink / raw)
To: Mikael Starvik; +Cc: linux-kernel
On Thu, Nov 20, 2008 at 08:08:19PM +0100, Sam Ravnborg wrote:
> Hi Mikael.
>
> On Thu, Nov 20, 2008 at 09:48:45AM +0100, Mikael Starvik wrote:
> > Lets say you have arch/arm/mach-xx/include/mach/myfile.h and want to add myfile.h to header-y. How do you do that?
> >
> > I tried to add
> >
> > header-y += ../../maxh-xx/
> >
> > in arch/arm/include/asm/Kbuild
> >
> > and then
> > header-y += myfile.h in arch/arm/mach-xx/include/mach/Kbuild
>
> When we did the header file rearrange I had not foreseen that we would export header files
> located anywhere else than include/* and arch/$ARCH/include so there is
> no way to properly export files located in arch/$ARCH/mach-foo/...
>
> Do we really want to export files form this location to userspace?
One way to support this could be to add the possibility to specify where
to install the header files.
Like this patch:
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 612dc13..1760113 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -14,6 +14,8 @@ _dst := $(if $(dst),$(dst),$(obj))
kbuild-file := $(srctree)/$(obj)/Kbuild
include $(kbuild-file)
+_dst := $(if $(header-dest-y),$(header-dest-y),$(_dst))
+
include scripts/Kbuild.include
install := $(INSTALL_HDR_PATH)/$(_dst)
With this you could add:
header-dest-y := include/mach-foo
to the Kbuild file despite having it located somewhere else in the tree.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: headers-y for machines
2008-11-20 20:36 ` Sam Ravnborg
@ 2008-11-21 6:48 ` Mikael Starvik
0 siblings, 0 replies; 4+ messages in thread
From: Mikael Starvik @ 2008-11-21 6:48 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kernel
Thanks a lot Sam!
I agree that this is a rare case. We find it useful to keep kernel code simple and sometimes lift out some machine specific calculations or algorithms to userspace. I will enter your diff in our local CVS. It's up to you if you would like to add it in mainline or not.
Best Regards
/Mikael
-----Original Message-----
From: Sam Ravnborg [mailto:sam@ravnborg.org]
Sent: den 20 november 2008 21:37
To: Mikael Starvik
Cc: linux-kernel@vger.kernel.org
Subject: Re: headers-y for machines
On Thu, Nov 20, 2008 at 08:08:19PM +0100, Sam Ravnborg wrote:
> Hi Mikael.
>
> On Thu, Nov 20, 2008 at 09:48:45AM +0100, Mikael Starvik wrote:
> > Lets say you have arch/arm/mach-xx/include/mach/myfile.h and want to add myfile.h to header-y. How do you do that?
> >
> > I tried to add
> >
> > header-y += ../../maxh-xx/
> >
> > in arch/arm/include/asm/Kbuild
> >
> > and then
> > header-y += myfile.h in arch/arm/mach-xx/include/mach/Kbuild
>
> When we did the header file rearrange I had not foreseen that we would export header files
> located anywhere else than include/* and arch/$ARCH/include so there is
> no way to properly export files located in arch/$ARCH/mach-foo/...
>
> Do we really want to export files form this location to userspace?
One way to support this could be to add the possibility to specify where
to install the header files.
Like this patch:
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 612dc13..1760113 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -14,6 +14,8 @@ _dst := $(if $(dst),$(dst),$(obj))
kbuild-file := $(srctree)/$(obj)/Kbuild
include $(kbuild-file)
+_dst := $(if $(header-dest-y),$(header-dest-y),$(_dst))
+
include scripts/Kbuild.include
install := $(INSTALL_HDR_PATH)/$(_dst)
With this you could add:
header-dest-y := include/mach-foo
to the Kbuild file despite having it located somewhere else in the tree.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-21 6:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-20 8:48 headers-y for machines Mikael Starvik
2008-11-20 19:08 ` Sam Ravnborg
2008-11-20 20:36 ` Sam Ravnborg
2008-11-21 6:48 ` Mikael Starvik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®