You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by jo...@apache.org on 2011/05/29 04:00:15 UTC
[lucy-commits] svn commit: r1128803 - /incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
Author: joes
Date: Sun May 29 02:00:15 2011
New Revision: 1128803
URL: http://svn.apache.org/viewvc?rev=1128803&view=rev
Log:
Hack in the Makefile-based build of charmonizer.
Not at all sure that nmake will accept command-line args the way make does.
Modified:
incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
Modified: incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm?rev=1128803&r1=1128802&r2=1128803&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm (original)
+++ incubator/lucy/trunk/perl/buildlib/Lucy/Build.pm Sun May 29 02:00:15 2011
@@ -138,7 +138,7 @@ locations.
my $is_distro_not_devel = -e 'core';
my $base_dir = $is_distro_not_devel ? curdir() : updir();
-my $CHARMONIZE_EXE_PATH = 'charmonize' . $Config{_exe};
+my $CHARMONIZE_EXE_PATH = catfile($base_dir, 'charmonizer', 'charmonize' . $Config{_exe});
my $CHARMONIZER_ORIG_DIR = catdir( $base_dir, 'charmonizer' );
my $CHARMONIZER_SRC_DIR = catdir( $CHARMONIZER_ORIG_DIR, 'src' );
my $SNOWSTEM_SRC_DIR
@@ -176,6 +176,16 @@ sub ACTION_charmonizer {
= Lucy::Build::CBuilder->new( config => { cc => $self->config('cc') },
);
+ my $flags = $self->config('ccflags') . ' '
+ . $self->extra_ccflags . ' '
+ . $self->config('cccdlflags');
+
+ my $dir = getcwd();
+ chdir $CHARMONIZER_ORIG_DIR;
+ my $rv = system($cbuilder->get_cc eq 'cl' ? 'nmake' : 'make',
+ "CC=". $cbuilder->get_cc, "DEFS=$flags");
+ chdir $dir;
+
my @o_files;
for (@all_source) {
next unless /\.c$/;
@@ -186,18 +196,18 @@ sub ACTION_charmonizer {
next if $self->up_to_date( $_, $o_file );
- $cbuilder->compile(
- source => $_,
- include_dirs => [$CHARMONIZER_SRC_DIR],
- extra_compiler_flags => $self->extra_ccflags,
- );
+# $cbuilder->compile(
+# source => $_,
+# include_dirs => [$CHARMONIZER_SRC_DIR],
+# extra_compiler_flags => $self->extra_ccflags,
+# );
}
$self->add_to_cleanup($CHARMONIZE_EXE_PATH);
- my $exe_path = $cbuilder->link_executable(
- objects => \@o_files,
- exe_file => $CHARMONIZE_EXE_PATH,
- );
+# my $exe_path = $cbuilder->link_executable(
+# objects => \@o_files,
+# exe_file => $CHARMONIZE_EXE_PATH,
+# );
}
# Run the charmonizer executable, creating the charmony.h file.
@@ -226,7 +236,7 @@ sub ACTION_charmony {
and die "Failed to write charmony.h";
}
else {
- system("./$CHARMONIZE_EXE_PATH \"$cc\" \"$flags\" $verbosity")
+ system("$CHARMONIZE_EXE_PATH \"$cc\" \"$flags\" $verbosity")
and die "Failed to write charmony.h: $!";
}
}
[lucy-dev] nmake accept args like Unix make
Posted by Marvin Humphrey <ma...@rectangular.com>.
On Sun, May 29, 2011 at 02:00:15AM -0000, joes@apache.org wrote:
> URL: http://svn.apache.org/viewvc?rev=1128803&view=rev
> Log:
> Hack in the Makefile-based build of charmonizer.
> Not at all sure that nmake will accept command-line args the way make does.
It does.
Marvin Humphrey