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/04/15 21:44:16 UTC

[lucy-commits] git commit: Default Clownfish include dirs for Perl build

Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 63de94b6a -> 3e5e15e58


Default Clownfish include dirs for Perl build

If no Clownfish include directories are passed to
Clownfish::CFC::Perl::Build, use the directories from the environment
variable CLOWNFISH_INCLUDE. If this variable is unset, use the system
include directories.

Also add all Clownfish include directories to the C include path.


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

Branch: refs/heads/master
Commit: 3e5e15e589783484d4a6290b240f4166101b08ec
Parents: 63de94b
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Apr 15 21:38:03 2014 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Tue Apr 15 21:38:03 2014 +0200

----------------------------------------------------------------------
 compiler/perl/lib/Clownfish/CFC/Perl/Build.pm | 22 ++++++++++++++--------
 runtime/perl/Build.PL                         |  1 +
 2 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3e5e15e5/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 a007756..4ac8e51 100644
--- a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
+++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
@@ -78,13 +78,6 @@ sub new {
         $self->extra_linker_flags(@$extra_ldflags);
     }
 
-    my $include_dirs = $self->include_dirs;
-    push( @$include_dirs,
-        curdir(), # for ppport.h and charmony.h
-        catdir( $AUTOGEN_DIR, 'include' ),
-    );
-    $self->include_dirs($include_dirs);
-
     my $cf_source = $self->clownfish_params('source');
     if ( !defined($cf_source) ) {
         $cf_source = [];
@@ -97,13 +90,26 @@ sub new {
 
     my $cf_include = $self->clownfish_params('include');
     if ( !defined($cf_include) ) {
-        $cf_include = [];
+        if ($ENV{CLOWNFISH_INCLUDE}) {
+            $cf_include = [ split( /:/, $ENV{CLOWNFISH_INCLUDE} ) ];
+        }
+        else {
+            $cf_include = [ $self->cf_system_include_dirs ];
+        }
     }
     elsif ( !ref($cf_include) ) {
         $cf_include = [ $cf_include ];
     }
     $self->clownfish_params( include => $cf_include );
 
+    my $include_dirs = $self->include_dirs;
+    push( @$include_dirs,
+        curdir(), # for ppport.h and charmony.h
+        catdir( $AUTOGEN_DIR, 'include' ),
+        @$cf_include,
+    );
+    $self->include_dirs($include_dirs);
+
     my $autogen_header = $self->clownfish_params('autogen_header');
     if ( !defined($autogen_header) ) {
         $self->clownfish_params( autogen_header => <<'END_AUTOGEN' );

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3e5e15e5/runtime/perl/Build.PL
----------------------------------------------------------------------
diff --git a/runtime/perl/Build.PL b/runtime/perl/Build.PL
index e357151..c893e5d 100644
--- a/runtime/perl/Build.PL
+++ b/runtime/perl/Build.PL
@@ -55,6 +55,7 @@ my $builder = Clownfish::Build->new(
             $CORE_SOURCE_DIR,
             $XS_SOURCE_DIR,
         ],
+        include => [], # Don't use default includes.
     },
     extra_compiler_flags => '-DCFP_CFISH -DCFP_TESTCFISH',
     add_to_cleanup => [