aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/headers_install.pl
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-03 16:45:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-03 16:45:43 -0400
commit9b2e077c42a97fcbdc0dd71edb1fc9d15c74ad29 (patch)
tree20bf301d21f6c3776046acada5070630009ceedb /scripts/headers_install.pl
parenta54dfb1a845c38a97686268d8c4086a63d9493aa (diff)
parent10b63956fce7f369cc37fd4d994f09bd5203efe4 (diff)
Merge tag 'uapi-prep-20121002' of git://git.infradead.org/users/dhowells/linux-headers
Pull preparatory patches for user API disintegration from David Howells: "The patches herein prepare for the extraction of the Userspace API bits from the various header files named in the Kbuild files. New subdirectories are created under either include/uapi/ or arch/x/include/uapi/ that correspond to the subdirectory containing that file under include/ or arch/x/include/. The new subdirs under the uapi/ directory are populated with Kbuild files that mostly do nothing at this time. Further patches will disintegrate the headers in each original directory and fill in the Kbuild files as they do it. These patches also: (1) fix up #inclusions of "foo.h" rather than <foo.h>. (2) Remove some redundant #includes from the DRM code. (3) Make the kernel build infrastructure handle Kbuild files both in the old places and the new UAPI place that both specify headers to be exported. (4) Fix some kernel tools that #include kernel headers during their build. I have compile tested this with allyesconfig against x86_64, allmodconfig against i386 and a scattering of additional defconfigs of other arches. Prepared for main script Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com> Acked-by: H. Peter Anvin <hpa@zytor.com>" * tag 'uapi-prep-20121002' of git://git.infradead.org/users/dhowells/linux-headers: UAPI: Plumb the UAPI Kbuilds into the user header installation and checking UAPI: x86: Differentiate the generated UAPI and internal headers UAPI: Remove the objhdr-y export list UAPI: Move linux/version.h UAPI: Set up uapi/asm/Kbuild.asm UAPI: x86: Fix insn_sanity build failure after UAPI split UAPI: x86: Fix the test_get_len tool UAPI: (Scripted) Set up UAPI Kbuild files UAPI: Partition the header include path sets and add uapi/ header directories UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ UAPI: (Scripted) Remove redundant DRM UAPI header #inclusions from drivers/gpu/. UAPI: Refer to the DRM UAPI headers with <...> and from certain headers only
Diffstat (limited to 'scripts/headers_install.pl')
-rw-r--r--scripts/headers_install.pl14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
index 48462be328b..239d22d4207 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
19use strict; 18use strict;
20 19
21my ($readdir, $installdir, $arch, @files) = @ARGV; 20my ($installdir, $arch, @files) = @ARGV;
22 21
23my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__"; 22my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__";
24 23
25foreach my $file (@files) { 24foreach 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>) {