[svn:parrot] r38364 - trunk/tools/dev
allison at svn.parrot.org
allison at svn.parrot.org
Sun Apr 26 06:01:04 UTC 2009
Author: allison
Date: Sun Apr 26 06:01:01 2009
New Revision: 38364
URL: https://trac.parrot.org/parrot/changeset/38364
Log:
[tools] Make it possible to run the language shell generator outside the
parrot build tree. Change it so the default isn't adding the new
language under "languages/..." in Parrot's build directory, since that's
not the common case anymore.
Modified:
trunk/tools/dev/mk_language_shell.pl
Modified: trunk/tools/dev/mk_language_shell.pl
==============================================================================
--- trunk/tools/dev/mk_language_shell.pl Sun Apr 26 02:58:03 2009 (r38363)
+++ trunk/tools/dev/mk_language_shell.pl Sun Apr 26 06:01:01 2009 (r38364)
@@ -22,12 +22,12 @@
new language translator in Parrot. The first argument is the
name of the language to be built. The C<path> argument
says where to populate the directory, if no C<path> is specified
-then it is taken to be a subdirectory in F<languages/> (with the
-name of the directory converted to lowercase).
+then it is taken to be a subdirectory of the current directory
+with the same name as the language (converted to lowercase).
For a language 'Xyz', this script will create the following
files and directories (relative to C<path>, which defaults
-to F<languages/xyz> if an explicit C<path> isn't given):
+to F<xyz> if an explicit C<path> isn't given):
README
Configure.pl
@@ -69,10 +69,12 @@
use strict;
use warnings;
-use lib 'lib';
use File::Path;
use File::Spec;
use Getopt::Long;
+use FindBin qw($Bin);
+use lib "$Bin/../lib"; # install location
+use lib "$Bin/../../lib"; # build location
use Parrot::Config qw/ %PConfig /;
my ($with_doc, $with_ops, $with_pmc);
@@ -101,9 +103,9 @@
my $no_pmc = $with_pmc ? '' : '#';
## get the path from the command line, or if not supplied then
-## use languages/$lclang.
+## use $lclang.
my $path = $ARGV[1] ||
- "$PConfig{build_dir}$PConfig{slash}languages$PConfig{slash}$lclang";
+ "$lclang";
## now loop through the file information (see below), substituting
## any instances of @lang@, @lclang@, @UCLANG@, and @Id@ with
@@ -131,7 +133,7 @@
## build the initial makefile if no path was specified on command line
unless ($ARGV[1]) {
my $reconfigure = "$PConfig{perl} Configure.pl";
- system("cd languages && cd $lclang && $reconfigure");
+ system("cd $lclang && $reconfigure");
}
## we're done
More information about the parrot-commits
mailing list