diff options
| author | Takashi Iwai <tiwai@suse.de> | 2010-06-02 14:15:10 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2010-06-02 14:15:10 +0200 |
| commit | e4caa8bab3862a7694ab7c6dfede223227ad7fc5 (patch) | |
| tree | 9fa537a72f00f6b4f86c2da7be2e9554304a8ec4 /scripts/headers_install.pl | |
| parent | 9f75c1b12c5ef392ddcea575b13560842c28b1b3 (diff) | |
| parent | edb39935c8b19fcd9a8f619d0bc1e9d04594cd2b (diff) | |
Merge branch 'master' of git.alsa-project.org:alsa-kernel into fix/hda
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; } |
