Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 139 lines (126 sloc) 7.463 kB
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
1 #!/usr/bin/env parrot-nqp
2
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
3 sub MAIN() {
4 # Load distutils library
5 pir::load_bytecode('distutils.pbc');
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
6
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
7 # ALL DISTUTILS CONFIGURATION IN THIS HASH
8 my %cfg := hash(
9 # metadata
10 setup => 'setup.nqp',
11 name => 'tree-optimization',
12 abstract => 'Library for analysis, pattern-matching, and transformation of Trees.',
13 keywords => < parrot optimization pattern pct >,
14 license_type => 'Artistic License 2.0',
15 license_uri => 'http://www.perlfoundation.org/artistic_license_2_0',
16 copyright_holder => 'Tyler L. Curtis',
17 authority => 'http://github.com/ekiru',
18 checkout_uri => 'git://github.com/ekiru/tree-optimization.git',
19 browser_uri => 'http://github.com/ekiru/tree-optimization',
20 project_uri => 'http://github.com/ekiru/tree-optimization',
21 description => 'A library for analysis, pattern-matching, and transformation of trees.',
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
22
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
23 # build
24 pir_nqp => unflatten(
c7ba4aa Add PAST::Optimizer and PAST::Optimizer::Pass.
tcurtis authored
25 'build/PAST/Optimizer.pir', 'src/PAST/Optimizer.nqp',
26 'build/PAST/Optimizer/CombinedPass.pir', 'src/PAST/Optimizer/CombinedPass.nqp',
27 'build/PAST/Optimizer/Pass.pir', 'src/PAST/Optimizer/Pass.nqp',
28 'build/PAST/Optimizer/Transformers.pir', 'src/PAST/Optimizer/Transformers.nqp',
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
29 'build/PAST/Pattern.pir', 'src/PAST/Pattern.nqp',
30 'build/PAST/Pattern/Transformer.pir', 'src/PAST/Pattern/Transformer.nqp',
31 'build/PAST/Transformer.pir', 'src/PAST/Transformer.nqp',
32 'build/PAST/Transformer/Dynamic.pir', 'src/PAST/Transformer/Dynamic.nqp',
33 'build/PAST/Walker.pir', 'src/PAST/Walker.nqp',
34 'build/PAST/Walker/Dynamic.pir', 'src/PAST/Walker/Dynamic.nqp',
35 'build/PCT/Pattern.pir', 'src/PCT/Pattern.nqp',
36 'build/POST/Pattern.pir', 'src/POST/Pattern.nqp',
db83e6f Tree::Optimizer class that can do...nothing.
tcurtis authored
37 'build/Tree/Optimizer.pir', 'src/Tree/Optimizer.nqp',
caae635 Implement :combine.
tcurtis authored
38 'build/Tree/Optimizer/CombinedPass.pir', 'src/Tree/Optimizer/CombinedPass.nqp',
c1a28e1 Implement find-pass.
tcurtis authored
39 'build/Tree/Optimizer/Pass.pir', 'src/Tree/Optimizer/Pass.nqp',
da979a4 Add support for :recursive, though :when and :recursive still don't w…
tcurtis authored
40 'build/Tree/Optimizer/Transformers.pir', 'src/Tree/Optimizer/Transformers.nqp',
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
41 'build/Tree/Pattern.pir', 'src/Tree/Pattern.nqp',
42 'build/Tree/Pattern/Any.pir', 'src/Tree/Pattern/Any.nqp',
43 'build/Tree/Pattern/Closure.pir', 'src/Tree/Pattern/Closure.nqp',
44 'build/Tree/Pattern/Constant.pir', 'src/Tree/Pattern/Constant.nqp',
45 'build/Tree/Pattern/Match.pir', 'src/Tree/Pattern/Match.nqp',
46 'build/Tree/Pattern/Transformer.pir', 'src/Tree/Pattern/Transformer.nqp',
47 'build/Tree/Transformer.pir', 'src/Tree/Transformer.nqp',
48 'build/Tree/Walker.pir', 'src/Tree/Walker.nqp',
49 ),
50 pbc_pir => unflatten(
c7ba4aa Add PAST::Optimizer and PAST::Optimizer::Pass.
tcurtis authored
51 'build/PAST/Optimizer.pbc', 'build/PAST/Optimizer.pir',
52 'build/PAST/Optimizer/CombinedPass.pbc', 'build/PAST/Optimizer/CombinedPass.pir',
53 'build/PAST/Optimizer/Pass.pbc', 'build/PAST/Optimizer/Pass.pir',
54 'build/PAST/Optimizer/Transformers.pbc', 'build/PAST/Optimizer/Transformers.pir',
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
55 'build/PAST/Pattern.pbc', 'build/PAST/Pattern.pir',
56 'build/PAST/Pattern/Transformer.pbc', 'build/PAST/Pattern/Transformer.pir',
57 'build/PAST/Transformer.pbc', 'build/PAST/Transformer.pir',
58 'build/PAST/Transformer/Dynamic.pbc', 'build/PAST/Transformer/Dynamic.pir',
59 'build/PAST/Walker.pbc', 'build/PAST/Walker.pir',
60 'build/PAST/Walker/Dynamic.pbc', 'build/PAST/Walker/Dynamic.pir',
61 'build/PCT/Pattern.pbc', 'build/PCT/Pattern.pir',
62 'build/POST/Pattern.pbc', 'build/POST/Pattern.pir',
db83e6f Tree::Optimizer class that can do...nothing.
tcurtis authored
63 'build/Tree/Optimizer.pbc', 'build/Tree/Optimizer.pir',
caae635 Implement :combine.
tcurtis authored
64 'build/Tree/Optimizer/CombinedPass.pbc', 'build/Tree/Optimizer/CombinedPass.pir',
c1a28e1 Implement find-pass.
tcurtis authored
65 'build/Tree/Optimizer/Pass.pbc', 'build/Tree/Optimizer/Pass.pir',
da979a4 Add support for :recursive, though :when and :recursive still don't w…
tcurtis authored
66 'build/Tree/Optimizer/Transformers.pbc', 'build/Tree/Optimizer/Transformers.pir',
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
67 'build/Tree/Pattern.pbc', 'build/Tree/Pattern.pir',
68 'build/Tree/Pattern/Any.pbc', 'build/Tree/Pattern/Any.pir',
69 'build/Tree/Pattern/Closure.pbc', 'build/Tree/Pattern/Closure.pir',
70 'build/Tree/Pattern/Constant.pbc', 'build/Tree/Pattern/Constant.pir',
71 'build/Tree/Pattern/Match.pbc', 'build/Tree/Pattern/Match.pir',
72 'build/Tree/Pattern/Transformer.pbc', 'build/Tree/Pattern/Transformer.pir',
73 'build/Tree/Transformer.pbc', 'build/Tree/Transformer.pir',
74 'build/Tree/Walker.pbc', 'build/Tree/Walker.pir',
75 ),
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
76
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
77 # test
78 test_exec => get_parrot() ~ ' --library build '
79 ~ get_libdir() ~ '/library/nqp-rx.pbc',
80 test_files => 't/*.t',
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
81
0081995 @leto Add smoke target to setup.nqp, tadzik++
leto authored
82 # smoke
83 smolder_url => 'http://smolder.parrot.org/app/projects/process_add_report/9',
84 smolder_comments => 'tree-optimization',
85 smolder_tags => get_tags(),
86 prove_archive => 'report.tar.gz',
87
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
88 # install
89 inst_lib => <
c7ba4aa Add PAST::Optimizer and PAST::Optimizer::Pass.
tcurtis authored
90 build/PAST/Optimizer.pbc
91 build/PAST/Optimizer/CombinedPass.pbc
92 build/PAST/Optimizer/Pass.pbc
93 build/PAST/Optimizer/Transformers.pbc
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
94 build/PAST/Pattern.pbc
95 build/PAST/Pattern/Transformer.pbc
96 build/PAST/Transformer.pbc
97 build/PAST/Transformer/Dynamic.pbc
98 build/PAST/Walker.pbc
99 build/PAST/Walker/Dynamic.pbc
100 build/PCT/Pattern.pbc
101 build/POST/Pattern.pbc
db83e6f Tree::Optimizer class that can do...nothing.
tcurtis authored
102 build/Tree/Optimizer.pbc
caae635 Implement :combine.
tcurtis authored
103 build/Tree/Optimizer/CombinedPass.pbc
c1a28e1 Implement find-pass.
tcurtis authored
104 build/Tree/Optimizer/Pass.pbc
da979a4 Add support for :recursive, though :when and :recursive still don't w…
tcurtis authored
105 build/Tree/Optimizer/Transformers.pbc
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
106 build/Tree/Pattern.pbc
107 build/Tree/Pattern/Any.pbc
108 build/Tree/Pattern/Closure.pbc
109 build/Tree/Pattern/Constant.pbc
110 build/Tree/Pattern/Match.pbc
111 build/Tree/Pattern/Transformer.pbc
112 build/Tree/Transformer.pbc
113 build/Tree/Walker.pbc
114 >,
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
115
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
116 # dist
117 manifest_includes => glob('examples/*.pir examples/*.nqp'),
118 doc_files => glob('README docs/*/*.pod docs/*/*/*.pod'),
119 );
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
120
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
121 # Boilerplate; should not need to be changed
122 my @*ARGS := pir::getinterp__P()[2];
123 @*ARGS.shift;
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
124
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
125 setup(@*ARGS, %cfg);
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
126 }
127
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
128 # Work around minor nqp-rx limitations
129 sub hash (*%h ) { %h }
130 sub unflatten(*@kv) { my %h; for @kv -> $k, $v { %h{$k} := $v }; %h }
d894821 Start transitioning to distutils.
Tyler Leslie Curtis authored
131
0081995 @leto Add smoke target to setup.nqp, tadzik++
leto authored
132 sub get_tags() {
133 my $r := get_config();
134 $r<osname> ~ ', ' ~ $r<archname> ~ ', tree-optimizations'
135 }
136
7137e25 Cleaned up setup.nqp, courtesy of fperrad++.
Tyler Leslie Curtis authored
137 # Start it up!
138 MAIN();
Something went wrong with that request. Please try again.