Author: logie
Date: Fri Oct 5 21:19:18 2012
New Revision: 1394818
URL: http://svn.apache.org/viewvc?rev=1394818&view=rev
Log:
Added logic to actually build clownfish compiler and test charmonizer
Modified:
lucy/trunk/clownfish/runtime/ruby/Rakefile
Modified: lucy/trunk/clownfish/runtime/ruby/Rakefile
URL:
http://svn.apache.org/viewvc/lucy/trunk/clownfish/runtime/ruby/Rakefile?rev=1394818&r1=1394817&r2=1394818&view=diff
==============================================================================
--- lucy/trunk/clownfish/runtime/ruby/Rakefile (original)
+++ lucy/trunk/clownfish/runtime/ruby/Rakefile Fri Oct 5 21:19:18 2012
@@ -33,17 +33,39 @@ LIB_DIR = 'lib';
desc "Build Clownfish"
task :build_clownfish => [:build_charmonizer_tests] do
puts "Building Clownfish"
+ old_dir = Dir.pwd
+ chdir(CFC_DIR);
+ if ( File.exists?('Rakefile') )
+ puts "\nBuilding Clownfish compiler... "
+ if system("rake").nil?
+ abort "Couldn't build rake"
+ end
+ puts "\nFinished building Clownfish compiler.\n"
+ end
+ chdir(old_dir);
end
desc "Building Charmonizer Tests"
task :build_charmonizer_tests => [:charmonize] do
puts "Building Charmonizer Tests"
+ flags = [
+ '-fno-common',
+ '-DFCRUBY',
+ '-fno-strict-aliasing',
+ '-pipe',
+ '-fstack-protector',
+ '-std=gnu99',
+ '-D_GNU_SOURCE',
+ '-I' + Dir.pwd
+ ].join(" ").gsub(/"/,'\"')
+
+ run_make( :dir => CHARMONIZER_ORIG_DIR, :args => [ "DEFS=#{flags}", "tests"])
end
desc "Charmonize"
task :charmonize => [:build_charmonize] do
puts "Charmonizing"
- return if !uptodate?(CHARMONIZE_EXE_PATH, [ CHARMONY_H_PATH,
CHARMONY_RB_PATH ] )
+ #return if !uptodate?(CHARMONIZE_EXE_PATH, [ CHARMONY_H_PATH,
CHARMONY_RB_PATH ] )
puts "Running #{CHARMONIZE_EXE_PATH}...\n"
CLEAN.include(CHARMONY_H_PATH)
CLEAN.include(CHARMONY_RB_PATH)
@@ -112,6 +134,7 @@ def run_make(params = {})
end
end
command.unshift(make_command)
+ puts command.join(" ")
success = system(*command)
if !success
raise "Make failed"