build r459 - trunk/win32



Author: tml
Date: Sat Jun  7 17:40:56 2008
New Revision: 459
URL: http://svn.gnome.org/viewvc/build?rev=459&view=rev

Log:
2008-06-07  Tor Lillqvist  <tml novell com>

	* win32/cl-wrapper.c (main): Rename compileonly to c_flag. Ouput
	-Fo option only if -c flag was seen. Don't "compile" nul.c,
	i.e. NUL:, if object files were seen.



Modified:
   trunk/win32/cl-wrapper.c

Modified: trunk/win32/cl-wrapper.c
==============================================================================
--- trunk/win32/cl-wrapper.c	(original)
+++ trunk/win32/cl-wrapper.c	Sat Jun  7 17:40:56 2008
@@ -58,7 +58,6 @@
 static const char *source = NULL;
 static const char *def_file = NULL;
 
-static int compileonly = 0;
 static int debug = 0;
 static int output = 0;
 static int verbose = 0;
@@ -72,6 +71,7 @@
 
 static char *dummy_source_filename = NULL;
 
+static int c_flag = 0;
 static int E_flag = 0;
 static int P_flag = 0;
 
@@ -277,7 +277,7 @@
   for (i = 1; i < argc; i++)
     if (strcmp (argv[i], "-c") == 0)
       {
-	compileonly++;
+	c_flag++;
 	strcat (cmdline, " -c");
       }
     else if (strncmp (argv[i], "-D", 2) == 0)
@@ -693,7 +693,7 @@
     strcat (cmdline, " -c nul.c");
   else
     {
-      if (nsources == 1 && output_object == NULL && !E_flag)
+      if (nsources == 1 && output_object == NULL && c_flag && !E_flag)
 	{
 	  const char *base = _mbsrchr (source, '\\');
 	  char *dot;
@@ -722,7 +722,7 @@
       if (debug)
 	strcat (cmdline, " -Zi");
 
-      if (nsources == 0)
+      if (nsources == 0 && object_n == 0)
 	{
 	  strcat (cmdline, " nul.c");
 	}
@@ -733,10 +733,10 @@
 	  strcat (cmdline, force_header_filename);
 	}
 
-      if (!output && !compileonly &&!E_flag)
+      if (!output && !c_flag && !E_flag)
 	strcat (cmdline, " -Fea.exe");
 
-      if (!compileonly)
+      if (!c_flag)
 	{
 	  strcat (cmdline, " -link");
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]