From 090ef0fac0b50d07d786cf20b9a57308b10db5e8 Mon Sep 17 00:00:00 2001
From: toole1 <toole1@6fbd10e7-183d-0410-a318-cb416676e4f2>
Date: Wed, 27 Jun 2012 05:33:17 +0000
Subject: [PATCH] monad 3.1.0 with cc-monad update

git-svn-id: https://subversion.cs.illinois.edu/svn/cs225@7018 6fbd10e7-183d-0410-a318-cb416676e4f2
---
 source/ccmonad.cpp      | 24 ++++++++++++++++++++++++
 source/monad.cpp        |  5 ++---
 source/monad_shared.cpp |  6 +++---
 source/quotes.txt       |  2 ++
 4 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/source/ccmonad.cpp b/source/ccmonad.cpp
index 75d593a..4410192 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 a5e5c11..ee94697 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 835989f..b5c1b08 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 3b1cb74..6296e2f 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
-- 
GitLab