Cloudy & Associates

Commit 08852ac2 authored by Chatzikos, Marios's avatar Chatzikos, Marios
Browse files

Fix bug in run_programs.pl

The script instructs to run it with, say, sys_llvm.  However, when
queried about compilation flags, the Makefile in sys_* directories
returns 2 lines of output instead of the 1 line returned by the
Makefile in source.  This causes commands to be 4 lines instead of
1 for the sys_* directories, and the compilation to fail.

Capture only the last line of the Makefile output; compilation
commands are 1 line then, and the script works as intended.
parent 59441169
......@@ -27,9 +27,9 @@ if( ! -d "$DirObject" )
}
# now determine the compiler and flags to use by polling make
$cxx = `cd $DirObject; make echo-cxx | egrep -v '^make'`;
$cxx = `cd $DirObject; make echo-cxx | egrep -v '^make' | tail -n 1`;
chomp( $cxx );
$cxxflags = `cd $DirObject; make echo-cxxflags | egrep -v '^make'`;
$cxxflags = `cd $DirObject; make echo-cxxflags | egrep -v '^make' | tail -n 1`;
chomp( $cxxflags );
# escape double quotes
$cxxflags =~ s/"/\\"/g;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment