lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [1/2] git commit: refs/heads/cfc_charmony - Make CFC use Charmonizer
Date Fri, 02 Nov 2012 21:24:31 GMT
Updated Branches:
  refs/heads/cfc_charmony [created] 9df380873


Make CFC use Charmonizer

Now, the build module hierarchy is:

* Module::Build
  * Clownfish::CFC::Perl::Build::Charmonic
    * Clownfish::CFC::Build
    * Clownfish::CFC::Perl::Build
      * Clownfish::Build
      * Lucy::Build


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

Branch: refs/heads/cfc_charmony
Commit: 9df380873578d144c83a08023f9a61683ba7a3ea
Parents: 68bbc8b
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Fri Nov 2 21:12:34 2012 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Fri Nov 2 22:14:55 2012 +0100

----------------------------------------------------------------------
 clownfish/compiler/.gitignore                      |    6 ------
 clownfish/compiler/perl/.gitignore                 |   10 ++++++++++
 clownfish/compiler/perl/Build.PL                   |    7 +++++--
 .../compiler/perl/buildlib/Clownfish/CFC/Build.pm  |   12 +++++++++++-
 .../compiler/perl/lib/Clownfish/CFC/Perl/Build.pm  |    3 ++-
 clownfish/compiler/src/CFCVersion.h                |    2 +-
 clownfish/runtime/perl/buildlib/Clownfish/Build.pm |    1 -
 perl/buildlib/Lucy/Build.pm                        |    1 -
 8 files changed, 29 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/9df38087/clownfish/compiler/.gitignore
----------------------------------------------------------------------
diff --git a/clownfish/compiler/.gitignore b/clownfish/compiler/.gitignore
index 545023d..586acd2 100644
--- a/clownfish/compiler/.gitignore
+++ b/clownfish/compiler/.gitignore
@@ -1,10 +1,4 @@
 include/ppport.h
-perl/Build
-perl/MYMETA.json
-perl/MYMETA.yml
-perl/_build/
-perl/blib/
-perl/lib/Clownfish/CFC.c
 src/CFCParseHeader.c
 src/CFCParseHeader.h
 src/CFCParseHeader.out

http://git-wip-us.apache.org/repos/asf/lucy/blob/9df38087/clownfish/compiler/perl/.gitignore
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/.gitignore b/clownfish/compiler/perl/.gitignore
new file mode 100644
index 0000000..e4a4cd1
--- /dev/null
+++ b/clownfish/compiler/perl/.gitignore
@@ -0,0 +1,10 @@
+/Build
+/Charmony.pm
+/MYMETA.json
+/MYMETA.yml
+/_build/
+/blib/
+/charmonize
+/charmonize.c
+/charmony.h
+/lib/Clownfish/CFC.c

http://git-wip-us.apache.org/repos/asf/lucy/blob/9df38087/clownfish/compiler/perl/Build.PL
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/Build.PL b/clownfish/compiler/perl/Build.PL
index 671f1bd..842a4e1 100644
--- a/clownfish/compiler/perl/Build.PL
+++ b/clownfish/compiler/perl/Build.PL
@@ -18,7 +18,7 @@ use strict;
 use warnings;
 use lib 'buildlib';
 use Clownfish::CFC::Build;
