mirror of
https://github.com/nasa/trick.git
synced 2025-06-01 15:10:59 +00:00
commit
731b9b9c1f
@ -187,25 +187,9 @@ all: \$(TRICK_FIXED_PYTHON)
|
|||||||
SWIG_I =" ;
|
SWIG_I =" ;
|
||||||
|
|
||||||
foreach my $file ( @files_to_process ) {
|
foreach my $file ( @files_to_process ) {
|
||||||
if ( !exists $trick_headers{$file}{python_module_dir} ) {
|
(my $swig_file = $file) =~ s/(\.[^.]*)?$/_py/ ;
|
||||||
(my $swig_file = $file) =~ s/\.[^.]*$/_py.i/ ;
|
print MAKEFILE " \\\n build$swig_file.i" ;
|
||||||
print MAKEFILE " \\\n build$swig_file" ;
|
print PY_LINK_LIST "build$swig_file.o\n" ;
|
||||||
$swig_file =~ s/i$/o/ ;
|
|
||||||
print PY_LINK_LIST "build$swig_file\n" ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print MAKEFILE "
|
|
||||||
|
|
||||||
SWIG_I_CUSTOM_OUTDIR =" ;
|
|
||||||
|
|
||||||
foreach my $file ( @files_to_process ) {
|
|
||||||
if ( exists $trick_headers{$file}{python_module_dir} ) {
|
|
||||||
(my $swig_file = $file) =~ s/\.[^.]*$/_py.i/ ;
|
|
||||||
print MAKEFILE " \\\n build$swig_file" ;
|
|
||||||
$swig_file =~ s/i$/o/ ;
|
|
||||||
print PY_LINK_LIST "build$swig_file\n" ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print MAKEFILE "
|
print MAKEFILE "
|
||||||
@ -232,26 +216,9 @@ SWIG_SRC = \$(subst .i,.cpp,\$(SWIG_I)) $swig_src_dir/top.cpp
|
|||||||
|
|
||||||
-include \$(SWIG_SRC:.cpp=.d)
|
-include \$(SWIG_SRC:.cpp=.d)
|
||||||
|
|
||||||
SWIG_SRC_CUSTOM_OUTDIR = \$(subst .i,.cpp,\$(SWIG_I_CUSTOM_OUTDIR))\n" ;
|
|
||||||
|
|
||||||
foreach my $file ( @files_to_process ) {
|
|
||||||
if ( exists $trick_headers{$file}{python_module_dir} ) {
|
|
||||||
(my $swig_file = $file) =~ s/\.[^.]*$/_py.i/ ;
|
|
||||||
(my $cpp_file = $file) =~ s/\.[^.]*$/_py.cpp/ ;
|
|
||||||
(my $dependency_file = $file) =~ s/\.[^.]*$/_py.d/ ;
|
|
||||||
print MAKEFILE "
|
|
||||||
build$cpp_file : build$swig_file | build$dependency_file trick/$trick_headers{$file}{python_module_dir}
|
|
||||||
\t\$(PRINT_SWIG)
|
|
||||||
\t\$(call ECHO_AND_LOG,\$(SWIG) \$(TRICK_INCLUDE) \$(TRICK_DEFINES) \$(TRICK_VERSIONS) \$(TRICK_SWIG_FLAGS) -c++ -python -includeall -ignoremissing -w201 -w303 -w325 -w362 -w389 -w401 -w451 -MMD -MP -outdir trick/$trick_headers{$file}{python_module_dir} -o \$@ \$<)
|
|
||||||
build$dependency_file: ;
|
|
||||||
-include build$dependency_file\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print MAKEFILE "
|
|
||||||
# SWIG_OBJECTS =================================================================
|
# SWIG_OBJECTS =================================================================
|
||||||
|
|
||||||
SWIG_OBJECTS = \$(subst .cpp,.o,\$(SWIG_SRC)) \$(subst .cpp,.o,\$(SWIG_SRC_CUSTOM_OUTDIR)) $swig_src_dir/init_swig_modules.o
|
SWIG_OBJECTS = \$(subst .cpp,.o,\$(SWIG_SRC)) $swig_src_dir/init_swig_modules.o
|
||||||
|
|
||||||
\$(SWIG_OBJECTS): %.o: %.cpp
|
\$(SWIG_OBJECTS): %.o: %.cpp
|
||||||
\t\$(PRINT_COMPILE_SWIG)
|
\t\$(PRINT_COMPILE_SWIG)
|
||||||
|
@ -7,7 +7,7 @@ use Cwd 'abs_path' ;
|
|||||||
|
|
||||||
use strict ;
|
use strict ;
|
||||||
|
|
||||||
# Get environment variables, split on colons, strip leading/trailing whitespace, remove empty elements, get absolute paths then remove more empty elements
|
# Get environment variable, split on colons, strip leading/trailing whitespace, remove empty elements, get absolute paths, remove more empty elements
|
||||||
sub get_paths {
|
sub get_paths {
|
||||||
return grep { $_ ne ''} map abs_path($_), grep { $_ ne '' } map { s/(^\s+|\s+$)//g ; $_ } split /:/, $ENV{$_[0]} ;
|
return grep { $_ ne ''} map abs_path($_), grep { $_ ne '' } map { s/(^\s+|\s+$)//g ; $_ } split /:/, $ENV{$_[0]} ;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user