diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2010-07-05 15:46:08 +0900 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2010-07-05 15:46:08 +0900 |
| commit | 285eba57db7bd7d7c3c5929fb8621fdcaaea1b00 (patch) | |
| tree | a9e7f0563cef296b24c53b20dbb388ec5c210172 /scripts/headers_install.pl | |
| parent | 1c14e6cecb1811543b1016f27e5d308fbea8c08a (diff) | |
| parent | 815c4163b6c8ebf8152f42b0a5fd015cfdcedc78 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/linux/serial_sci.h
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'scripts/headers_install.pl')
| -rw-r--r-- | scripts/headers_install.pl | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index b89ca2c58fd..4ca3be3b2e5 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl @@ -23,13 +23,13 @@ my ($readdir, $installdir, $arch, @files) = @ARGV; my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__"; foreach my $file (@files) { - local *INFILE; - local *OUTFILE; my $tmpfile = "$installdir/$file.tmp"; - open(INFILE, "<$readdir/$file") - or die "$readdir/$file: $!\n"; - open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n"; - while (my $line = <INFILE>) { + + open(my $in, '<', "$readdir/$file") + or die "$readdir/$file: $!\n"; + open(my $out, '>', $tmpfile) + or die "$tmpfile: $!\n"; + while (my $line = <$in>) { $line =~ s/([\s(])__user\s/$1/g; $line =~ s/([\s(])__force\s/$1/g; $line =~ s/([\s(])__iomem\s/$1/g; @@ -39,10 +39,11 @@ foreach my $file (@files) { $line =~ s/(^|\s)(inline)\b/$1__$2__/g; $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; - printf OUTFILE "%s", $line; + printf {$out} "%s", $line; } - close OUTFILE; - close INFILE; + close $out; + close $in; + system $unifdef . " $tmpfile > $installdir/$file"; unlink $tmpfile; } |
