[Vala] --version support



Hola,

The '--version' cl option does not work properly:

elmarco vaiolin:~/cvs/gnome2/vala/compiler$ valac --version
No source file specified.

Please consider something like this:

--- valacompiler.vala   (révision 145)
+++ valacompiler.vala   (copie de travail)

@@ -137,6 +137,11 @@
                if (Report.get_errors () > 0) {
                        return quit ();
                }
+
+               if (version) {
+                       stdout.printf ("Vala 0.0.4");
+                       return quit ();
+               }

Is there a way to include plain C code (as %{ and %} work in flex/bison)?
Thus you could include the VERSION generated variable of ${top_builddir}/config.h
instead of a static string.

Best regards,
--
Marc-André Lureau, GSmartMix

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