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



commit a09888845d0763ceb980df568b64c197fb15dcde
Author: Luca Bruno <lethalman88 gmail com>
Date:   Mon Aug 23 20:18:17 2010 +0200

    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 e5e80aa..a6d1e10 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -176,7 +176,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);
 			
 		return quit ();
 	}



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