aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-29 20:03:27 +0000
committerlloyd <[email protected]>2008-09-29 20:03:27 +0000
commit72a106bb7db26c4eb5e6329df5df472b749d5308 (patch)
tree4954d3d1a3c433fad3196bf7237b612468ba83c3
parent638e85f941b33ee0cfc5e3575b30badabd4a1982 (diff)
In build_cmds, push onto a list and join the strings at the end
-rwxr-xr-xconfigure.pl11
1 files changed, 5 insertions, 6 deletions
diff --git a/configure.pl b/configure.pl
index 85d672cef..2f6e2852c 100755
--- a/configure.pl
+++ b/configure.pl
@@ -1660,8 +1660,6 @@ sub file_list {
sub build_cmds {
my ($config, $dir, $flags, $files) = @_;
- my $output = '';
-
my $obj_suffix = $$config{'obj_suffix'};
my %ccinfo = my_compiler($config);
@@ -1678,6 +1676,8 @@ sub build_cmds {
my $bld_line = "\t\$(CXX) $inc$inc_dir $flags $from\$? $to\$@";
+ my @output_lines;
+
foreach (sort keys %$files) {
my $src_file = File::Spec->catfile($$files{$_}, $_);
my $obj_file = File::Spec->catfile($dir, $_);
@@ -1686,11 +1686,10 @@ sub build_cmds {
$obj_file =~ s/\.c$/.$obj_suffix/;
$obj_file =~ s/\.S$/.$obj_suffix/;
- $output .= "$obj_file: $src_file\n$bld_line\n\n";
+ push @output_lines, "$obj_file: $src_file\n$bld_line";
}
- chomp($output);
- chomp($output);
- return $output;
+
+ return join("\n\n", @output_lines);
}
sub generate_makefile {