We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0f27404 + 5f70241 commit baaf7edCopy full SHA for baaf7ed
bin/mkmf
@@ -467,6 +467,22 @@ if( $suffix eq '.a' ) {
467
print MAKEFILE "$opt_p: \$(OBJ) $opt_l\n\t\$(LD) \$(OBJ) -o $opt_p $opt_l \$(LDFLAGS)\n";
468
}
469
close MAKEFILE;
470
+
471
+# Make a copy of the completed Makefile, read it back in, escape all relevant `=` signs
472
+# and write it back out
473
+rename($mkfile, $mkfile.'.bak');
474
+open(IN, '<' . $mkfile.'.bak') or die $!;
475
+open(OUT, '>' . $mkfile) or die $!;
476
477
+print OUT "EQUALS = =";
478
479
+while(<IN>) {
480
+ # Only escape '=' that aren't assignments (aka anything that spaces either side)
481
+ $_ =~ s/(?<! )=(?! )/\$\(EQUALS\)/g;
482
+ print OUT "$_";
483
+}
484
+close(IN);
485
+close(OUT);
486
print " $mkfile is ready.\n";
487
488
exec 'make', '-f', $mkfile if $opt_x;
0 commit comments