From cad39146196880ec73177654abc2c47c5d1cc82e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 1 May 2006 15:45:26 +0000 Subject: r15378: Fix installheader script. Alexander, this will break installation of headers for srcdir != builddir (This used to be commit 527a40d80b096a0716fe71eae5a65e2a136a7ac5) --- source4/script/installheader.pl | 15 ++++----------- 1 file 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, ") { $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 () { -- cgit