diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-02-07 13:18:43 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-02-07 04:09:40 +0100 |
commit | e196e526408d478cac895f04917503706c469cf6 (patch) | |
tree | 578f8e9265e2610a916f35288f2273adbd250ad2 /source4/script/installheader.pl | |
parent | 1867a6033ca22da715017df005a5ad61c66e1597 (diff) | |
download | samba-e196e526408d478cac895f04917503706c469cf6.tar.gz samba-e196e526408d478cac895f04917503706c469cf6.tar.bz2 samba-e196e526408d478cac895f04917503706c469cf6.zip |
s4-build: remove a bunch of unused build scripts
these were leftover from the autoconf build
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Feb 7 04:09:40 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/script/installheader.pl')
-rwxr-xr-x | source4/script/installheader.pl | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/source4/script/installheader.pl b/source4/script/installheader.pl deleted file mode 100755 index 5be3434a5c..0000000000 --- a/source4/script/installheader.pl +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/perl -# Copyright (C) 2006 Jelmer Vernooij -use strict; -use File::Basename; - -my $includedir = shift; - - -sub read_headermap($) -{ - my ($fn) = @_; - my %map = (); - my $ln = 0; - open(MAP, "<headermap.txt"); - while(<MAP>) { - $ln++; - s/#.*$//g; - next if (/^\s*$/); - if (! /^(.*): (.*)$/) { - print STDERR "headermap.txt:$ln: Malformed line\n"; - next; - } - $map{$1} = $2; - } - - close(MAP); - - return %map; -} - -my %map = read_headermap("headermap.txt"); - -sub findmap($) -{ - $_ = shift; - s/^\.\///g; - - if (! -f $_ && -f "lib/$_") { $_ = "lib/$_"; } - - return $map{$_}; -} - -sub rewrite_include($$) -{ - my ($pos,$d) = @_; - - my $n = findmap($d); - return $n if $n; - return $d; -} - -sub install_header($$) -{ - my ($src,$dst) = @_; - - my $lineno = 0; - - open(IN, "<$src"); - open(OUT, ">$dst"); - - while (<IN>) { - $lineno++; - die("Will not install autogenerated header $src") if (/This file was automatically generated by mkproto.pl. DO NOT EDIT/); - - if (/^#include \"(.*)\"/) { - print OUT "#include <" . rewrite_include("$src:$lineno", $1) . ">\n"; - } elsif (/^#if _SAMBA_BUILD_ == 4/) { - print OUT "#if 1\n"; - } else { - print OUT $_; - } - } - - close(OUT); - close(IN); -} - -foreach my $p (@ARGV) -{ - my $p2 = findmap($p); - unless ($p2) { - die("Unable to map $p"); - } - print "Installing $p as $includedir/$p2\n"; - - my $dirname = dirname($p2); - - if (! -d "$includedir/$dirname") { - mkdir("$includedir/$dirname", 0777); - } - - if ( -f "$includedir/$p2" ) { - unlink("$includedir/$p2.old"); - rename("$includedir/$p2", "$includedir/$p2.old"); - } - - install_header($p,"$includedir/$p2"); -} - -print <<EOF; -====================================================================== -The headers are installed. You may restore the old headers (if there -were any) using the command "make revert". You may uninstall the headers -using the command "make uninstallheader" or "make uninstall" to uninstall -binaries, man pages and shell scripts. -====================================================================== -EOF - -exit 0; |