diff --git a/source/ccmonad.cpp b/source/ccmonad.cpp index 75d593a1eda5ad261f6e9a06d465c78fbf5312ee..44101922c8b3c520602b4fbea093e89e535776f9 100644 --- a/source/ccmonad.cpp +++ b/source/ccmonad.cpp @@ -5,6 +5,24 @@ using namespace util; int main(int argc, const char * const * argv) { + bool isCompileOnly = false; + + for (int i = 2; i < argc; i++) + if (strcmp(argv[i], "-c") == 0) + isCompileOnly = true; + + if (!isCompileOnly) // not really using cc-monad, just linking + { + if (argc < 3) + { + cerr << "cc-monad: usage error" << endl; + exit(1); + } + vector<string> linkargs(argv + 2, argv + argc); + exec(argv[1], linkargs); + exit(0); + } + if (argc < 4) { cerr << "cc-monad: usage error" << endl; @@ -15,6 +33,7 @@ int main(int argc, const char * const * argv) vector<string> options; string outputFile; bool isNextOutput = false; + for (int32_t i = 2; i < argc; i++) { if (strlen(argv[i]) > 0) @@ -43,7 +62,12 @@ int main(int argc, const char * const * argv) } } } + if (outputFile == "") + { + outputFile = inputFile.substr(0, inputFile.find_last_of(".")) + ".o"; + } + if (inputFile == "") { cerr << "cc-monad: usage error" << endl; exit(1); diff --git a/source/monad.cpp b/source/monad.cpp index a5e5c118b0244e3e43ac8172c025d99cbe83e20a..ee94697e6e98c5017754aa8f20daad06b892d10b 100644 --- a/source/monad.cpp +++ b/source/monad.cpp @@ -539,9 +539,8 @@ void monad::exec_command(const string & command) return; } -#if DEBUG - cout << "Pre-Make Command: " << command << endl; -#endif + if (opts::verbose) + cout << "Pre-Make Command: " << command << endl; system(command.c_str()); } diff --git a/source/monad_shared.cpp b/source/monad_shared.cpp index 835989f8185573bbe95c3d55acf169f3d68734b7..b5c1b0858d26080cf1920bc9e12542532d58a60c 100644 --- a/source/monad_shared.cpp +++ b/source/monad_shared.cpp @@ -14,9 +14,9 @@ namespace monad_shared namespace versioninfo { const char * official_name = "Monad Autograder"; -const char * version_name = "sigzombie"; -const Version version_num = Version(3, 0, 6); -const char * date = "24 Apr 2012"; +const char * version_name = "Leap Into the Void"; +const Version version_num = Version(3, 1, 0); +const char * date = "27 Jun 2012"; } const char * unit_test_result::pass_string = "~~PASSED~~"; diff --git a/source/quotes.txt b/source/quotes.txt index 3b1cb7420fa5215f3e0fca540ebd52a5353a7fdb..6296e2f7385a46135f98841b6b9056e0f4990604 100644 --- a/source/quotes.txt +++ b/source/quotes.txt @@ -60,3 +60,5 @@ "I've seen it on Google Maps; I think I know what I'm talking about" ~ Kyle Johnson "Wat." ~ Chase Geigle "I've seen many balls. Actually, let's do an example without balls." ~ Jack Toole +"Find your points of interest, compute HOG features, bung them into a classifier, and see what you get." ~ D.A. Forsyth +"You *could* call it an ape, and that an ape, but that would just be phylogenic pettifogging." ~ D.A. Forsyth