diff mkoctfile.cc.in @ 9956:f26a33e21db9

mkoctfile: when compiling files in subdirectories, place object files in current directory by default
author John W. Eaton <jwe@octave.org>
date Thu, 10 Dec 2009 01:49:15 -0500
parents 33537a4d223f
children 59ed11557715
line wrap: on
line diff
--- a/mkoctfile.cc.in	Thu Dec 10 01:28:26 2009 -0500
+++ b/mkoctfile.cc.in	Thu Dec 10 01:49:15 2009 -0500
@@ -581,7 +581,7 @@
     {
       for (it = cfiles.begin (); it != cfiles.end (); ++it)
 	{
-	  string f = *it, dfile = basename (f) + ".d", line;
+	  string f = *it, dfile = basename (f, true) + ".d", line;
 
 	  unlink (dfile.c_str ());
 	  string cmd = vars["CC"] + " " + vars["DEPEND_FLAGS"] + " "
@@ -609,7 +609,7 @@
 
       for (it = ccfiles.begin (); it != ccfiles.end (); ++it)
 	{
-	  string f = *it, dfile = basename (f) + ".d", line;
+	  string f = *it, dfile = basename (f, true) + ".d", line;
 
 	  unlink (dfile.c_str ());
 	  string cmd = vars["CC"] + " " + vars["DEPEND_FLAGS"] + " "
@@ -640,7 +640,7 @@
 
   for (it = f77files.begin (); it != f77files.end (); ++it)
     {
-      string f = *it, b = basename (f);
+      string f = *it, b = basename (f, true);
       if (!vars["F77"].empty ())
 	{
 	  string o;
@@ -671,7 +671,7 @@
       string f = *it;
       if (!vars["CC"].empty ())
 	{
-	  string b = basename (f), o;
+	  string b = basename (f, true), o;
 	  if (!outputfile.empty ())
 	    {
 	      if (link)
@@ -700,7 +700,7 @@
       string f = *it;
       if (!vars["CXX"].empty ())
 	{
-	  string b = basename (f), o;
+	  string b = basename (f, true), o;
 	  if (!outputfile.empty ())
 	    {
 	      if (link)