-use File::Spec::Functions qw( updir catdir );
+use File::Spec::Functions qw( updir catdir curdir );
 
 my $builder = Clownfish::CFC::Build->new(
     module_name => 'Clownfish::CFC',
@@ -31,7 +31,10 @@ my $builder = Clownfish::CFC::Build->new(
         'ExtUtils::ParseXS'  => 2.16,
         'Devel::PPPort'      => 3.13,
     },
-    include_dirs   => [ catdir( updir(), 'include' ) ],
+    include_dirs   => [
+        curdir(), # for charmony.h
+        catdir( updir(), 'include' ),
+    ],
     c_source       => catdir( updir(),   'src' ),
     add_to_cleanup => [
         qw(

http://git-wip-us.apache.org/repos/asf/lucy/blob/9df38087/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm b/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm
index a293377..12678b1 100644
--- a/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm
+++ b/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm
@@ -17,7 +17,12 @@ use strict;
 use warnings;
 
 package Clownfish::CFC::Build;
-use base qw( Module::Build );
+
+# In order to find Clownfish::CFC::Perl::Build::Charmonic, look in 'lib'
+# and cleanup @INC afterwards.
+use lib 'lib';
+use base qw( Clownfish::CFC::Perl::Build::Charmonic );
+no lib 'lib';
 
 use File::Spec::Functions qw( catfile updir catdir );
 use Config;
@@ -25,6 +30,7 @@ use Cwd qw( getcwd );
 use Carp;
 
 my $base_dir = catdir( updir(), updir(), updir() );
+my $CHARMONIZER_ORIG_DIR = catdir( $base_dir, 'charmonizer' );
 my $PPPORT_H_PATH = catfile( updir(), qw( include ppport.h ) );
 my $LEMON_DIR = catdir( $base_dir, 'lemon' );
 my $LEMON_EXE_PATH = catfile( $LEMON_DIR, "lemon$Config{_exe}" );
@@ -84,6 +90,9 @@ sub new {
         %args,
         recursive_test_files => 1,
         extra_compiler_flags => __PACKAGE__->extra_ccflags,
+        charmonizer_params   => {
+            source_dir => $CHARMONIZER_ORIG_DIR,
+        },
     );
 }
 
@@ -171,6 +180,7 @@ sub ACTION_lexers {
 
 sub ACTION_code {
     my $self = shift;
+    $self->dispatch('charmonizer_tests');
     $self->dispatch('ppport');
     $self->dispatch('parsers');
     $self->SUPER::ACTION_code;

http://git-wip-us.apache.org/repos/asf/lucy/blob/9df38087/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm b/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
index 45fb38c..1b71185 100644
--- a/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
+++ b/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
@@ -79,7 +79,7 @@ sub new {
 
     my $include_dirs = $self->include_dirs;
     push( @$include_dirs,
-        curdir(), # for ppport.h
+        curdir(), # for ppport.h and charmony.h
         catdir( $AUTOGEN_DIR, 'include' ),
     );
     $self->include_dirs($include_dirs);
@@ -494,6 +494,7 @@ sub ACTION_compile_custom_xs {
 sub ACTION_code {
     my $self = shift;
 
+    $self->dispatch('run_charmonize');
     $self->dispatch('clownfish');
     $self->dispatch('compile_custom_xs');
     $self->dispatch('copy_clownfish_includes');

http://git-wip-us.apache.org/repos/asf/lucy/blob/9df38087/clownfish/compiler/src/CFCVersion.h
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCVersion.h b/clownfish/compiler/src/CFCVersion.h
index d3ba672..e81a012 100644
--- a/clownfish/compiler/src/CFCVersion.h
+++ b/clownfish/compiler/src/CFCVersion.h
@@ -28,7 +28,7 @@
 extern "C" {
 #endif
 
-#include <stdint.h>
+#include "charmony.h"
 
 typedef struct CFCVersion CFCVersion;
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9df38087/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/buildlib/Clownfish/Build.pm b/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
index 0593dff..abe0651 100644
--- a/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
+++ b/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
@@ -124,7 +124,6 @@ sub ACTION_copy_clownfish_includes {
 sub ACTION_clownfish {
     my $self = shift;
 
-    $self->dispatch('charmonizer_tests');
     $self->dispatch('cfc');
 
     $self->SUPER::ACTION_clownfish;

http://git-wip-us.apache.org/repos/asf/lucy/blob/9df38087/perl/buildlib/Lucy/Build.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build.pm b/perl/buildlib/Lucy/Build.pm
index 7a674cd..67fb3dc 100644
--- a/perl/buildlib/Lucy/Build.pm
+++ b/perl/buildlib/Lucy/Build.pm
@@ -140,7 +140,6 @@ sub ACTION_copy_clownfish_includes {
 sub ACTION_clownfish {
     my $self = shift;
 
-    $self->dispatch('charmonizer_tests');
     $self->dispatch('cfc');
 
     $self->SUPER::ACTION_clownfish;


Mime
View raw message