lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r464320 - /lucene/lucy/trunk/Build.PL
Date Sun, 15 Oct 2006 23:26:06 GMT
Author: marvin
Date: Sun Oct 15 16:26:04 2006
New Revision: 464320

URL: http://svn.apache.org/viewvc?view=rev&rev=464320
Log:
Add provisions for appending extra debugging ccflags when compiling
Charmonizer.

Modified:
    lucene/lucy/trunk/Build.PL

Modified: lucene/lucy/trunk/Build.PL
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/Build.PL?view=diff&rev=464320&r1=464319&r2=464320
==============================================================================
--- lucene/lucy/trunk/Build.PL (original)
+++ lucene/lucy/trunk/Build.PL Sun Oct 15 16:26:04 2006
@@ -21,6 +21,9 @@
 my $CHARMONIZE_EXE_PATH    = 'charmonize';
 my $CHARMONIZER_SOURCE_DIR = catdir(qw( charmonizer src ));
 
+my $DEBUG         = 0;
+my $EXTRA_CCFLAGS = $DEBUG ? " -ansi -pedantic -Wall -Wextra -std=c89 " : "";
+
 # Compile the metaquote source filter utility.
 sub ACTION_metaquote {
     my $self        = shift;
@@ -32,7 +35,10 @@
     # compile
     print "\nBuilding $METAQUOTE_EXE_PATH...\n\n";
     my $cbuilder = ExtUtils::CBuilder->new;
-    my $o_file = $cbuilder->compile( source => $source_path );
+    my $o_file   = $cbuilder->compile(
+        source               => $source_path,
+        extra_compiler_flags => $EXTRA_CCFLAGS,
+    );
     $cbuilder->link_executable(
         objects  => [$o_file],
         exe_file => $METAQUOTE_EXE_PATH,
@@ -74,8 +80,9 @@
         next if $self->up_to_date( $_, $o_file );
 
         $cbuilder->compile(
-            source       => $_,
-            include_dirs => [$filtered_dir],
+            source               => $_,
+            include_dirs         => [$filtered_dir],
+            extra_compiler_flags => $EXTRA_CCFLAGS,
         );
     }
 



Mime
View raw message