Skip to content
Browse files

small touches to make build work

  • Loading branch information...
1 parent a5d28df commit 99c68c621756b7a03396dfd377348554047950a8 @plobsing committed Aug 7, 2010
Showing with 28 additions and 4 deletions.
  1. +28 −4 setup.winxed
View
32 setup.winxed
@@ -33,7 +33,7 @@ function main(var argv) {
using clean_pir_winxed;
using clean_c_dynext;
- register_steb_after('clean', clean_pir_winxed);
+ register_step_after('clean', clean_pir_winxed);
register_step_before('clean', clean_c_dynext);
var conf = load_setup_json();
@@ -79,15 +79,21 @@ function build_pir_winxed(var kv[named, slurpy]) {
string flags = get_value('pir_winxed_flags', '':[named('default')], kv:[flat,named]);
var jobs = new 'ResizableStringArray'();
+
+ var temp;
+ ${ loadlib temp, 'os' };
+
for (string pir in hash) {
string winxed = hash[pir];
if (newer(pir, winxed)) continue;
mkpath(dirname(pir), 1:[named('verbose')]);
- string cmd = sprintf("%s --target=pir --output=%s %s %s", [
- get_winxed(), pir, flags, winxed
+ var os = new 'OS'();
+ string cwd = os.cwd();
+ string cmd = sprintf("cd %s; ./winxed --target=pir -o %s %s %s", [
+ get_winxed_dir(), cwd + '/' + pir, flags, cwd + '/' + winxed
]);
jobs.push(cmd);
@@ -99,6 +105,22 @@ function build_pir_winxed(var kv[named, slurpy]) {
/*
+=item C<get_winxed_dir()>
+
+Get the directory in which winxed lives
+
+=cut
+
+*/
+
+function get_winxed_dir() {
+ var env = new 'Env';
+ return env['WINXED_PATH'];
+}
+
+
+/*
+
=item C<clean_pir_winxed()>
cleanup PIR files generated from Winxed files
@@ -137,7 +159,9 @@ function build_c_dynext(kv[named, slurpy]) {
var opts = hash[dyn_name];
string dyn_file = dyn_filename(dyn_name);
- string ccflags = opts['ccflags'] + get_cflags();
+
+ string ccflags = opts['ccflags'];
+ ccflags += get_cflags();
// mostly taken from distutils.pir '__build_dynpmc_alone'
string ldflags = join(' ', [

0 comments on commit 99c68c6

Please sign in to comment.
Something went wrong with that request. Please try again.