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 2016/06/01 12:01:54 UTC

[03/13] lucy-clownfish git commit: Don't pass autogen source dir as input dir to CFC

Don't pass autogen source dir as input dir to CFC


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

Branch: refs/heads/master
Commit: feb39e8f0b21f58a1360df3b6772ccc643e9394c
Parents: 253e739
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon May 30 14:16:53 2016 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon May 30 14:16:53 2016 +0200

----------------------------------------------------------------------
 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/feb39e8f/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 d0b1d07..6f2557a 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' );
@@ -382,7 +372,8 @@ sub ACTION_compile_custom_xs {
     # Compile C source files.
     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');