diff options
author | David Howells <dhowells@redhat.com> | 2012-10-02 13:01:57 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-10-02 13:01:57 -0400 |
commit | 10b63956fce7f369cc37fd4d994f09bd5203efe4 (patch) | |
tree | 4b0e607507b19a89a8c22f21d2552e66255faac5 /scripts/headers_install.pl | |
parent | ec28b7f250b19f31e14b69b015d61d0818bf43a0 (diff) |
UAPI: Plumb the UAPI Kbuilds into the user header installation and checking
Plumb the UAPI Kbuilds into the user header installation and checking system.
As the headers are split the entries will be transferred across from the old
Kbuild files to the UAPI Kbuild files.
The changes made in this commit are:
(1) Exported generated files (of which there are currently four) are moved to
uapi/ directories under the appropriate generated/ directory, thus we
get:
include/generated/uapi/linux/version.h
arch/x86/include/generated/uapi/asm/unistd_32.h
arch/x86/include/generated/uapi/asm/unistd_64.h
arch/x86/include/generated/uapi/asm/unistd_x32.h
These paths were added to the build as -I flags in a previous patch.
(2) scripts/Makefile.headersinst is now given the UAPI path to install from
rather than the old path.
It then determines the old path from that and includes that Kbuild also
if it exists, thus permitting the headers to exist in either directory
during the changeover.
I also renamed the "install" variable to "installdir" as it refers to a
directory not the install program.
(3) scripts/headers_install.pl is altered to take a list of source file paths
instead of just their names so that the makefile can tell it exactly
where to find each file.
For the moment, files can be obtained from one of four places for each
output directory:
.../include/uapi/foo/
.../include/generated/uapi/foo/
.../include/foo/
.../include/generated/foo/
The non-UAPI paths will be dropped later.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'scripts/headers_install.pl')
-rw-r--r-- | scripts/headers_install.pl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 48462be328bb..239d22d4207b 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl | |||
@@ -4,8 +4,7 @@ | |||
4 | # user space and copy the files to their destination. | 4 | # user space and copy the files to their destination. |
5 | # | 5 | # |
6 | # Usage: headers_install.pl readdir installdir arch [files...] | 6 | # Usage: headers_install.pl readdir installdir arch [files...] |
7 | # readdir: dir to open files | 7 | # installdir: dir to install the files to |
8 | # installdir: dir to install the files | ||
9 | # arch: current architecture | 8 | # arch: current architecture |
10 | # arch is used to force a reinstallation when the arch | 9 | # arch is used to force a reinstallation when the arch |
11 | # changes because kbuild then detect a command line change. | 10 | # changes because kbuild then detect a command line change. |
@@ -18,15 +17,18 @@ | |||
18 | 17 | ||
19 | use strict; | 18 | use strict; |
20 | 19 | ||
21 | my ($readdir, $installdir, $arch, @files) = @ARGV; | 20 | my ($installdir, $arch, @files) = @ARGV; |
22 | 21 | ||
23 | my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__"; | 22 | my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__"; |
24 | 23 | ||
25 | foreach my $file (@files) { | 24 | foreach my $filename (@files) { |
25 | my $file = $filename; | ||
26 | $file =~ s!^.*/!!; | ||
27 | |||
26 | my $tmpfile = "$installdir/$file.tmp"; | 28 | my $tmpfile = "$installdir/$file.tmp"; |
27 | 29 | ||
28 | open(my $in, '<', "$readdir/$file") | 30 | open(my $in, '<', $filename) |
29 | or die "$readdir/$file: $!\n"; | 31 | or die "$filename: $!\n"; |
30 | open(my $out, '>', $tmpfile) | 32 | open(my $out, '>', $tmpfile) |
31 | or die "$tmpfile: $!\n"; | 33 | or die "$tmpfile: $!\n"; |
32 | while (my $line = <$in>) { | 34 | while (my $line = <$in>) { |