2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

strip the .in extension from "configure"-processed files to examine their

base type.  also, identify the type of resolv.conf files automatically.
no need to pull up.
This commit is contained in:
David Lawrence
2000-06-28 22:00:38 +00:00
parent 91f77f8a8d
commit 12e63bfe1d

View File

@@ -15,7 +15,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE. # SOFTWARE.
# $Id: merge_copyrights,v 1.11 2000/06/28 03:18:41 tale Exp $ # $Id: merge_copyrights,v 1.12 2000/06/28 22:00:38 tale Exp $
%file_types = (); %file_types = ();
%file_years = (); %file_years = ();
@@ -46,25 +46,31 @@ while (<FILES>) {
%x); %x);
if (!$file_types{$_}) { if (!$file_types{$_}) {
if ($_ =~ /\.(c|h|css)$/) { # Strip any .in extension to find out the file's real type.
# .in files are processed by configure to produce the target file.
($base = $_) =~ s/\.in$//;
if ($base =~ /\.(c|h|css)$/) {
$file_types{$_} = "C"; $file_types{$_} = "C";
} elsif ($_ =~ /\.y$/) { } elsif ($base =~ /\.y$/) {
$file_types{$_} = "YACC"; $file_types{$_} = "YACC";
} elsif ($_ =~ /\.pl$/i) { } elsif ($base =~ /\.pl$/i) {
$file_types{$_} = "PERL"; $file_types{$_} = "PERL";
} elsif ($_ =~ /\.sh$/) { } elsif ($base =~ /\.sh$/) {
$file_types{$_} = "SH"; $file_types{$_} = "SH";
} elsif ($_ =~ /\.html$/) { } elsif ($base =~ /\.html$/) {
$file_types{$_} = "HTML"; $file_types{$_} = "HTML";
} elsif ($_ =~ /\.(man|[0-9])$/) { } elsif ($base =~ /\.(man|[0-9])$/) {
$file_types{$_} = "MAN"; $file_types{$_} = "MAN";
} elsif ($_ =~ /\/Makefile\.in$/) { } elsif ($base =~ /\/Makefile$/) {
$file_types{$_} = "MAKE"; $file_types{$_} = "MAKE";
} elsif ($_ =~ /\/named.?\.conf$/) { } elsif ($base =~ /\/named.?\.conf$/) {
$file_types{$_} = "CONF-C"; $file_types{$_} = "CONF-C";
} elsif ($_ =~ /\.(db|hint)(\.in)?$/) { } elsif ($base =~ /\/resolv.?\.conf$/) {
$file_types{$_} = "CONF-SH";
} elsif ($base =~ /\.(db|hint)$/) {
$file_types{$_} = "ZONE"; $file_types{$_} = "ZONE";
} elsif ($_ =~ /(\/\.cvsignore|\.gif|\.jpg)$/i) { } elsif ($base =~ /(\/\.cvsignore|\.gif|\.jpg)$/i) {
$file_types{$_} = "X"; $file_types{$_} = "X";
} else { } else {
$file_types{$_} = "?"; $file_types{$_} = "?";