mirror of
https://github.com/nasa/trick.git
synced 2025-04-08 11:54:23 +00:00
Addressed issues with trickify s overrides
This commit is contained in:
parent
56b3be8f01
commit
9f8f0575c9
@ -120,13 +120,29 @@ elsif ( $build_type eq "so" || $build_type eq "dylib" )
|
||||
}
|
||||
|
||||
#Build the S_overrides_trickify.mk
|
||||
if (!$no_clean_s_source)
|
||||
print "Building S_overrides_trickify.mk\n" ;
|
||||
my $abs_headers_str = "" ;
|
||||
my @abs_headers = split ' ', $ENV{'TRICKIFY_HEADER'} ;
|
||||
my $tmp_count = 0 ;
|
||||
foreach my $hdr (@abs_headers)
|
||||
{
|
||||
print "Building S_overrides_trickify.mk\n" ;
|
||||
my $my_cwd = getcwd ;
|
||||
my $make_s_overrides = "python3 $my_path../share/trick/pymods/trick/build_S_overrides_trickify.py $ENV{'TRICKIFY_OBJECT_NAME'} $ENV{'TRICKIFY_HEADER'} $my_cwd/python" ;
|
||||
print(`$make_s_overrides`) ;
|
||||
my $tmpstr = Cwd::abs_path($hdr) ;
|
||||
if($tmp_count == 0)
|
||||
{
|
||||
$abs_headers_str = "$tmpstr" ;
|
||||
$tmp_count = 1 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$abs_headers_str = "$abs_headers_str:$tmpstr" ;
|
||||
}
|
||||
}
|
||||
$abs_headers_str = "\"$abs_headers_str\"" ;
|
||||
|
||||
my $my_cwd = getcwd ;
|
||||
#TODO: Might want to add an option to make this a relative path.
|
||||
my $make_s_overrides = "python3 $my_path../share/trick/pymods/trick/build_S_overrides_trickify.py " . Cwd::abs_path($ENV{'TRICKIFY_OBJECT_NAME'}) . " " . $abs_headers_str . " $my_cwd/python " . "$my_cwd" ;
|
||||
print(`$make_s_overrides`) ;
|
||||
|
||||
#Build the S_source.hh
|
||||
if (!$no_clean_s_source)
|
||||
|
@ -4,4 +4,4 @@ import sys
|
||||
path = os.path.dirname(os.path.abspath(__file__)) + "/build_trickify.py"
|
||||
exec(open(path).read())
|
||||
|
||||
build_S_overrides_trickify(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||
build_S_overrides_trickify(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4])
|
||||
|
@ -53,9 +53,10 @@ def build_src_list():
|
||||
for i in range(len(files)):
|
||||
src_list.write(str(files[i]) + '\n')
|
||||
|
||||
def build_S_overrides_trickify(ldflags, ext_lib_dirs, python_path):
|
||||
def build_S_overrides_trickify(ldflags, ext_lib_dirs, python_path, swig_flags):
|
||||
s_overrides = open("S_overrides_trickify.mk", 'w')
|
||||
|
||||
s_overrides.write("TRICK_LDFLAGS += " + ldflags + '\n')
|
||||
s_overrides.write("TRICK_EXT_LIB_DIRS += " + ext_lib_dirs + '\n')
|
||||
s_overrides.write("TRICK_PYTHON_PATH += " + python_path + '\n')
|
||||
s_overrides.write("TRICK_SWIG_FLAGS += -I" + swig_flags + '\n')
|
||||
|
Loading…
x
Reference in New Issue
Block a user