Dependency checking for matlab.h
parent
3c0ea754df
commit
02df40bd73
|
@ -152,7 +152,8 @@ void Class::makefile_fragment(FileWriter& file) const {
|
|||
}
|
||||
|
||||
BOOST_FOREACH(const string& file_base, file_names) {
|
||||
file.oss << file_base << ".$(MEXENDING): " << file_base << ".cpp" << endl;
|
||||
file.oss << file_base << ".$(MEXENDING): " << file_base << ".cpp";
|
||||
file.oss << " $(PATH_TO_WRAP)/matlab.h" << endl;
|
||||
file.oss << "\t$(MEX) $(mex_flags) " << file_base << ".cpp -output " << file_base << endl;
|
||||
}
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ void verifyReturnTypes(const vector<string>& validtypes, const vector<T>& vt) {
|
|||
|
||||
/* ************************************************************************* */
|
||||
void Module::matlab_code(const string& mexCommand, const string& toolboxPath,
|
||||
const string& mexExt, const string& mexFlags) const {
|
||||
const string& mexExt, const string& headerPath,const string& mexFlags) const {
|
||||
|
||||
fs::create_directories(toolboxPath);
|
||||
|
||||
|
@ -308,6 +308,7 @@ void Module::matlab_code(const string& mexCommand, const string& toolboxPath,
|
|||
|
||||
makeModuleMakefile.oss << "\nMEX = " << mexCommand << "\n";
|
||||
makeModuleMakefile.oss << "MEXENDING = " << mexExt << "\n";
|
||||
makeModuleMakefile.oss << "PATH_TO_WRAP = " << headerPath << "\n";
|
||||
makeModuleMakefile.oss << "mex_flags = " << mexFlags << "\n\n";
|
||||
|
||||
// Dependency check list
|
||||
|
|
|
@ -44,6 +44,7 @@ struct Module {
|
|||
const std::string& mexCommand,
|
||||
const std::string& path,
|
||||
const std::string& mexExt,
|
||||
const std::string& headerPath,
|
||||
const std::string& mexFlags) const;
|
||||
};
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ void generate_matlab_toolbox(
|
|||
const string& interfacePath,
|
||||
const string& moduleName,
|
||||
const string& toolboxPath,
|
||||
const string& headerPath,
|
||||
const string& mexFlags)
|
||||
{
|
||||
// Parse interface file into class object
|
||||
|
@ -45,7 +46,7 @@ void generate_matlab_toolbox(
|
|||
wrap::Module module(interfacePath, moduleName, false);
|
||||
|
||||
// Then emit MATLAB code
|
||||
module.matlab_code(mexCommand,toolboxPath,mexExt,mexFlags);
|
||||
module.matlab_code(mexCommand,toolboxPath,mexExt,headerPath,mexFlags);
|
||||
}
|
||||
|
||||
/** Displays usage information */
|
||||
|
@ -73,6 +74,6 @@ int main(int argc, const char* argv[]) {
|
|||
usage();
|
||||
}
|
||||
else
|
||||
generate_matlab_toolbox(argv[1],argv[2],argv[3],argv[4],argv[5],argc==6 ? " " : argv[6]);
|
||||
generate_matlab_toolbox(argv[1],argv[2],argv[3],argv[4],argv[5],argv[6],argc==7 ? " " : argv[7]);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue