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/06/19 03:35:23 UTC

[lucy-commits] svn commit: r1137272 - /incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm

Author: marvin
Date: Sun Jun 19 01:35:22 2011
New Revision: 1137272

URL: http://svn.apache.org/viewvc?rev=1137272&view=rev
Log:
Treat path to "charmony.h" like all other paths.

Modified:
    incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm

Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm?rev=1137272&r1=1137271&r2=1137272&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm Sun Jun 19 01:35:22 2011
@@ -140,6 +140,7 @@ my $base_dir = $is_distro_not_devel ? cu
 
 my $CHARMONIZE_EXE_PATH  = catfile($base_dir, 'charmonizer', 'charmonize' . $Config{_exe});
 my $CHARMONIZER_ORIG_DIR = catdir( $base_dir, 'charmonizer' );
+my $CHARMONY_PATH        = 'charmony.h';
 my $SNOWSTEM_SRC_DIR
     = catdir( $base_dir, qw( modules analysis snowstem source ) );
 my $SNOWSTEM_INC_DIR = catdir( $SNOWSTEM_SRC_DIR, 'include' );
@@ -195,16 +196,15 @@ sub ACTION_charmonizer_tests {
 # Run the charmonizer executable, creating the charmony.h file.
 sub ACTION_charmony {
     my $self          = shift;
-    my $charmony_path = 'charmony.h';
 
     $self->dispatch('charmonizer');
 
-    return if $self->up_to_date( $CHARMONIZE_EXE_PATH, $charmony_path );
-    print "\nWriting $charmony_path...\n\n";
+    return if $self->up_to_date( $CHARMONIZE_EXE_PATH, $CHARMONY_PATH );
+    print "\nWriting $CHARMONY_PATH...\n\n";
 
     # Clean up after Charmonizer if it doesn't succeed on its own.
     $self->add_to_cleanup("_charm*");
-    $self->add_to_cleanup($charmony_path);
+    $self->add_to_cleanup($CHARMONY_PATH);
 
     # Prepare arguments to charmonize.
     my $cc        = $self->config('cc');
@@ -215,11 +215,11 @@ sub ACTION_charmony {
     if ( $ENV{CHARM_VALGRIND} ) {
         system(   "valgrind --leak-check=yes ./$CHARMONIZE_EXE_PATH $cc "
                 . "\"$flags\" $verbosity" )
-            and die "Failed to write charmony.h";
+            and die "Failed to write $CHARMONY_PATH";
     }
     else {
         system("$CHARMONIZE_EXE_PATH \"$cc\" \"$flags\" $verbosity")
-            and die "Failed to write charmony.h: $!";
+            and die "Failed to write $CHARMONY_PATH: $!";
     }
 }