|
| 1 | +// Copyright (C) 2012, Parrot Foundation. |
| 2 | + |
| 3 | +// Build system for PACT, using Rosella.Winxed.Distutils |
| 4 | + |
| 5 | +$loadlib "io_ops"; |
| 6 | +class OS; |
| 7 | + |
| 8 | +function main[main](var argv) { |
| 9 | + int exit_code = 0; |
| 10 | + |
| 11 | + try { |
| 12 | + // Load and setup Rosella.Winxed.Distutils |
| 13 | + load_bytecode('rosella/winxed.pbc'); |
| 14 | + Rosella.Winxed.Distutils.winxed_setup(); |
| 15 | + |
| 16 | + // Setup build hash |
| 17 | + var pact = { |
| 18 | + 'name' : 'PACT', |
| 19 | + 'abstract' : 'Parrot Alternate Compiler Toolkit', |
| 20 | + 'authority' : 'http://github.com/parrot', |
| 21 | + 'copyright_holder' : 'Parrot Foundation', |
| 22 | + 'keywords' : ['compiler'], |
| 23 | + 'license_type' : 'Artistic License 2.0', |
| 24 | + 'license_uri' : 'http://www.perlfoundation.org/artistic_license_2_0', |
| 25 | + 'checkout_uri' : 'git://github.com/parrot/PACT.git', |
| 26 | + 'browser_uri' : 'http://github.com/parrot/PACT', |
| 27 | + 'project_uri' : 'http://github.com/parrot/PACT', |
| 28 | + 'winxed_debug' : false, |
| 29 | + 'pir_winxed' : { 'src/disasm.pir': 'src/disasm.winxed' }, |
| 30 | + 'pbc_pir' : { 'src/disasm.pbc': 'src/disasm.pir' }, |
| 31 | + 'installable_pbc' : { 'pact_disasm': 'src/disasm.pbc' } |
| 32 | + }; |
| 33 | + |
| 34 | + // Invoke distutils |
| 35 | + argv.shift(); |
| 36 | + setup(argv, pact); |
| 37 | + } catch (e) { |
| 38 | + say(e['message']); |
| 39 | + for (string bt in e.backtrace_strings()) |
| 40 | + say(bt); |
| 41 | + exit_code = 1; |
| 42 | + } |
| 43 | + |
| 44 | + if (exit_code != 0) |
| 45 | + exit(exit_code); |
| 46 | +} |
0 commit comments