summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-05-01 15:45:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:05:29 -0500
commitcad39146196880ec73177654abc2c47c5d1cc82e (patch)
tree657d35e31ec2cb83055004a7e3e6b9a760d65c1d /source4
parent66a4c270d49bc3807b547ff17423b9d661eb3983 (diff)
downloadsamba-cad39146196880ec73177654abc2c47c5d1cc82e.tar.gz
samba-cad39146196880ec73177654abc2c47c5d1cc82e.tar.bz2
samba-cad39146196880ec73177654abc2c47c5d1cc82e.zip
r15378: Fix installheader script. Alexander, this will break installation of headers
for srcdir != builddir (This used to be commit 527a40d80b096a0716fe71eae5a65e2a136a7ac5)
Diffstat (limited to 'source4')
-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>) {