Skip to content

Param build - #2034

Open
Pherring04 wants to merge 15 commits into
masterfrom
ParamBuild
Open

Param build#2034
Pherring04 wants to merge 15 commits into
masterfrom
ParamBuild

Conversation

@Pherring04

Copy link
Copy Markdown
Contributor

Implemented parameterized build directory for sim builds.

@coveralls

coveralls commented Feb 4, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 56.135%ParamBuild into master. No base build found for master.

Comment on lines +571 to +585
makefile_io_src << " \\\n $(TRICK_BUILD_DIR)build/class_map.o" << std::endl
<< std::endl
<< "$(IO_OBJECTS): \%.o : \%.cpp | \%.d" << std::endl
<< "\t$(PRINT_COMPILE)" << std::endl
<< "\t$(call ECHO_AND_LOG,$(TRICK_CXX) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) "
"$(TRICK_IO_CXXFLAGS) -MMD -MP -c -o $@ $<)"
<< std::endl
<< std::endl
<< "$(IO_OBJECTS:.o=.d): ;" << std::endl
<< std::endl
<< "-include $(IO_OBJECTS:.o=.d)" << std::endl
<< std::endl
<< "$(S_MAIN): $(IO_OBJECTS)" << std::endl
<< std::endl
<< "LINK_LISTS += $(LD_FILELIST)" + trick_build_dir + "build/io_link_list" << std::endl;

@brendan-nasa brendan-nasa Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is what was already here but since we're touching it...

endl does a "\n" << std::flush but we shouldn't need to flush at all in this

Suggested change
makefile_io_src << " \\\n $(TRICK_BUILD_DIR)build/class_map.o" << std::endl
<< std::endl
<< "$(IO_OBJECTS): \%.o : \%.cpp | \%.d" << std::endl
<< "\t$(PRINT_COMPILE)" << std::endl
<< "\t$(call ECHO_AND_LOG,$(TRICK_CXX) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) "
"$(TRICK_IO_CXXFLAGS) -MMD -MP -c -o $@ $<)"
<< std::endl
<< std::endl
<< "$(IO_OBJECTS:.o=.d): ;" << std::endl
<< std::endl
<< "-include $(IO_OBJECTS:.o=.d)" << std::endl
<< std::endl
<< "$(S_MAIN): $(IO_OBJECTS)" << std::endl
<< std::endl
<< "LINK_LISTS += $(LD_FILELIST)" + trick_build_dir + "build/io_link_list" << std::endl;
makefile_io_src << " \\\n"
" $(TRICK_BUILD_DIR)build/class_map.o\n"
"\n"
"$(IO_OBJECTS): %.o : %.cpp | %.d\n"
"\t$(PRINT_COMPILE)\n"
"\t$(call ECHO_AND_LOG,$(TRICK_CXX) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) $(TRICK_IO_CXXFLAGS) -MMD -MP -c -o $@ $<)\n"
"\n"
"$(IO_OBJECTS:.o=.d): ;\n"
"\n"
"-include $(IO_OBJECTS:.o=.d)\n"
"\n"
"$(S_MAIN): $(IO_OBJECTS)\n"
"\n"
"LINK_LISTS += $(LD_FILELIST)" << trick_build_dir << "build/io_link_list\n";

std::string ssrc = (*mit).second.substr(0,found) ;
if(ssrc.substr( ssrc.length()-11, ssrc.length()) != "io_S_source" )
{
// TODO: class_map.o appears to be missing?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO?

Comment on lines +71 to +106
/*if( std::getenv("AM_I_TRICKIFYING") && std::getenv("AM_I_TRICKIFYING_MK") ) {
trickifying = true;
trickifying_mk = true;
std::ifstream trickify_deps("build/trickify/swig/fake_deps_map") ;
if ( !trickify_deps.fail() ) {
std::string in_left;
std::string in_right;
while ( std::getline(trickify_deps, in_left, ':') && std::getline(trickify_deps, in_right) ) {
trickify_src_deps_map.push_back(in_left);
std::cout << "<<<<<<<<<<<<<<<<<<<<<< " << in_left << std::endl;
std::cout << "<<<<<<<<<<<<<<<<<<<<<< " << in_left << std::endl;
std::cout << "<<<<<<<<<<<<<<<<<<<<<< " << in_left << std::endl;
std::cout << "<<<<<<<<<<<<<<<<<<<<<< " << in_left << std::endl;
std::cout << "<<<<<<<<<<<<<<<<<<<<<< " << in_left << std::endl;
std::cout << ">>>>>>>>>>>>>>>>>>>>>> " << in_right << std::endl;
std::cout << ">>>>>>>>>>>>>>>>>>>>>> " << in_right << std::endl;
std::cout << ">>>>>>>>>>>>>>>>>>>>>> " << in_right << std::endl;
std::cout << ">>>>>>>>>>>>>>>>>>>>>> " << in_right << std::endl;
std::cout << ">>>>>>>>>>>>>>>>>>>>>> " << in_right << std::endl;
trickify_src_deps_map.push_back(in_right);
}
}
else {
char cwd[PATH_MAX];

if (getcwd(cwd, sizeof(cwd)) != nullptr) {
} else {
perror("getcwd() error");
}
std::cout << "build/trickify/swig/fake_deps_map no exist =(, " << cwd << std::endl;
}
}
else
{
std::cout << "NO AM_I_TRICKIFYING_MK!" << std::endl;
}*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a lot of commented out code

Comment on lines +203 to +207
if (!found)
{
// std::cout << "|" << header_file_name << "|" << std::endl;
// return false;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty branch

Comment on lines +57 to +64
if (std::getenv("TRICK_EXCLUDE"))
{
char* env = std::getenv("TRICK_EXCLUDE");
}
if (std::getenv("TRICK_ICG_EXCLUDE"))
{
char* env = std::getenv("TRICK_ICG_EXCLUDE");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where are these used?

Comment on lines +4 to +6
ifneq ($(wildcard build/),build/trickify/swig/fake_deps_paths)
TRICKIFY_FAKE_DEP_PATHS := $(shell cat build/trickify/swig/fake_deps_paths)
endif

@brendan-nasa brendan-nasa Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comparison always evaluates to true

wildcard build/ is either build/ or empty; neither of which equal build/trickify/swig/fake_deps_paths

Suggested change
ifneq ($(wildcard build/),build/trickify/swig/fake_deps_paths)
TRICKIFY_FAKE_DEP_PATHS := $(shell cat build/trickify/swig/fake_deps_paths)
endif
ifneq ($(wildcard build/trickify/swig/fake_deps_paths),)
TRICKIFY_FAKE_DEP_PATHS := $(shell cat build/trickify/swig/fake_deps_paths)
endif

Comment thread bin/trick-CP
} elsif ($arg eq "-C" || $arg eq "--directory" ) {
$sdefine_dir = abs_path($ARGV[$argnum + 1]);
}
elsif ( $arg eq "-C" || $arg eq "--directory" ) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these changes (along with line 70) break -C option

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +24 to +30
#if defined(_WIN32)
#include <direct.h>
#define get_current_dir _getcwd
#else
#include <unistd.h>
#define get_current_dir getcwd
#endif

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIN32??

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the problem

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what, do we suddenly NOT support 32-bit Windows?? When did that stop?

continue;
}

std::string path = almostRealPath(header_file_name.c_str());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaks a malloc'd char* from almostRealPath()

Suggested change
std::string path = almostRealPath(header_file_name.c_str());
char* resolved_path = almostRealPath(header_file_name.c_str());
if (resolved_path == NULL) {
continue;
}
const std::string path = std::string(resolved_path);
free(resolved_path);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants