Front page | perl.ponie.changes |
Postings from March 2006
[svn:ponie] r390 - trunk
From:
nicholas
Date:
March 11, 2006 04:16
Subject:
[svn:ponie] r390 - trunk
Message ID:
20060311121603.1A5D9CBA2B@x12.develooper.com
Author: nicholas
Date: Sat Mar 11 04:16:02 2006
New Revision: 390
Modified:
trunk/Configure.pl
Log:
A more general solution to linking with the correct libraries for parrot.
Diagnose the problem of make depend being interrupted.
Modified: trunk/Configure.pl
==============================================================================
--- trunk/Configure.pl (original)
+++ trunk/Configure.pl Sat Mar 11 04:16:02 2006
@@ -113,41 +113,45 @@
open (FH, "config.sh") or die $!;
local $/;
- $_ = <FH>;
+ my $config_sh = <FH>;
close FH or die $!;
my %munge;
my $bonus_libs = '';
if ($^O eq 'solaris') {
- $bonus_libs = '-lrt ';
+ $bonus_libs = ' -lrt';
}
# Avoid the dynamic libparrot for now, as using it uninstalled requires
# messing with the dynamic library load path.
$bonus_libs
.= "-lponie -lparrot -lponie";
- if (" $Parrot::Config::PConfig{libs} " =~ / -lgmp /) {
- $bonus_libs .= " -lgmp";
+ my ($perllibs) = $config_sh =~ /^perllibs='([^']*)'$/m;
+ my %seen_libs;
+ @seen_libs{$perllibs =~ /-l(\S+)/g} = ();
+ foreach ($Parrot::Config::PConfig{libs} =~ /-l(\S+)/g) {
+ next if exists $seen_libs{$_};
+ $bonus_libs .= " -l$_";
}
$munge{cppflags} = $munge{ccflags} = join '', map {" -I$_" } @inc_path;
$munge{ldflags} = $munge{lddlflags} = join '', map " -L$_", @lib_path;
- $munge{libs} = $munge{perllibs} = "$bonus_libs ";
+ $munge{libs} = $munge{perllibs} = $bonus_libs;
$munge{libpth} = join " ", @lib_path;
# Put new text that the front. This gives our things priority. For example,
# it ensures that our copy of ICU is found ahead of the system's.
while (my ($key, $value) = each %munge) {
- s/(^$key=')([^']*)'$/$1$value $2'/m
+ $config_sh =~ s/(^$key=')([^']*)'$/$1$value $2'/m
or die "Can't find config.sh line for $key";
}
# Maximal match, but within the same line
- s!(startperl=.*/p)erl!$1onie!;
- s!(perlpath=.*/p)erl!$1onie!;
+ $config_sh =~ s!(startperl=.*/p)erl!$1onie!;
+ $config_sh =~ s!(perlpath=.*/p)erl!$1onie!;
rename "config.sh", "config.sh.before";
open (FH, ">config.sh") or die $!;
- print FH or die $!;
+ print FH $config_sh or die $!;
close FH or die $!;
system ('sh','Configure','-S') && die "error";
@@ -157,7 +161,14 @@
unless (-e $firstmakefile) {
system ("make depend") && die "error";
- open (FH, $firstmakefile) or die $!;
+ unless (open (FH, $firstmakefile)) {
+ warn <<"EOM"
+make depend still seems to be running, or has left the directory .depending
+You may need to delete perl/.depending by hand
+EOM
+ if -d ".depending";
+ die "Can't open '$firstmakefile': $!";
+ }
# When building dependencies some gccs manage to notice all the #line
# directives in parrot/platform.h and think that they are real files to
# depend on.
-
[svn:ponie] r390 - trunk
by nicholas