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/05/03 02:21:14 UTC

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

Author: marvin
Date: Tue May  3 00:21:14 2011
New Revision: 1098868

URL: http://svn.apache.org/viewvc?rev=1098868&view=rev
Log:
Dispatch Clownfish clean from Lucy.

Have Lucy::Build dispatch to the Clownfish Build script's clean() and
realclean() actions so that the build products from compiling the Clownfish
compiler get cleaned up as well.

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=1098868&r1=1098867&r2=1098868&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm Tue May  3 00:21:14 2011
@@ -148,10 +148,11 @@ my $SNOWSTOP_SRC_DIR
     = catdir( $base_dir, qw( modules analysis snowstop source ) );
 my $CORE_SOURCE_DIR = catdir( $base_dir, 'core' );
 my $CLOWNFISH_DIR   = catdir( $base_dir, 'clownfish' );
-my $AUTOGEN_DIR     = 'autogen';
-my $XS_SOURCE_DIR   = 'xs';
-my $LIB_DIR         = 'lib';
-my $XS_FILEPATH = catfile( $LIB_DIR, "Lucy.xs" );
+my $CLOWNFISH_BUILD  = catfile( $CLOWNFISH_DIR, 'Build' );
+my $AUTOGEN_DIR      = 'autogen';
+my $XS_SOURCE_DIR    = 'xs';
+my $LIB_DIR          = 'lib';
+my $XS_FILEPATH      = catfile( $LIB_DIR, "Lucy.xs" );
 my $AUTOBIND_PM_PATH = catfile( $LIB_DIR, 'Lucy', 'Autobinding.pm' );
 
 sub new { shift->SUPER::new( recursive_test_files => 1, @_ ) }
@@ -714,6 +715,24 @@ sub ACTION_semiclean {
     }
 }
 
+sub ACTION_clean {
+    my $self = shift;
+    if ( -e $CLOWNFISH_BUILD ) {
+        system("$^X $CLOWNFISH_BUILD clean")
+            and die "Clownfish clean failed";
+    }
+    $self->SUPER::ACTION_clean;
+}
+
+sub ACTION_realclean {
+    my $self = shift;
+    if ( -e $CLOWNFISH_BUILD ) {
+        system("$^X $CLOWNFISH_BUILD realclean")
+            and die "Clownfish realclean failed";
+    }
+    $self->SUPER::ACTION_realclean;
+}
+
 1;
 
 __END__