perl.cvs.mod_parrot
[Top] [All Lists]

[svn:mod_parrot] r377 - in mod_parrot/branches/configure: . config/init

Subject: [svn:mod_parrot] r377 - in mod_parrot/branches/configure: . config/init
From: particle@xxxxxxxxxxxx
Date: Thu, 24 Jul 2008 11:15:28 -0700 (PDT)
Newsgroups: perl.cvs.mod_parrot

Author: particle
Date: Thu Jul 24 11:15:27 2008
New Revision: 377

Modified:
   mod_parrot/branches/configure/Configure.pl
   mod_parrot/branches/configure/config/init/defaults.pm

Log:
[config] add more info to init::defaults

Modified: mod_parrot/branches/configure/Configure.pl
==============================================================================
--- mod_parrot/branches/configure/Configure.pl  (original)
+++ mod_parrot/branches/configure/Configure.pl  Thu Jul 24 11:15:27 2008
@@ -175,10 +175,13 @@
 
     my( $var, $val, undef, $stash )= @_;
     my $args = ModParrot::Configure::Options::process_options( {
-        argv               => [ defined $val ? $val : @ARGV ],
-        script             => $0,
-        mod_parrot_version => $stash->{MODPARROT}{mod_parrot_version},
-        svnid              => '$Id$',
+        argv                 => [ defined $val ? $val : @ARGV ],
+        script               => $0,
+        mod_parrot_version   => $stash->{MODPARROT}{mod_parrot_version},
+        svnid                => '$Id$',
+## TODO figure out where to store this info
+##        'parrot-build-dir=s' => \$parrot_build_dir,
+##        'apxs=s'             => \$apxs
     } );
     # XXX really? just exit? it should give a friendly message
     exit unless defined $args;
@@ -252,32 +255,11 @@
 __END__
 
 
-## step commandline config
-my $res = GetOptions(
-    'parrot-build-dir=s' => \$parrot_build_dir,
-    'apxs=s' => \$apxs
-);
-
-$res || die "error while parsing options";
-
-sub parrot_config
-{
-    my $config = shift;
-    my $value = `$parrot_build_dir/parrot_config $config`;
-    chomp($value);
-    return $value;
-}
-
-$| = 1;
-
-print "\n";
+## step process_opts -- THE REST IS LEFTOVERS
 
 # defines to pass to compiler
 my $defines;
 
-# debugging flags for developers
-my $debug = $ENV{'MP_DEBUG'};
-
 
 ## step probe::apache
 # apache configs
@@ -300,12 +282,6 @@
 my $cflags = " -I$parrot_build_dir/include -Iinclude";
 $cflags .= " -DMPM_IS_THREADED" if (mpm_is_threaded($mpm));
 
-## step probe::parrot
-my $libs = parrot_config('libs') . " -lparrot";
-my $blib_dir = parrot_config('blib_dir');
-my $ldflags = parrot_config('libparrot_ldflags') .
-    " -R$parrot_build_dir/$blib_dir";;
-
 
 ## step gen::makefile
 print "Generating Makefile...";

Modified: mod_parrot/branches/configure/config/init/defaults.pm
==============================================================================
--- mod_parrot/branches/configure/config/init/defaults.pm       (original)
+++ mod_parrot/branches/configure/config/init/defaults.pm       Thu Jul 24 
11:15:27 2008
@@ -18,6 +18,7 @@
 use base qw(ModParrot::Configure::Step);
 
 ##  TODO this hardcoded setup *must* be replaced with something smarter
+##  probably split out the parrot config stuff into a probe at a later time
 use lib '../lib', '/usr/local/parrot/trunk/lib';
 use Parrot::Config;
 
@@ -36,16 +37,27 @@
 
     # We need a Glossary somewhere!
     $conf->data->set(
-        parrot_build_dir => '../parrot',
-        apxs             => '/usr/local/apache/bin/apxs',
+        parrot_build_dir => $conf->options->get('parrot_build_dir')
+                            || '../parrot',
+        apxs             => $conf->options->get('apxs')
+                            || '/usr/local/apache/bin/apxs',
         perl             => $^X,
 
-        debugging => $conf->options->get('debugging') ? 1 : 0,
-        optimize  => '',
-        verbose   => $conf->options->get('verbose'),
+        debug            => ( $conf->options->get('debug') || $ENV{'MP_DEBUG'} 
)
+                            ? 1 : 0,
+        optimize         => '',
+        verbose          => $conf->options->get('verbose'),
 
-        cflags    => $PConfig{cflags},
-        make      => $PConfig{make},
+        cflags           => $PConfig{cflags},
+        make             => $PConfig{make},
+
+        libs             => $PConfig{libs} . ' -lparrot',
+        blib_dir         => $PConfig{blib_dir},
+    );
+
+    $conf->data->set( ldflags =>
+        $conf->data->get('parrot_build_dir')
+        . '/' . $conf->data->get('blib_dir')
     );
 
     return $self;

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:mod_parrot] r377 - in mod_parrot/branches/configure: . config/init, particle <=