Commit 5f70241 1 parent 0f27404 commit 5f70241 Copy full SHA for 5f70241
File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -467,6 +467,22 @@ if( $suffix eq '.a' ) {
467
467
print MAKEFILE " $opt_p : \$ (OBJ) $opt_l \n\t\$ (LD) \$ (OBJ) -o $opt_p $opt_l \$ (LDFLAGS)\n " ;
468
468
}
469
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);
470
486
print " $mkfile is ready.\n " ;
471
487
472
488
exec ' make' , ' -f' , $mkfile if $opt_x ;
You can’t perform that action at this time.
0 commit comments