Param build - #2034
Conversation
…the process too. You're welcome.
| 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; |
There was a problem hiding this comment.
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
| 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? |
| /*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; | ||
| }*/ |
There was a problem hiding this comment.
that's a lot of commented out code
| if (!found) | ||
| { | ||
| // std::cout << "|" << header_file_name << "|" << std::endl; | ||
| // return false; | ||
| } |
| if (std::getenv("TRICK_EXCLUDE")) | ||
| { | ||
| char* env = std::getenv("TRICK_EXCLUDE"); | ||
| } | ||
| if (std::getenv("TRICK_ICG_EXCLUDE")) | ||
| { | ||
| char* env = std::getenv("TRICK_ICG_EXCLUDE"); | ||
| } |
There was a problem hiding this comment.
where are these used?
| ifneq ($(wildcard build/),build/trickify/swig/fake_deps_paths) | ||
| TRICKIFY_FAKE_DEP_PATHS := $(shell cat build/trickify/swig/fake_deps_paths) | ||
| endif |
There was a problem hiding this comment.
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
| 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 |
| } elsif ($arg eq "-C" || $arg eq "--directory" ) { | ||
| $sdefine_dir = abs_path($ARGV[$argnum + 1]); | ||
| } | ||
| elsif ( $arg eq "-C" || $arg eq "--directory" ) { |
There was a problem hiding this comment.
I think these changes (along with line 70) break -C option
There was a problem hiding this comment.
easier to see without formatting changes included in the diff here:
| #if defined(_WIN32) | ||
| #include <direct.h> | ||
| #define get_current_dir _getcwd | ||
| #else | ||
| #include <unistd.h> | ||
| #define get_current_dir getcwd | ||
| #endif |
There was a problem hiding this comment.
what, do we suddenly NOT support 32-bit Windows?? When did that stop?
| continue; | ||
| } | ||
|
|
||
| std::string path = almostRealPath(header_file_name.c_str()); |
There was a problem hiding this comment.
leaks a malloc'd char* from almostRealPath()
| 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); | |
Implemented parameterized build directory for sim builds.