diff --git a/MANIFEST b/MANIFEST index 94346e2..941df17 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2058,8 +2058,6 @@ t/tools/dump_pbc.t [test] t/tools/install/01-create_directories.t [test] t/tools/install/02-install_files.t [test] t/tools/install/03-lines_to_files.t [test] -t/tools/install/dev_overall.t [test] -t/tools/install/overall.t [test] t/tools/install/testlib/LICENSE [test] t/tools/install/testlib/MANIFEST.1defective [test] t/tools/install/testlib/README []doc diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in index 9d81529..1936789 100644 --- a/config/gen/makefiles/root.in +++ b/config/gen/makefiles/root.in @@ -859,7 +859,7 @@ $(PARROT) : frontend/parrot/main$(O) $(GEN_HEADERS) $(LIBPARROT) \ $(MINIPARROT) $(LINK) @ld_out@$@ \ frontend/parrot/main$(O) src/parrot_config$(O) src/longopt$(O) \ - @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) + $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 $(PBC_TO_EXE) : $(DEV_TOOLS_DIR)/pbc_to_exe.pir runtime/parrot/library/config.pir $(PARROT) $(DYNEXT_DIR)/os$(LOAD_EXT) $(DYNEXT_DIR)/file$(LOAD_EXT) @@ -885,7 +885,7 @@ $(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) $(PBC_TO_EXE) $(MINIPARROT) : frontend/parrot/main$(O) include/parrot/api.h include/parrot/longopt.h $(LIBPARROT) \ src/null_config$(O) src/longopt$(O) $(LINK) @ld_out@$@ frontend/parrot/main$(O) src/null_config$(O) src/longopt$(O) \ - @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) + $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 $(INSTALLABLEPARROT) : frontend/parrot/main$(O) $(GEN_HEADERS) $(LIBPARROT) \ @@ -1056,7 +1056,7 @@ $(PDB) : frontend/parrot_debugger/main$(O) src/parrot_config$(O) $(LIBPARROT) $(LINK) @ld_out@$@ \ frontend/parrot_debugger/main$(O) \ src/parrot_config$(O) \ - @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) + $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 $(INSTALLABLEPDB) : frontend/parrot_debugger/main$(O) $(LIBPARROT) src/parrot_config$(O) @@ -1080,7 +1080,7 @@ $(DIS) : src/pbc_disassemble$(O) $(LIBPARROT) $(LINK) @ld_out@$@ \ src/pbc_disassemble$(O) \ src/longopt$(O) \ - @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) + $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 $(INSTALLABLEDIS) : src/pbc_disassemble$(O) \ @@ -1101,7 +1101,7 @@ $(PDUMP) : frontend/pbc_dump/main$(O) frontend/pbc_dump/packdump$(O) $(LIBPARROT $(LINK) @ld_out@$@ \ frontend/pbc_dump/main$(O) \ src/longopt$(O) \ - frontend/pbc_dump/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) + frontend/pbc_dump/packdump$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 frontend/pbc_dump/main$(O) : \ @@ -1134,7 +1134,7 @@ $(PBC_MERGE) : frontend/pbc_merge/main$(O) $(LIBPARROT) src/parrot_config$(O) frontend/pbc_merge/main$(O) \ src/parrot_config$(O) \ src/longopt$(O) \ - @rpath_blib@ $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS) + $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 $(INSTALLABLEPBC_MERGE) : frontend/pbc_merge/main$(O) $(LIBPARROT) $(INSTALLABLECONFIG) @@ -2872,7 +2872,7 @@ win32-inno-installer : world installable ############################################################################### exec : src/parrot_config$(O) $(LIBPARROT) - $(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) + $(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) ###### OS depend targets ########## diff --git a/config/init/hints/darwin.pm b/config/init/hints/darwin.pm index 2f6184f..82820fd 100644 --- a/config/init/hints/darwin.pm +++ b/config/init/hints/darwin.pm @@ -43,7 +43,7 @@ sub runstep { _set_deployment_environment(); my $lib_dir = $conf->data->get('build_dir') . "/blib/lib"; - $flagsref->{ldflags} .= " -L$lib_dir"; + $flagsref->{ldflags} .= ' -L"' . $lib_dir . '"'; if ($ENV{'MACOSX_DEPLOYMENT_TARGET'} eq '10.6') { $flagsref->{ccflags} .= ' -pipe -fno-common '; @@ -91,9 +91,9 @@ sub runstep { libparrot_shared_alias => "libparrot$share_ext", rpath => "-L", libparrot_soname => "-install_name " - . $lib_dir + . '"'. $lib_dir . '/libparrot' - . $conf->data->get('share_ext') + . $conf->data->get('share_ext') . '"' ); } diff --git a/config/inter/libparrot.pm b/config/inter/libparrot.pm index ab2f541..03af147 100644 --- a/config/inter/libparrot.pm +++ b/config/inter/libparrot.pm @@ -83,10 +83,10 @@ sub runstep { $conf->data->set( rpath_blib => ( ! $disable_rpath && $parrot_is_shared && $conf->data->get('rpath') ) - ? $conf->data->get('rpath') - . '"' . $conf->data->get('build_dir') . '"' + ? '"' . $conf->data->get('rpath') + . $conf->data->get('build_dir') . '/' - . $conf->data->get('blib_dir') + . $conf->data->get('blib_dir') . '"' : '' ); diff --git a/t/tools/install/dev_overall.t b/t/tools/install/dev_overall.t deleted file mode 100644 index 16dd741..0000000 --- a/t/tools/install/dev_overall.t +++ /dev/null @@ -1,184 +0,0 @@ -#! perl -# Copyright (C) 2007-2008, Parrot Foundation. -# dev_overall.t - -use strict; -use warnings; -use Test::More tests => 4; -use Carp; -use Cwd; -use File::Basename; -use File::Copy; -use File::Path qw( mkpath ); -use File::Spec (); -use File::Temp qw( tempdir ); -use lib qw( lib ); -use Parrot::Config qw( %PConfig ); -use IO::CaptureOutput qw( capture ); - -my $DEBUG = 0; - -my $cwd = cwd(); -my $installer = File::Spec->catfile( 'tools', 'dev', 'install_dev_files.pl' ); -my $full_installer = File::Spec->catfile( $cwd, $installer ); -ok(-f $full_installer, "Able to locate $installer"); - -my $testlibdir = File::Spec->catdir( qw| t tools install testlib | ); -my $man_pseudo = File::Spec->catfile( $testlibdir, q|dev_manifest_pseudo| ); -my $full_man_pseudo = File::Spec->catfile( $cwd, $man_pseudo ); -my $gen_pseudo = File::Spec->catfile( $testlibdir, q|dev_generated_pseudo| ); -my $full_gen_pseudo = File::Spec->catfile( $cwd, $gen_pseudo ); - -{ - my $builddir = tempdir( CLEANUP => 1 ); - my $prefixdir = tempdir( CLEANUP => 1 ); - if ($DEBUG) { - print STDERR "$builddir\n$prefixdir\n"; - } - - my $includedir = File::Spec->catdir( $prefixdir, 'include' ); - my $libdir = File::Spec->catdir( $prefixdir, 'lib' ); - my $docdir = File::Spec->catdir( $prefixdir, 'share', 'doc' ); - my $srcdir = File::Spec->catdir( $prefixdir, 'src' ); - my $versiondir = $PConfig{versiondir}; - - my %testfiles = ( - 'compilers/nqp/bootstrap/actions.pm' => { - start => File::Spec->catfile( - qw| . compilers nqp bootstrap actions.pm | ), - end => File::Spec->catfile( - $libdir, $versiondir, 'languages', 'nqp', 'bootstrap', 'actions.pm' ), - }, - 'lib/Parrot/Configure.pm' => { - start => File::Spec->catfile( - qw| . lib Parrot Configure.pm | ), - end => File::Spec->catfile( - $libdir, $versiondir, 'tools', 'lib', 'Parrot', 'Configure.pm' ), - }, - 'src/ops/ops.num' => { - start => File::Spec->catfile( - qw| . src ops ops.num | ), - end => File::Spec->catfile( - $srcdir, $versiondir, 'ops', 'ops.num' ), - }, - 'tools/build/ops2c.pl' => { - start => File::Spec->catfile( - qw| . tools build ops2c.pl | ), - end => File::Spec->catfile( - $libdir, $versiondir, 'tools', 'build', 'ops2c.pl' ), - }, - 'runtime/parrot/library/TGE.pbc' => { - start => File::Spec->catfile( - qw| . runtime parrot library TGE.pbc | ), - end => File::Spec->catfile( - $libdir, $versiondir, 'library', 'TGE.pbc' ), - }, - 'src/pmc/pmc_object.h' => { - start => File::Spec->catfile( - qw| . src pmc pmc_object.h | ), - end => File::Spec->catfile( - $includedir, $versiondir, 'pmc', 'pmc_object.h' ), - }, - 'vtable.dump' => { - start => File::Spec->catfile( - qw| . vtable.dump | ), - end => File::Spec->catfile( - $srcdir, $versiondir, 'vtable.dump' ), - }, - ); - chdir $builddir or croak "Unable to change to tempdir for testing: $!"; - my $man_quasi = File::Spec->catfile( $builddir, 'MANIFEST' ); - my $gen_quasi = File::Spec->catfile( $builddir, 'MANIFEST.generated' ); - copy $full_man_pseudo => $man_quasi - or croak "Unable to copy $man_pseudo for testing: $!"; - copy $full_gen_pseudo => $gen_quasi - or croak "Unable to copy $gen_pseudo for testing: $!"; - - my @dirs_needed = qw( - compilers/nqp/bootstrap - docs/pct - lib/Parrot - src/ops - tools/build - runtime/parrot/library - src/pmc - ); - my @created = mkpath( - [ map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed ], - 0, - 0777 - ); - print STDERR "dirs created: @created\n" if $DEBUG; - foreach my $f ( keys %testfiles ) { - my $src = File::Spec->catfile( $cwd, $testlibdir, $f ); - my $des = File::Spec->catfile( $builddir, $testfiles{$f}{start} ); - copy $src, $des or croak "Unable to copy $f for testing: $!"; - } - my $addlib = qq{$cwd/lib}; - my $cmd = qq{$^X -I$addlib $full_installer --prefix=$prefixdir}; - $cmd .= qq{ --includedir=$includedir}; - $cmd .= qq{ --libdir=$libdir}; - $cmd .= qq{ --versiondir=$versiondir}; - $cmd .= qq{ --docdir=$docdir}; - $cmd .= qq{ --srcdir=$srcdir}; -# $cmd .= qq{ --dry-run=1} if $DEBUG; - $cmd .= qq{ MANIFEST MANIFEST.generated}; - print "cmd: $cmd\n" if $DEBUG; - my ($stdout, $stderr); - capture( - sub { - system( $cmd ) and croak "Unable to execute $installer: $!"; - }, - \$stdout, - \$stderr, - ); - like( $stdout, qr/^Installing/, "Got expected standard output" ); - print STDERR "out: $stdout\n" if $DEBUG; - print STDERR "err: $stderr\n" if $DEBUG; - my $seen = 0; - my $expected = scalar keys %testfiles; - foreach my $f ( keys %testfiles ) { - my $des = $testfiles{$f}{end}; - print STDERR "wanted: $des\n" if $DEBUG; - $seen++ if -f $des; - } - is( $seen, $expected, - "Got all $expected expected files in installation" ); - - chdir $cwd - or croak "Unable to return to top-level directory after testing: $!"; -} - -pass("Completed all tests in $0"); - -################### DOCUMENTATION ################### - -=head1 NAME - -dev_overall.t - test tools/dev/install_dev_files.pl - -=head1 SYNOPSIS - - % prove t/tools/install/dev_overall.t - -=head1 DESCRIPTION - -This file simulates the operation of F and -sanity-checks the results. - -=head1 AUTHOR - -James E Keenan - -=head1 SEE ALSO - -F. - -=cut - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff --git a/t/tools/install/overall.t b/t/tools/install/overall.t deleted file mode 100644 index 0c104b5..0000000 --- a/t/tools/install/overall.t +++ /dev/null @@ -1,168 +0,0 @@ -#! perl -# Copyright (C) 2007-2008, Parrot Foundation. -# overall.t - -use strict; -use warnings; -use Test::More tests => 4; -use Carp; -use Cwd; -use File::Basename; -use File::Copy; -use File::Path qw( mkpath ); -use File::Spec (); -use File::Temp qw( tempdir ); -use lib qw( lib ); -use Parrot::Config qw( %PConfig ); -use Parrot::Install qw( - install_files - create_directories - lines_to_files -); -use IO::CaptureOutput qw( capture ); - -my $DEBUG = 0; - -my $cwd = cwd(); -my $installer = File::Spec->catfile( 'tools', 'dev', 'install_files.pl' ); -my $full_installer = File::Spec->catfile( $cwd, $installer ); -ok(-f $full_installer, "Able to locate $installer"); - -my $testlibdir = File::Spec->catdir( qw| t tools install testlib | ); -my $man_pseudo = File::Spec->catfile( $testlibdir, q|manifest_pseudo| ); -my $full_man_pseudo = File::Spec->catfile( $cwd, $man_pseudo ); -my $gen_pseudo = File::Spec->catfile( $testlibdir, q|generated_pseudo| ); -my $full_gen_pseudo = File::Spec->catfile( $cwd, $gen_pseudo ); - -{ - my $builddir = tempdir( CLEANUP => 1 ); - my $prefixdir = tempdir( CLEANUP => 1 ); - if ($DEBUG) { - print STDERR "$builddir\n$prefixdir\n"; - } - - my $includedir = File::Spec->catdir( $prefixdir, 'include' ); - my $libdir = File::Spec->catdir( $prefixdir, 'lib' ); - my $docdir = File::Spec->catdir( $prefixdir, 'share', 'doc' ); - my $versiondir = $PConfig{versiondir}; - - my %testfiles = ( - 'LICENSE' => { - start => File::Spec->catfile( qw| . LICENSE | ), - end => File::Spec->catfile( - $docdir, $versiondir, 'LICENSE' ) - }, - 'include/parrot/charset.h' => { - start => File::Spec->catfile( qw| . include parrot charset.h | ), - end => File::Spec->catfile( - $includedir, $versiondir, 'parrot', 'charset.h' ), - }, - 'install_config.fpmc' => { - start => File::Spec->catfile( qw| . install_config.fpmc | ), - end => File::Spec->catfile( - $libdir, $versiondir, 'include', 'config.fpmc' ), - }, - 'parrot.pc' => { - start => File::Spec->catfile( qw| . | ), - end => File::Spec->catfile( - $libdir, 'pkgconfig', $versiondir, 'parrot.pc' ), - }, - 'compilers/pge/PGE.pir' => { - start => File::Spec->catfile( qw| . compilers pge PGE.pir | ), - end => File::Spec->catfile( - $libdir, $versiondir, 'languages', 'pge', 'PGE.pir' ), - }, - - ); - chdir $builddir or croak "Unable to change to tempdir for testing: $!"; - my $man_quasi = File::Spec->catfile( $builddir, 'MANIFEST' ); - my $gen_quasi = File::Spec->catfile( $builddir, 'MANIFEST.generated' ); - copy $full_man_pseudo => $man_quasi - or croak "Unable to copy $man_pseudo for testing: $!"; - copy $full_gen_pseudo => $gen_quasi - or croak "Unable to copy $gen_pseudo for testing: $!"; - - my @dirs_needed = qw( - src - docs/resources - include/parrot - runtime/parrot/include - compilers/pge - ); - my @created = mkpath( - [ map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed ], - 0, - 0777 - ); - print STDERR "dirs created: @created\n" if $DEBUG; - foreach my $f ( keys %testfiles ) { - my $src = File::Spec->catfile( $cwd, $testlibdir, $f ); - my $des = File::Spec->catfile( $builddir, $testfiles{$f}{start} ); - copy $src, $des or croak "Unable to copy $f for testing: $!"; - } - my $addlib = qq{$cwd/lib}; - my $cmd = qq{$^X -I$addlib $full_installer --prefix=$prefixdir}; - $cmd .= qq{ --includedir=$includedir}; - $cmd .= qq{ --libdir=$libdir}; - $cmd .= qq{ --versiondir=$versiondir}; - $cmd .= qq{ --docdir=$docdir}; -# $cmd .= qq{ --dry-run=1} if $DEBUG; - $cmd .= qq{ MANIFEST MANIFEST.generated}; - print "cmd: $cmd\n" if $DEBUG; - my ($stdout, $stderr); - capture( - sub { - system( $cmd ) and croak "Unable to execute $installer: $!"; - }, - \$stdout, - \$stderr, - ); - like( $stdout, qr/^Installing/, "Got expected standard output" ); - print STDERR "out: $stdout\n" if $DEBUG; - print STDERR "err: $stderr\n" if $DEBUG; - my $seen = 0; - my $expected = scalar keys %testfiles; - foreach my $f ( keys %testfiles ) { - my $des = $testfiles{$f}{end}; - $seen++ if -f $des; - } - is( $seen, $expected, - "Got all $expected expected files in installation" ); - - chdir $cwd - or croak "Unable to return to top-level directory after testing: $!"; -} - -pass("Completed all tests in $0"); - -################### DOCUMENTATION ################### - -=head1 NAME - -overall.t - test tools/dev/install_files.pl - -=head1 SYNOPSIS - - % prove t/tools/install/overall.t - -=head1 DESCRIPTION - -This file simulates the operation of F and -sanity-checks the results. - -=head1 AUTHOR - -James E Keenan - -=head1 SEE ALSO - -F. - -=cut - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff --git a/t/tools/pmc2cutils/04-dump_pmc.t b/t/tools/pmc2cutils/04-dump_pmc.t index 0a8dc11..ddfe226 100644 --- a/t/tools/pmc2cutils/04-dump_pmc.t +++ b/t/tools/pmc2cutils/04-dump_pmc.t @@ -4,6 +4,7 @@ use strict; use warnings; +use Carp; BEGIN { use FindBin qw($Bin); @@ -43,7 +44,11 @@ my @include_orig = ( qq{$main::topdir}, qq{$main::topdir/src/pmc}, ); my $temppmcdir = qq{$tdir/src/pmc}; ok( ( mkdir $temppmcdir ), "created src/pmc/ under tempdir" ); - my @pmcfiles = glob("$main::topdir/src/pmc/*.pmc"); + my @pmcfiles; + opendir my $DIRH, "$main::topdir/src/pmc" + or croak "Unable to open directory for reading"; + @pmcfiles = map { qq|$main::topdir/src/pmc/$_| } grep { ! m/^\./ } readdir $DIRH; + closedir $DIRH or croak; my $pmcfilecount = scalar(@pmcfiles); my $copycount; foreach my $pmcfile (@pmcfiles) {