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 07:14:05 UTC

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

Author: marvin
Date: Tue May  3 05:14:04 2011
New Revision: 1098909

URL: http://svn.apache.org/viewvc?rev=1098909&view=rev
Log:
Update "dist" target.

The "dist" target which builds our CPAN distro had to be adapted for recent
developments, such as the addition of LICENSE and NOTICE files and the porting
of the Clownfish compiler to C.

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=1098909&r1=1098908&r2=1098909&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm Tue May  3 05:14:04 2011
@@ -273,7 +273,11 @@ sub _compile_clownfish {
     return ( $hierarchy, $binding, \@pm_filepaths_with_xs );
 }
 
-sub ACTION_pod { shift->_write_pod(@_) }
+sub ACTION_pod {
+    my $self = shift;
+    $self->dispatch("build_clownfish");
+    $self->_write_pod(@_);
+}
 
 sub _write_pod {
     my ( $self, $binding ) = @_;
@@ -645,11 +649,21 @@ sub ACTION_dist {
     # Because some items we need are outside this directory, we need to copy a
     # bunch of stuff.  After the tarball is packaged up, we delete the copied
     # directories.
-    my @dirs_to_copy = qw( core modules charmonizer devel clownfish );
+    my @items_to_copy = qw(
+        core
+        modules
+        charmonizer
+        devel
+        clownfish
+        CHANGES
+        LICENSE
+        NOTICE
+        README
+    );
     print "Copying files...\n";
-    for my $dir (@dirs_to_copy) {
-        confess("'$dir' already exists") if -e $dir;
-        system("cp -R ../$dir $dir");
+    for my $item (@items_to_copy) {
+        confess("'$item' already exists") if -e $item;
+        system("cp -R ../$item $item");
     }
 
     $self->dispatch('manifest');
@@ -659,8 +673,9 @@ sub ACTION_dist {
 
     # Clean up.
     print "Removing copied files...\n";
-    rmtree($_) for @dirs_to_copy;
-    unlink($_) for qw( MANIFEST META.yml );
+    rmtree($_) for @items_to_copy;
+    unlink("META.yml"); 
+    move("MANIFEST.bak", "MANIFEST") or die "move() failed: $!";
 }
 
 # Generate a list of files for PAUSE, search.cpan.org, etc to ignore.