Made the 'all' target work properly in the wrap-generated makefile

release/4.3a0
Alex Cunningham 2011-12-06 16:50:27 +00:00
parent e036dd460e
commit 58939b5684
1 changed files with 7 additions and 5 deletions

View File

@ -232,6 +232,12 @@ void Module::matlab_code(const string& toolboxPath,
make_ofs << "MEXENDING = " << mexExt << "\n";
make_ofs << "mex_flags = " << mexFlags << "\n\n";
// add 'all' to Makefile
make_ofs << "all: ";
BOOST_FOREACH(Class cls, classes)
make_ofs << cls.name << " ";
make_ofs << "\n\n";
// generate proxy classes and wrappers
BOOST_FOREACH(Class cls, classes) {
// create directory if needed
@ -263,11 +269,7 @@ void Module::matlab_code(const string& toolboxPath,
ofs << "echo off" << endl;
ofs.close();
// add 'all' and 'clean' to Makefile
make_ofs << "\nall: ";
BOOST_FOREACH(Class cls, classes)
make_ofs << cls.name << " ";
// make clean at end of Makefile
make_ofs << "\n\nclean: \n";
make_ofs << "\trm -rf *.$(MEXENDING)\n";
BOOST_FOREACH(Class cls, classes)