From 19ba7857f6bf38619eda1f1dae0eb05a6cdd2b77 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sat, 6 Mar 1999 04:09:36 +0000 Subject: [PATCH] m4 support --- util/update_copyrights | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/util/update_copyrights b/util/update_copyrights index 272838ea7c..9a637d1dc1 100644 --- a/util/update_copyrights +++ b/util/update_copyrights @@ -39,6 +39,7 @@ while (<>) { $before_copyright = ""; $c_comment = 0; $shell_comment = 0; + $m4_comment = 0; $first = ""; if ($type eq "C") { $c_comment = 1; @@ -46,6 +47,9 @@ while (<>) { } elsif ($type eq "SH" || $type eq "PERL" || $type eq "MAKE") { $shell_comment = 1; $prefix = "# "; + } elsif ($type eq "M4") { + $m4_comment = 1; + $prefix = "dnl "; } else { print "$file: type '$type' not supported yet; skipping\n"; next; @@ -89,6 +93,18 @@ while (<>) { } else { $first = $_; } + } elsif ($m4_comment && /^dnl /) { + if ($_ !~ /[Cc]opyright/) { + print "$file: non-copyright comment\n"; + close(SOURCE); + next; + } + while () { + if ($_ !~ /^dnl /) { + $first = $_; + last; + } + } } else { $first = $_; }