summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/script/installheader.pl15
1 files changed, 4 insertions, 11 deletions
diff --git a/source4/script/installheader.pl b/source4/script/installheader.pl
index a47e2b1177..7b8dd8e92a 100755
--- a/source4/script/installheader.pl
+++ b/source4/script/installheader.pl
@@ -2,18 +2,16 @@
# Copyright (C) 2006 Jelmer Vernooij
use strict;
use File::Basename;
-use Cwd 'abs_path';
my $includedir = shift;
-my $builddir = abs_path($ENV{samba_builddir});
-my $srcdir = abs_path($ENV{samba_srcdir});
+
sub read_headermap($)
{
my ($fn) = @_;
my %map = ();
my $ln = 0;
- open(MAP, "<$fn");
+ open(MAP, "<headermap.txt");
while(<MAP>) {
$ln++;
s/#.*$//g;
@@ -30,19 +28,14 @@ sub read_headermap($)
return %map;
}
-my %map = read_headermap("$srcdir/headermap.txt");
+my %map = read_headermap("headermap.txt");
sub findmap($)
{
$_ = shift;
s/^\.\///g;
- s/$builddir\///g;
- s/$srcdir\///g;
if (! -f $_ && -f "lib/$_") { $_ = "lib/$_"; }
- if ($srcdir !~ $builddir) {
- if (! -f "$srcdir/$_" && -f "$srcdir/lib/$_") { $_ = "lib/$_"; }
- }
return $map{$_};
}
@@ -62,7 +55,7 @@ sub install_header($$)
my $lineno = 0;
- open(IN, "<$src") || open(IN, "<$srcdir/$src");
+ open(IN, "<$src");
open(OUT, ">$dst");
while (<IN>) {