context.experimental = false;
context.experimental_non_null = false;
-#if VALA_0_30
+#if VALA_0_32
+ var ver=32;
+#elif VALA_0_30
var ver=30;
#elif VALA_0_28
var ver=28;
valac += " --thread ";
// we should parse the compilegroup to find out the flags..
-
+ context.debug = true;
+ valac += " -g ";
this.report = new ValaSourceReport(this.original_filepath, this.filepath);
context.report = this.report;
- //valac += " -b /tmp ";
- context.basedir = Posix.realpath (".");
+ valac += " -b " + GLib.Environment.get_home_dir() + " ";
+ context.basedir = GLib.Environment.get_home_dir(); //Posix.realpath (".");
- context.directory = context.basedir;
+ context.directory = null; //??? causes target to end up in the right place at present..
// add default packages:
}
}
+
+ // print("%s\n", valac); -
// default.. packages..
context.add_external_package ("glib-2.0");
context.add_external_package ("gobject-2.0");
var dcg = pr.compilegroups.get("_default_");
for (var i = 0; i < dcg.packages.size; i++) {
+
+ var pkg = dcg.packages.get(i);
+ // do not add libvala versions except the one that matches the one we are compiled against..
+ if (Regex.match_simple("^libvala", pkg) && pkg != ("libvala-0." + ver.to_string())) {
+ continue;
+ }
valac += " --pkg " + dcg.packages.get(i);
if (!this.has_vapi(context.vapi_directories, dcg.packages.get(i))) {
GLib.debug("Skip vapi '%s' - does not exist", dcg.packages.get(i));
// add the modules...
context.output = this.output == "" ? "/tmp/testrun" : this.output;
- valac += " -o " +context.output;
+ valac += " -o " + context.output;
GLib.debug("%s", valac);
context.target_glib_major = 2;
var cc_command = Environment.get_variable ("CC");
- string [] cc_options = { "-lm" };
+ string [] cc_options = { "-lm", "-pg" };
+ valac += " -X -lm -X -pg";
-#if VALA_0_28
+#if VALA_0_28 || VALA_0_30 || VALA_0_32
var pkg_config_command = Environment.get_variable ("PKG_CONFIG");
ccompiler.compile (context, cc_command, cc_options, pkg_config_command);
#else