Skip to content

Commit

Permalink
add rule 'pir_winxed' to build and clean steps of distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
NotFound committed Jun 30, 2011
1 parent 1f22953 commit f33bce0
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions runtime/parrot/library/distutils.pir
Expand Up @@ -214,6 +214,8 @@ L<http://github.com/ekiru/tree-optimization/blob/master/setup.nqp>
register_step_after('build', _build_pir_tge)
.const 'Sub' _build_pir_nqp_rx = '_build_pir_nqp_rx'
register_step_after('build', _build_pir_nqp_rx)
.const 'Sub' _build_pir_winxed = '_build_pir_winxed'
register_step_after('build', _build_pir_winxed)
.const 'Sub' _build_inc_pir = '_build_inc_pir'
register_step_after('build', _build_inc_pir)
.const 'Sub' _build_pir_pir = '_build_pir_pir'
Expand Down Expand Up @@ -241,6 +243,8 @@ L<http://github.com/ekiru/tree-optimization/blob/master/setup.nqp>
register_step_after('clean', _clean_pir_tge)
.const 'Sub' _clean_pir_nqp_rx = '_clean_pir_nqp_rx'
register_step_after('clean', _clean_pir_nqp_rx)
.const 'Sub' _clean_pir_winxed = '_clean_pir_winxed'
register_step_after('clean', _clean_pir_winxed)
.const 'Sub' _clean_inc_pir = '_clean_inc_pir'
register_step_after('clean', _clean_inc_pir)
.const 'Sub' _clean_pir_pir = '_clean_pir_pir'
Expand Down Expand Up @@ -818,6 +822,51 @@ the value is an array of PIR pathname
L2:
.end

=item pir_winxed

hash

the key is the PIR pathname

the value is the Winxed pathname

=cut

.sub '_build_pir_winxed' :anon
.param pmc kv :slurpy :named
$I0 = exists kv['pir_winxed']
unless $I0 goto L1
$P0 = kv['pir_winxed']
build_pir_winxed($P0)
L1:
.end

.sub 'build_pir_winxed'
.param pmc hash
.local pmc jobs
jobs = new 'ResizableStringArray'
$P0 = iter hash
L1:
unless $P0 goto L2
.local string pir, winxed
pir = shift $P0
winxed = hash[pir]
$I0 = newer(pir, winxed)
if $I0 goto L1
$S0 = dirname(pir)
mkpath($S0, 1 :named('verbose'))
.local string cmd
cmd = get_winxed()
cmd .= " -c -o"
cmd .= pir
cmd .= " "
cmd .= winxed
push jobs, cmd
goto L1
L2:
.tailcall run_jobs(jobs)
.end

=item pir_pir (concat)

hash
Expand Down Expand Up @@ -1659,6 +1708,19 @@ the value is the POD pathname
L3:
.end

=item pir_winxed

=cut

.sub '_clean_pir_winxed' :anon
.param pmc kv :slurpy :named
$I0 = exists kv['pir_winxed']
unless $I0 goto L1
$P0 = kv['pir_winxed']
clean_key($P0)
L1:
.end

=item pbc_pbc

=cut
Expand Down Expand Up @@ -4407,6 +4469,18 @@ Return the whole config

=cut

=item get_winxed

=cut

.sub 'get_winxed'
.tailcall get_executable('winxed')
.end

=item get_srcdir

=cut

.sub 'get_srcdir'
$P0 = get_config()
$S0 = $P0['srcdir']
Expand Down

0 comments on commit f33bce0

Please sign in to comment.