Teach convert-makefile-header about the mcom header line.

Don't remove this when doing the conversion.
This commit is contained in:
Eitan Adler 2012-12-15 15:16:15 +00:00
parent 15627b3a8e
commit 39ab86d88a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=308950

View file

@ -41,6 +41,17 @@ sub get_creator($) {
return $creator;
}
sub get_mcom($) {
my $header=shift;
my $mcom;
for my $line (@$header) {
if ($line=~m'\$MCom:'i) {
return $line;
}
}
return "";
}
MAIN: {
# get options
my $opt={};
@ -86,12 +97,14 @@ MAIN: {
print $outh "# \$FreeBSD\$\n";
} elsif(defined($opt->{createdby}) || !defined($opt->{rcsonly})) {
my $creator=get_creator(\@header);
my $mcom=get_mcom(\@header);
if(defined($creator)) {
print $outh "# Created by: $creator\n";
} else {
print STDERR "$mf creator not found. Reverting to RCS string only.\n";
}
print $outh "# \$FreeBSD\$\n";
print $outh $mcom;
}
for my $line (@makefile) {