[vala/switch-to-gir: 2/34] vapigen: Honor --directory option as output directory



commit 3c03a213ba5f8d675a4a7d53f2d09be3b1905b95
Author: Luca Bruno <lethalman88 gmail com>
Date:   Sat Oct 16 22:13:53 2010 -0700

    vapigen: Honor --directory option as output directory

 vapigen/valavapigen.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index a660c36..a6ef441 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -168,7 +168,12 @@ class Vala.VAPIGen : Object {
 		}
 
 		var interface_writer = new CodeWriter ();
-		interface_writer.write_file (context, "%s.vapi".printf (library));
+		var vapi_filename = "%s.vapi".printf (library);
+		if (directory != null) {
+			vapi_filename = Path.build_filename (directory, vapi_filename);
+		}
+
+		interface_writer.write_file (context, vapi_filename);
 			
 		library = null;
 		



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