You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/11/08 19:55:26 UTC

[09/11] lucy-clownfish git commit: Use autogen/source only when needed

Use autogen/source only when needed


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/2106b934
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/2106b934
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/2106b934

Branch: refs/heads/perl_build_with_make
Commit: 2106b934b6d661ad7a6f90e99c38d34b40e0b0dd
Parents: 5a4413b
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Oct 29 22:45:29 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Nov 8 19:44:08 2014 +0100

----------------------------------------------------------------------
 compiler/perl/lib/Clownfish/CFC/Perl/Build.pm | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/2106b934/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
index 3e29832..705f20a 100644
--- a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
+++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
@@ -64,16 +64,6 @@ sub new {
         $self->extra_linker_flags(@$extra_ldflags);
     }
 
-    my $cf_source = $self->clownfish_params('source');
-    if ( !defined($cf_source) ) {
-        $cf_source = [];
-    }
-    elsif ( !ref($cf_source) ) {
-        $cf_source = [ $cf_source ];
-    }
-    push( @$cf_source, catdir( $AUTOGEN_DIR, 'source' ) );
-    $self->clownfish_params( source => $cf_source );
-
     my $autogen_header = $self->clownfish_params('autogen_header');
     if ( !defined($autogen_header) ) {
         $self->clownfish_params( autogen_header => <<'END_AUTOGEN' );
@@ -413,7 +403,8 @@ sub ACTION_compile_custom_xs {
     else {
         my $c_files = [];
         my $source_dirs = $self->clownfish_params('source');
-        for my $source_dir (@$source_dirs) {
+        my $autogen_src_dir = catdir( $AUTOGEN_DIR, 'source' );
+        for my $source_dir ( @$source_dirs, $autogen_src_dir ) {
             push @$c_files, @{ $self->rscan_dir( $source_dir, qr/\.c$/ ) };
         }
         my $extra_cflags = $self->clownfish_params('cflags');