diff options
author | Eitan Adler <eadler@FreeBSD.org> | 2012-12-15 15:16:15 +0000 |
---|---|---|
committer | Eitan Adler <eadler@FreeBSD.org> | 2012-12-15 15:16:15 +0000 |
commit | 39ab86d88ac3494eb75a30d881258e8603ff9eee (patch) | |
tree | fa936a4ab0f0df681377100f5d807d43c35cc8cd /Tools | |
parent | 15627b3a8e8109c8a7494e3e318caddac10d5289 (diff) |
Teach convert-makefile-header about the mcom header line.
Don't remove this when doing the conversion.
Notes
Notes:
svn path=/head/; revision=308950
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/convert-makefile-header.pl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tools/scripts/convert-makefile-header.pl b/Tools/scripts/convert-makefile-header.pl index db5414595268..8a97fdde3af2 100755 --- a/Tools/scripts/convert-makefile-header.pl +++ b/Tools/scripts/convert-makefile-header.pl @@ -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) { |