[vala/parallel] CodeContext: use the depend filename as the target



commit 750e2197cb2db235d8938bb073f54bd30bb105e7
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Aug 28 16:09:56 2010 +0200

    CodeContext: use the depend filename as the target
    
    When outputting dependency information using --deps=, use the name of
    the dependency file itself as the make target for the rule that gets
    output.
    
    This lets the dependency file serve as a stamp for the C file (which may
    or may not be touched depending if it was changed).  The dependency
    output is always touched.

 vala/valacodecontext.vala |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index 3e371a4..38e01e3 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -371,19 +371,12 @@ public class Vala.CodeContext {
 			return;
 		}
 
+		stream.printf ("%s:", filename);
 		foreach (var src in source_files) {
-			if (src.file_type == SourceFileType.SOURCE) {
-				/* XXX: basename may not be correct. */
-                                stream.printf ("%s:", Path.get_basename (src.get_csource_filename ()));
-				foreach (var fast in source_files) {
-					if (fast.file_type == SourceFileType.FAST && fast.used) {
-						stream.printf (" %s", fast.filename);
-					}
-				}
-				stream.printf ("\n\n");
-			} else if (src.file_type == SourceFileType.FAST && src.used) {
-				stream.printf ("%s:\n\n", src.filename);
+			if (src.file_type == SourceFileType.FAST && src.used) {
+				stream.printf (" %s", src.filename);
 			}
 		}
+		stream.printf ("\n\n");
 	}
 }



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