Ticket #1927: spaces_in_paths.diff
File spaces_in_paths.diff, 18.5 KB (added by jkeenan, 11 years ago) |
---|
-
MANIFEST
diff --git a/MANIFEST b/MANIFEST index 94346e2..941df17 100644
a b 2058 2058 t/tools/install/01-create_directories.t [test] 2059 2059 t/tools/install/02-install_files.t [test] 2060 2060 t/tools/install/03-lines_to_files.t [test] 2061 t/tools/install/dev_overall.t [test]2062 t/tools/install/overall.t [test]2063 2061 t/tools/install/testlib/LICENSE [test] 2064 2062 t/tools/install/testlib/MANIFEST.1defective [test] 2065 2063 t/tools/install/testlib/README []doc -
config/gen/makefiles/root.in
diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in index 9d81529..1936789 100644
a b 859 859 $(MINIPARROT) 860 860 $(LINK) @ld_out@$@ \ 861 861 frontend/parrot/main$(O) src/parrot_config$(O) src/longopt$(O) \ 862 @rpath_blib@$(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)862 $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) 863 863 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 864 864 865 865 $(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 885 $(MINIPARROT) : frontend/parrot/main$(O) include/parrot/api.h include/parrot/longopt.h $(LIBPARROT) \ 886 886 src/null_config$(O) src/longopt$(O) 887 887 $(LINK) @ld_out@$@ frontend/parrot/main$(O) src/null_config$(O) src/longopt$(O) \ 888 @rpath_blib@$(ALL_PARROT_LIBS) $(LINKFLAGS)888 $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 889 889 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 890 890 891 891 $(INSTALLABLEPARROT) : frontend/parrot/main$(O) $(GEN_HEADERS) $(LIBPARROT) \ … … 1056 1056 $(LINK) @ld_out@$@ \ 1057 1057 frontend/parrot_debugger/main$(O) \ 1058 1058 src/parrot_config$(O) \ 1059 @rpath_blib@$(ALL_PARROT_LIBS) $(LINKFLAGS)1059 $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 1060 1060 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 1061 1061 1062 1062 $(INSTALLABLEPDB) : frontend/parrot_debugger/main$(O) $(LIBPARROT) src/parrot_config$(O) … … 1080 1080 $(LINK) @ld_out@$@ \ 1081 1081 src/pbc_disassemble$(O) \ 1082 1082 src/longopt$(O) \ 1083 @rpath_blib@$(ALL_PARROT_LIBS) $(LINKFLAGS)1083 $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 1084 1084 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 1085 1085 1086 1086 $(INSTALLABLEDIS) : src/pbc_disassemble$(O) \ … … 1101 1101 $(LINK) @ld_out@$@ \ 1102 1102 frontend/pbc_dump/main$(O) \ 1103 1103 src/longopt$(O) \ 1104 frontend/pbc_dump/packdump$(O) @rpath_blib@$(ALL_PARROT_LIBS) $(LINKFLAGS)1104 frontend/pbc_dump/packdump$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 1105 1105 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 1106 1106 1107 1107 frontend/pbc_dump/main$(O) : \ … … 1134 1134 frontend/pbc_merge/main$(O) \ 1135 1135 src/parrot_config$(O) \ 1136 1136 src/longopt$(O) \ 1137 @rpath_blib@$(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)1137 $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS) 1138 1138 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 1139 1139 1140 1140 $(INSTALLABLEPBC_MERGE) : frontend/pbc_merge/main$(O) $(LIBPARROT) $(INSTALLABLECONFIG) … … 2872 2872 ############################################################################### 2873 2873 2874 2874 exec : src/parrot_config$(O) $(LIBPARROT) 2875 $(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O) @rpath_blib@$(ALL_PARROT_LIBS) $(LINKFLAGS)2875 $(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) 2876 2876 2877 2877 ###### OS depend targets ########## 2878 2878 -
config/init/hints/darwin.pm
diff --git a/config/init/hints/darwin.pm b/config/init/hints/darwin.pm index 2f6184f..82820fd 100644
a b 43 43 _set_deployment_environment(); 44 44 45 45 my $lib_dir = $conf->data->get('build_dir') . "/blib/lib"; 46 $flagsref->{ldflags} .= " -L$lib_dir";46 $flagsref->{ldflags} .= ' -L"' . $lib_dir . '"'; 47 47 48 48 if ($ENV{'MACOSX_DEPLOYMENT_TARGET'} eq '10.6') { 49 49 $flagsref->{ccflags} .= ' -pipe -fno-common '; … … 91 91 libparrot_shared_alias => "libparrot$share_ext", 92 92 rpath => "-L", 93 93 libparrot_soname => "-install_name " 94 . $lib_dir94 . '"'. $lib_dir 95 95 . '/libparrot' 96 . $conf->data->get('share_ext') 96 . $conf->data->get('share_ext') . '"' 97 97 ); 98 98 } 99 99 -
config/inter/libparrot.pm
diff --git a/config/inter/libparrot.pm b/config/inter/libparrot.pm index ab2f541..03af147 100644
a b 83 83 $conf->data->set( rpath_blib => ( ! $disable_rpath 84 84 && $parrot_is_shared 85 85 && $conf->data->get('rpath') ) 86 ? $conf->data->get('rpath')87 . '"' . $conf->data->get('build_dir') . '"'86 ? '"' . $conf->data->get('rpath') 87 . $conf->data->get('build_dir') 88 88 . '/' 89 . $conf->data->get('blib_dir') 89 . $conf->data->get('blib_dir') . '"' 90 90 : '' 91 91 ); 92 92 -
(a) a/t/tools/install/dev_overall.t vs. (b) /dev/null
diff --git a/t/tools/install/dev_overall.t b/t/tools/install/dev_overall.t deleted file mode 100644 index 16dd741..0000000
a b 1 #! perl2 # Copyright (C) 2007-2008, Parrot Foundation.3 # dev_overall.t4 5 use strict;6 use warnings;7 use Test::More tests => 4;8 use Carp;9 use Cwd;10 use File::Basename;11 use File::Copy;12 use File::Path qw( mkpath );13 use File::Spec ();14 use File::Temp qw( tempdir );15 use lib qw( lib );16 use Parrot::Config qw( %PConfig );17 use IO::CaptureOutput qw( capture );18 19 my $DEBUG = 0;20 21 my $cwd = cwd();22 my $installer = File::Spec->catfile( 'tools', 'dev', 'install_dev_files.pl' );23 my $full_installer = File::Spec->catfile( $cwd, $installer );24 ok(-f $full_installer, "Able to locate $installer");25 26 my $testlibdir = File::Spec->catdir( qw| t tools install testlib | );27 my $man_pseudo = File::Spec->catfile( $testlibdir, q|dev_manifest_pseudo| );28 my $full_man_pseudo = File::Spec->catfile( $cwd, $man_pseudo );29 my $gen_pseudo = File::Spec->catfile( $testlibdir, q|dev_generated_pseudo| );30 my $full_gen_pseudo = File::Spec->catfile( $cwd, $gen_pseudo );31 32 {33 my $builddir = tempdir( CLEANUP => 1 );34 my $prefixdir = tempdir( CLEANUP => 1 );35 if ($DEBUG) {36 print STDERR "$builddir\n$prefixdir\n";37 }38 39 my $includedir = File::Spec->catdir( $prefixdir, 'include' );40 my $libdir = File::Spec->catdir( $prefixdir, 'lib' );41 my $docdir = File::Spec->catdir( $prefixdir, 'share', 'doc' );42 my $srcdir = File::Spec->catdir( $prefixdir, 'src' );43 my $versiondir = $PConfig{versiondir};44 45 my %testfiles = (46 'compilers/nqp/bootstrap/actions.pm' => {47 start => File::Spec->catfile(48 qw| . compilers nqp bootstrap actions.pm | ),49 end => File::Spec->catfile(50 $libdir, $versiondir, 'languages', 'nqp', 'bootstrap', 'actions.pm' ),51 },52 'lib/Parrot/Configure.pm' => {53 start => File::Spec->catfile(54 qw| . lib Parrot Configure.pm | ),55 end => File::Spec->catfile(56 $libdir, $versiondir, 'tools', 'lib', 'Parrot', 'Configure.pm' ),57 },58 'src/ops/ops.num' => {59 start => File::Spec->catfile(60 qw| . src ops ops.num | ),61 end => File::Spec->catfile(62 $srcdir, $versiondir, 'ops', 'ops.num' ),63 },64 'tools/build/ops2c.pl' => {65 start => File::Spec->catfile(66 qw| . tools build ops2c.pl | ),67 end => File::Spec->catfile(68 $libdir, $versiondir, 'tools', 'build', 'ops2c.pl' ),69 },70 'runtime/parrot/library/TGE.pbc' => {71 start => File::Spec->catfile(72 qw| . runtime parrot library TGE.pbc | ),73 end => File::Spec->catfile(74 $libdir, $versiondir, 'library', 'TGE.pbc' ),75 },76 'src/pmc/pmc_object.h' => {77 start => File::Spec->catfile(78 qw| . src pmc pmc_object.h | ),79 end => File::Spec->catfile(80 $includedir, $versiondir, 'pmc', 'pmc_object.h' ),81 },82 'vtable.dump' => {83 start => File::Spec->catfile(84 qw| . vtable.dump | ),85 end => File::Spec->catfile(86 $srcdir, $versiondir, 'vtable.dump' ),87 },88 );89 chdir $builddir or croak "Unable to change to tempdir for testing: $!";90 my $man_quasi = File::Spec->catfile( $builddir, 'MANIFEST' );91 my $gen_quasi = File::Spec->catfile( $builddir, 'MANIFEST.generated' );92 copy $full_man_pseudo => $man_quasi93 or croak "Unable to copy $man_pseudo for testing: $!";94 copy $full_gen_pseudo => $gen_quasi95 or croak "Unable to copy $gen_pseudo for testing: $!";96 97 my @dirs_needed = qw(98 compilers/nqp/bootstrap99 docs/pct100 lib/Parrot101 src/ops102 tools/build103 runtime/parrot/library104 src/pmc105 );106 my @created = mkpath(107 [ map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed ],108 0,109 0777110 );111 print STDERR "dirs created: @created\n" if $DEBUG;112 foreach my $f ( keys %testfiles ) {113 my $src = File::Spec->catfile( $cwd, $testlibdir, $f );114 my $des = File::Spec->catfile( $builddir, $testfiles{$f}{start} );115 copy $src, $des or croak "Unable to copy $f for testing: $!";116 }117 my $addlib = qq{$cwd/lib};118 my $cmd = qq{$^X -I$addlib $full_installer --prefix=$prefixdir};119 $cmd .= qq{ --includedir=$includedir};120 $cmd .= qq{ --libdir=$libdir};121 $cmd .= qq{ --versiondir=$versiondir};122 $cmd .= qq{ --docdir=$docdir};123 $cmd .= qq{ --srcdir=$srcdir};124 # $cmd .= qq{ --dry-run=1} if $DEBUG;125 $cmd .= qq{ MANIFEST MANIFEST.generated};126 print "cmd: $cmd\n" if $DEBUG;127 my ($stdout, $stderr);128 capture(129 sub {130 system( $cmd ) and croak "Unable to execute $installer: $!";131 },132 \$stdout,133 \$stderr,134 );135 like( $stdout, qr/^Installing/, "Got expected standard output" );136 print STDERR "out: $stdout\n" if $DEBUG;137 print STDERR "err: $stderr\n" if $DEBUG;138 my $seen = 0;139 my $expected = scalar keys %testfiles;140 foreach my $f ( keys %testfiles ) {141 my $des = $testfiles{$f}{end};142 print STDERR "wanted: $des\n" if $DEBUG;143 $seen++ if -f $des;144 }145 is( $seen, $expected,146 "Got all $expected expected files in installation" );147 148 chdir $cwd149 or croak "Unable to return to top-level directory after testing: $!";150 }151 152 pass("Completed all tests in $0");153 154 ################### DOCUMENTATION ###################155 156 =head1 NAME157 158 dev_overall.t - test tools/dev/install_dev_files.pl159 160 =head1 SYNOPSIS161 162 % prove t/tools/install/dev_overall.t163 164 =head1 DESCRIPTION165 166 This file simulates the operation of F<tools/dev/install_dev_files.pl> and167 sanity-checks the results.168 169 =head1 AUTHOR170 171 James E Keenan172 173 =head1 SEE ALSO174 175 F<tools/dev/install_dev_files.pl>.176 177 =cut178 179 # Local Variables:180 # mode: cperl181 # cperl-indent-level: 4182 # fill-column: 100183 # End:184 # vim: expandtab shiftwidth=4: -
(a) a/t/tools/install/overall.t vs. (b) /dev/null
diff --git a/t/tools/install/overall.t b/t/tools/install/overall.t deleted file mode 100644 index 0c104b5..0000000
a b 1 #! perl2 # Copyright (C) 2007-2008, Parrot Foundation.3 # overall.t4 5 use strict;6 use warnings;7 use Test::More tests => 4;8 use Carp;9 use Cwd;10 use File::Basename;11 use File::Copy;12 use File::Path qw( mkpath );13 use File::Spec ();14 use File::Temp qw( tempdir );15 use lib qw( lib );16 use Parrot::Config qw( %PConfig );17 use Parrot::Install qw(18 install_files19 create_directories20 lines_to_files21 );22 use IO::CaptureOutput qw( capture );23 24 my $DEBUG = 0;25 26 my $cwd = cwd();27 my $installer = File::Spec->catfile( 'tools', 'dev', 'install_files.pl' );28 my $full_installer = File::Spec->catfile( $cwd, $installer );29 ok(-f $full_installer, "Able to locate $installer");30 31 my $testlibdir = File::Spec->catdir( qw| t tools install testlib | );32 my $man_pseudo = File::Spec->catfile( $testlibdir, q|manifest_pseudo| );33 my $full_man_pseudo = File::Spec->catfile( $cwd, $man_pseudo );34 my $gen_pseudo = File::Spec->catfile( $testlibdir, q|generated_pseudo| );35 my $full_gen_pseudo = File::Spec->catfile( $cwd, $gen_pseudo );36 37 {38 my $builddir = tempdir( CLEANUP => 1 );39 my $prefixdir = tempdir( CLEANUP => 1 );40 if ($DEBUG) {41 print STDERR "$builddir\n$prefixdir\n";42 }43 44 my $includedir = File::Spec->catdir( $prefixdir, 'include' );45 my $libdir = File::Spec->catdir( $prefixdir, 'lib' );46 my $docdir = File::Spec->catdir( $prefixdir, 'share', 'doc' );47 my $versiondir = $PConfig{versiondir};48 49 my %testfiles = (50 'LICENSE' => {51 start => File::Spec->catfile( qw| . LICENSE | ),52 end => File::Spec->catfile(53 $docdir, $versiondir, 'LICENSE' )54 },55 'include/parrot/charset.h' => {56 start => File::Spec->catfile( qw| . include parrot charset.h | ),57 end => File::Spec->catfile(58 $includedir, $versiondir, 'parrot', 'charset.h' ),59 },60 'install_config.fpmc' => {61 start => File::Spec->catfile( qw| . install_config.fpmc | ),62 end => File::Spec->catfile(63 $libdir, $versiondir, 'include', 'config.fpmc' ),64 },65 'parrot.pc' => {66 start => File::Spec->catfile( qw| . | ),67 end => File::Spec->catfile(68 $libdir, 'pkgconfig', $versiondir, 'parrot.pc' ),69 },70 'compilers/pge/PGE.pir' => {71 start => File::Spec->catfile( qw| . compilers pge PGE.pir | ),72 end => File::Spec->catfile(73 $libdir, $versiondir, 'languages', 'pge', 'PGE.pir' ),74 },75 76 );77 chdir $builddir or croak "Unable to change to tempdir for testing: $!";78 my $man_quasi = File::Spec->catfile( $builddir, 'MANIFEST' );79 my $gen_quasi = File::Spec->catfile( $builddir, 'MANIFEST.generated' );80 copy $full_man_pseudo => $man_quasi81 or croak "Unable to copy $man_pseudo for testing: $!";82 copy $full_gen_pseudo => $gen_quasi83 or croak "Unable to copy $gen_pseudo for testing: $!";84 85 my @dirs_needed = qw(86 src87 docs/resources88 include/parrot89 runtime/parrot/include90 compilers/pge91 );92 my @created = mkpath(93 [ map { File::Spec->catdir( $builddir, $_ ) } @dirs_needed ],94 0,95 077796 );97 print STDERR "dirs created: @created\n" if $DEBUG;98 foreach my $f ( keys %testfiles ) {99 my $src = File::Spec->catfile( $cwd, $testlibdir, $f );100 my $des = File::Spec->catfile( $builddir, $testfiles{$f}{start} );101 copy $src, $des or croak "Unable to copy $f for testing: $!";102 }103 my $addlib = qq{$cwd/lib};104 my $cmd = qq{$^X -I$addlib $full_installer --prefix=$prefixdir};105 $cmd .= qq{ --includedir=$includedir};106 $cmd .= qq{ --libdir=$libdir};107 $cmd .= qq{ --versiondir=$versiondir};108 $cmd .= qq{ --docdir=$docdir};109 # $cmd .= qq{ --dry-run=1} if $DEBUG;110 $cmd .= qq{ MANIFEST MANIFEST.generated};111 print "cmd: $cmd\n" if $DEBUG;112 my ($stdout, $stderr);113 capture(114 sub {115 system( $cmd ) and croak "Unable to execute $installer: $!";116 },117 \$stdout,118 \$stderr,119 );120 like( $stdout, qr/^Installing/, "Got expected standard output" );121 print STDERR "out: $stdout\n" if $DEBUG;122 print STDERR "err: $stderr\n" if $DEBUG;123 my $seen = 0;124 my $expected = scalar keys %testfiles;125 foreach my $f ( keys %testfiles ) {126 my $des = $testfiles{$f}{end};127 $seen++ if -f $des;128 }129 is( $seen, $expected,130 "Got all $expected expected files in installation" );131 132 chdir $cwd133 or croak "Unable to return to top-level directory after testing: $!";134 }135 136 pass("Completed all tests in $0");137 138 ################### DOCUMENTATION ###################139 140 =head1 NAME141 142 overall.t - test tools/dev/install_files.pl143 144 =head1 SYNOPSIS145 146 % prove t/tools/install/overall.t147 148 =head1 DESCRIPTION149 150 This file simulates the operation of F<tools/dev/install_files.pl> and151 sanity-checks the results.152 153 =head1 AUTHOR154 155 James E Keenan156 157 =head1 SEE ALSO158 159 F<tools/dev/install_files.pl>.160 161 =cut162 163 # Local Variables:164 # mode: cperl165 # cperl-indent-level: 4166 # fill-column: 100167 # End:168 # vim: expandtab shiftwidth=4: -
t/tools/pmc2cutils/04-dump_pmc.t
diff --git a/t/tools/pmc2cutils/04-dump_pmc.t b/t/tools/pmc2cutils/04-dump_pmc.t index 0a8dc11..ddfe226 100644
a b 4 4 5 5 use strict; 6 6 use warnings; 7 use Carp; 7 8 8 9 BEGIN { 9 10 use FindBin qw($Bin); … … 43 44 my $temppmcdir = qq{$tdir/src/pmc}; 44 45 ok( ( mkdir $temppmcdir ), "created src/pmc/ under tempdir" ); 45 46 46 my @pmcfiles = glob("$main::topdir/src/pmc/*.pmc"); 47 my @pmcfiles; 48 opendir my $DIRH, "$main::topdir/src/pmc" 49 or croak "Unable to open directory for reading"; 50 @pmcfiles = map { qq|$main::topdir/src/pmc/$_| } grep { ! m/^\./ } readdir $DIRH; 51 closedir $DIRH or croak; 47 52 my $pmcfilecount = scalar(@pmcfiles); 48 53 my $copycount; 49 54 foreach my $pmcfile (@pmcfiles) {