[svn:languages] r104 - in ecmascript/trunk: . config plumage
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Thu Dec 3 20:36:24 UTC 2009
Author: fperrad
Date: Thu Dec 3 20:36:23 2009
New Revision: 104
URL: https://trac.parrot.org/languages/changeset/104
Log:
[ecmascript] update infrastructure with setup.pir (distutils)
Added:
ecmascript/trunk/plumage/
ecmascript/trunk/plumage/ecmascript.json
ecmascript/trunk/setup.pir
Deleted:
ecmascript/trunk/Configure.pl
ecmascript/trunk/MANIFEST
ecmascript/trunk/config/
Modified:
ecmascript/trunk/ (props changed)
Deleted: ecmascript/trunk/Configure.pl
==============================================================================
--- ecmascript/trunk/Configure.pl Thu Dec 3 20:36:23 2009 (r103)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,66 +0,0 @@
-# Copyright (C) 2009, Parrot Foundation.
-# $Id$
-
-use strict;
-use warnings;
-use 5.008;
-
-# Get a list of parrot-configs to invoke.
-my @parrot_config_exe = (
- 'parrot/parrot_config',
- '../../parrot_config',
- 'parrot_config',
-);
-
-# Get configuration information from parrot_config
-my %config = read_parrot_config(@parrot_config_exe);
-unless (%config) {
- die "Unable to locate parrot_config.";
-}
-
-# Create the Makefile using the information we just got
-create_makefiles(%config);
-
-sub read_parrot_config {
- my @parrot_config_exe = @_;
- my %config = ();
- for my $exe (@parrot_config_exe) {
- no warnings;
- if (open my $PARROT_CONFIG, '-|', "$exe --dump") {
- print "Reading configuration information from $exe\n";
- while (<$PARROT_CONFIG>) {
- $config{$1} = $2 if (/(\w+) => '(.*)'/);
- }
- close $PARROT_CONFIG;
- last if %config;
- }
- }
- %config;
-}
-
-
-# Generate Makefiles from a configuration
-sub create_makefiles {
- my %config = @_;
- my %makefiles = (
- 'config/makefiles/root.in' => 'Makefile',
-# 'config/makefiles/pmc.in' => 'src/pmc/Makefile',
-# 'config/makefiles/ops.in' => 'src/ops/Makefile',
- );
- my $build_tool = $config{libdir} . $config{versiondir}
- . '/tools/dev/gen_makefile.pl';
-
- foreach my $template (keys %makefiles) {
- my $makefile = $makefiles{$template};
- print "Creating $makefile\n";
- system($config{perl}, $build_tool, $template, $makefile);
- }
-}
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
-
Deleted: ecmascript/trunk/MANIFEST
==============================================================================
--- ecmascript/trunk/MANIFEST Thu Dec 3 20:36:23 2009 (r103)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,34 +0,0 @@
-MAINTAINER [ecmascript]doc
-config/makefiles/root.in [ecmascript]
-js.pir [ecmascript]
-lib/Parrot/Test/JS.pm [ecmascript]
-lib/Parrot/Test/JS/PJS.pm [ecmascript]
-lib/Parrot/Test/JS/SpiderMonkey.pm [ecmascript]
-src/builtin/builtins.pir [ecmascript]
-src/classes/Array.pir [ecmascript]
-src/classes/Boolean.pir [ecmascript]
-src/classes/Completion.pir [ecmascript]
-src/classes/List.pir [ecmascript]
-src/classes/Null.pir [ecmascript]
-src/classes/Number.pir [ecmascript]
-src/classes/Object.pir [ecmascript]
-src/classes/Reference.pir [ecmascript]
-src/classes/String.pir [ecmascript]
-src/classes/Undefined.pir [ecmascript]
-src/parser/actions.pm [ecmascript]
-src/parser/grammar.pg [ecmascript]
-t/00-comments.t [test]
-t/01-literals.t [test]
-t/02-operators.t [test]
-t/02-sanity-var.t [test]
-t/harness [test]
-t/js_pt/00-template.t [test]
-t/js_pt/09-array.t [test]
-t/js_pt/09-array_literals.t [test]
-t/js_pt/10-version.t [test]
-t/js_pt/11-global_object.t [test]
-t/js_pt/12-regex.t [test]
-t/sanity_pt/00-literals.t [test]
-t/sanity_pt/01-vars.t [test]
-t/sanity_pt/03-boolean.t [test]
-t/sanity_pt/05-objects.t [test]
Added: ecmascript/trunk/plumage/ecmascript.json
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ ecmascript/trunk/plumage/ecmascript.json Thu Dec 3 20:36:23 2009 (r104)
@@ -0,0 +1,51 @@
+{
+ "meta-spec" : {
+ "version" : 1,
+ "uri" : "https://trac.parrot.org/parrot/wiki/ModuleEcosystem"
+ },
+ "general" : {
+ "name" : "ecmascript",
+ "abstract" : "aka JavaScript",
+ "version" : "HEAD",
+ "license" : {
+ "type" : "Artistic License 2.0",
+ "uri" : "http://www.perlfoundation.org/artistic_license_2_0"
+ },
+ "copyright_holder" : "Parrot Foundation",
+ "generated_by" : "distutils",
+ "keywords" : [],
+ "description" : "aka JavaScript"
+ },
+ "instructions" : {
+ "fetch" : {
+ "type" : "repository"
+ },
+ "build" : {
+ "type" : "parrot_setup"
+ },
+ "test" : {
+ "type" : "parrot_setup"
+ },
+ "install" : {
+ "type" : "parrot_setup"
+ }
+ },
+ "dependency-info" : {
+ "provides" : ["ecmascript"],
+ "requires" : {
+ "fetch" : ["svn"],
+ "build" : [],
+ "test" : ["perl5"],
+ "install" : [],
+ "runtime" : []
+ }
+ },
+ "resources" : {
+ "repository" : {
+ "type" : "svn",
+ "checkout_uri": "https://svn.parrot.org/languages/ecmascript/trunk",
+ "browser_uri" : "https://trac.parrot.org/languages/browser/ecmascript",
+ "project_uri" : "https://trac.parrot.org/parrot/wiki/Languages"
+ }
+ }
+}
Added: ecmascript/trunk/setup.pir
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ ecmascript/trunk/setup.pir Thu Dec 3 20:36:23 2009 (r104)
@@ -0,0 +1,90 @@
+#!/usr/bin/env parrot
+# Copyright (C) 2009, Parrot Foundation.
+# $Id: $
+
+=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'
+
+ .const 'Sub' testclean = 'testclean'
+ register_step_after('test', testclean)
+ register_step_after('clean', testclean)
+
+ $P0 = new 'Hash'
+ $P0['name'] = 'ecmascript'
+ $P0['abstract'] = 'aka JavaScript'
+ $P0['description'] = 'aka JavaScript'
+ $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'] = 'https://svn.parrot.org/languages/ecmascript/trunk'
+ $P0['browser_uri'] = 'https://trac.parrot.org/languages/browser/ecmascript'
+ $P0['project_uri'] = 'https://trac.parrot.org/parrot/wiki/Languages'
+
+ # 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'
+js.pir
+src/gen_grammar.pir
+src/gen_actions.pir
+src/builtin/builtins.pir
+src/classes/Object.pir
+src/classes/Array.pir
+src/classes/Boolean.pir
+src/classes/Null.pir
+SOURCES
+ $S0 = pop $P4
+ $P3['js.pbc'] = $P4
+ $P0['pbc_pir'] = $P3
+
+ $P5 = new 'Hash'
+ $P5['parrot-js'] = 'js.pbc'
+ $P0['installable_pbc'] = $P5
+
+ # test
+ $P0['harness_files'] = ''
+
+ # dist
+ $P9 = glob('lib/Parrot/Test/*.pm lib/Parrot/Test/JS/*.pm t/*.t t/js_pt/*.t t/sanity_pt/*.t')
+ $P0['manifest_includes'] = $P9
+
+ .tailcall setup(args :flat, $P0 :flat :named)
+.end
+
+.sub 'testclean' :anon
+ .param pmc kv :slurpy :named
+ .local string cmd
+ cmd = 'perl -MExtUtils::Command -e rm_f t/js_pt/*.js t/js_pt/*.out t/sanity_pt/*.js t/sanity_pt/*.out'
+ system(cmd)
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
More information about the parrot-commits
mailing list