You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/08/14 17:22:12 UTC

[lucy-commits] svn commit: r1157544 - /incubator/lucy/branches/0.2/perl/buildlib/Lucy/Build.pm

Author: marvin
Date: Sun Aug 14 15:22:12 2011
New Revision: 1157544

URL: http://svn.apache.org/viewvc?rev=1157544&view=rev
Log:
LUCY-174 Regex glitch breaks dir name.

A broken regex which is intended to change a filepath extension from ".c" to
e.g. ".o" will instead result in a broken directory name if Lucy is being
built in a directory which contains the string ".c" – for instance,
"/home/foo/.cpan/build/".

Modified:
    incubator/lucy/branches/0.2/perl/buildlib/Lucy/Build.pm

Modified: incubator/lucy/branches/0.2/perl/buildlib/Lucy/Build.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/0.2/perl/buildlib/Lucy/Build.pm?rev=1157544&r1=1157543&r2=1157544&view=diff
==============================================================================
--- incubator/lucy/branches/0.2/perl/buildlib/Lucy/Build.pm (original)
+++ incubator/lucy/branches/0.2/perl/buildlib/Lucy/Build.pm Sun Aug 14 15:22:12 2011
@@ -492,8 +492,8 @@ sub ACTION_compile_custom_xs {
     for my $c_file (@$c_files) {
         my $o_file   = $c_file;
         my $ccs_file = $c_file;
-        $o_file   =~ s/\.c/$Config{_o}/;
-        $ccs_file =~ s/\.c/.ccs/;
+        $o_file   =~ s/\.c$/$Config{_o}/ or die "no match";
+        $ccs_file =~ s/\.c$/.ccs/        or die "no match";
         push @objects, $o_file;
         next if $self->up_to_date( $c_file, $o_file );
         $self->add_to_cleanup($o_file);