Skip to content

Commit

Permalink
update infrastructure with setup.pir (distutils)
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Nov 28, 2009
1 parent c547886 commit d5c4641
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 248 deletions.
65 changes: 0 additions & 65 deletions Configure.pl

This file was deleted.

6 changes: 2 additions & 4 deletions README
@@ -1,7 +1,5 @@
Run:

$ cd languages
$ cd gil
$ perl Configure.pl
$ make
$ parrot setup.pir
$ parrot setup.pir test

170 changes: 0 additions & 170 deletions config/makefiles/root.in

This file was deleted.

2 changes: 1 addition & 1 deletion gil.pir
Expand Up @@ -50,7 +50,7 @@ to the gil compiler.
.end
.include 'src/gen_builtins.pir'
.include 'src/builtins.pir'
.include 'src/gen_grammar.pir'
.include 'src/gen_actions.pir'
Expand Down
75 changes: 75 additions & 0 deletions setup.pir
@@ -0,0 +1,75 @@
#! /usr/local/bin/parrot

=head1 NAME

setup.pir - Python distutils style

=head1 DESCRIPTION

No Configure step, no Makefile generated.

=head1 USAGE

$ parrot setup.pir build
$ parrot setup.pir test
$ sudo parrot setup.pir install

=cut

.sub 'main' :main
.param pmc args
$S0 = shift args
load_bytecode 'distutils.pbc'

$P0 = new 'Hash'
$P0['name'] = 'gil'
$P0['abstract'] = 'Generic Imperative Language'
$P0['authority'] = 'http://github.com/tene'
$P0['description'] = 'Generic Imperative Language - demo language for parrot'
$P0['license_type'] = 'Artistic License 2.0'
$P0['license_uri'] = 'http://www.perlfoundation.org/artistic_license_2_0'
$P0['copyright_holder'] = 'Parrot Foundation'
$P0['checkout_uri'] = 'git://github.com/tene/gil.git'
$P0['browser_uri'] = 'http://github.com/tene/gil'
$P0['project_uri'] = 'http://github.com/tene/gil'

# build
$P1 = new 'Hash'
$P1['src/gen_grammar.pir'] = 'src/parser/grammar.pg'
$P0['pir_pge'] = $P1

$P2 = new 'Hash'
$P2['src/gen_actions.pir'] = 'src/parser/actions.pm'
$P0['pir_nqp'] = $P2

$P3 = new 'Hash'
$P4 = split "\n", <<'SOURCES'
gil.pir
src/gen_grammar.pir
src/gen_actions.pir
src/builtins.pir
src/builtins/math.pir
src/builtins/say.pir
SOURCES
$S0 = pop $P4
$P3['gil.pbc'] = $P4
$P0['pbc_pir'] = $P3

$P5 = new 'Hash'
$P5['parrot-gil'] = 'gil.pbc'
$P0['installable_pbc'] = $P5

# test
$S0 = get_parrot()
$S0 .= ' gil.pbc'
$P0['prove_exec'] = $S0

.tailcall setup(args :flat, $P0 :flat :named)
.end


# Local Variables:
# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
9 changes: 9 additions & 0 deletions src/builtins.pir
@@ -0,0 +1,9 @@

.include 'src/builtins/math.pir'
.include 'src/builtins/say.pir'

# Local Variables:
# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
8 changes: 0 additions & 8 deletions t/harness

This file was deleted.

0 comments on commit d5c4641

Please sign in to comment.