]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
automake: avoid unnecessary use of \K.
authorKarl Berry <karl@freefriends.org>
Thu, 21 Dec 2023 23:46:43 +0000 (15:46 -0800)
committerKarl Berry <karl@freefriends.org>
Thu, 21 Dec 2023 23:46:43 +0000 (15:46 -0800)
This fixes (part of) https://bugs.gnu.org/67891
and follows up on https://bugs.gnu.org/55025.

* bin/automake.in (generate_makefile) <posix>: avoid use of
\K when removing comment and blank lines before a .POSIX target,
since Solaris 10 has perl 5.8.4, and \K was added in 5.10.

bin/automake.in

index 0a9b4a3e28c6ff13c15cafdc46e69825b5ef822f..26c9f46b192c1779915b84d20af4b28df0fee699 100644 (file)
@@ -8132,7 +8132,7 @@ sub generate_makefile
   # otherwise, the behavior of "make" is unspecified by POSIX.
   if (option 'posix')
     {
-      $output =~ s/^((#.*)?\n)*\K/.POSIX:\n\n/;
+      $output =~ s/^((#.*)?\n)*/.POSIX:\n\n/;
     }
 
   # Decide whether we must update the output file or not.