diff options
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>) { |
