summaryrefslogtreecommitdiffstats
path: root/scripts/headers_install.pl
diff options
context:
space:
mode:
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 48462be328bb..239d22d4207b 100644
--- a/scripts/headers_install.pl
+++ b/scripts/headers_install.pl
@@ -4,8 +4,7 @@
# user space and copy the files to their destination.
#
# Usage: headers_install.pl readdir installdir arch [files...]
-# readdir: dir to open files
-# installdir: dir to install the files
+# installdir: dir to install the files to
# arch: current architecture
# arch is used to force a reinstallation when the arch
# changes because kbuild then detect a command line change.
@@ -18,15 +17,18 @@
use strict;
-my ($readdir, $installdir, $arch, @files) = @ARGV;
+my ($installdir, $arch, @files) = @ARGV;
my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__";
-foreach my $file (@files) {
+foreach my $filename (@files) {
+ my $file = $filename;
+ $file =~ s!^.*/!!;
+
my $tmpfile = "$installdir/$file.tmp";
- open(my $in, '<', "$readdir/$file")
- or die "$readdir/$file: $!\n";
+ open(my $in, '<', $filename)
+ or die "$filename: $!\n";
open(my $out, '>', $tmpfile)
or die "$tmpfile: $!\n";
while (my $line = <$in>) {