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



commit 303c45c8866f51048cf2d11c1552257e117c0205
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]