From: Mike D. Lowis Date: Mon, 27 Feb 2012 00:57:24 +0000 (-0500) Subject: Added a task to build cork library before main binary X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=e28b8040ba6a06a72a64622363290aa3a3d8a3d3;p=archive%2Fdlang.git Added a task to build cork library before main binary --- diff --git a/example.dl b/example.dl index 869719f..2a87765 100644 --- a/example.dl +++ b/example.dl @@ -20,6 +20,15 @@ if (1 == 1) print("1 Hello, World!") } +if (1 == 1) +{ + +} +else +{ + +} + if (1 == 0) { print("Hello, World!") diff --git a/rakefile.rb b/rakefile.rb index 4348f0a..4f4b6ac 100644 --- a/rakefile.rb +++ b/rakefile.rb @@ -1,7 +1,12 @@ include Rake::DSL +require 'rake/clean' require 'tools/rake_utils/source/binary.rb' require 'tools/rake_utils/source/tests.rb' +PROJECT_ROOT = File.expand_path(File.dirname(__FILE__)) +CLOBBER.include('./deps/cork/build/static') +CLOBBER.include('./deps/cork/build/shared') + #------------------------------------------------------------------------------ # Configuration Objects #------------------------------------------------------------------------------ @@ -16,7 +21,6 @@ DLangParser = Binary.new({ 'source/**/', 'deps/cork/source/**/' ], - #:preprocessor_defines => [ 'DETECT_MEM_LEAKS' ] }) DLangParser.setup_default_rake_tasks() @@ -28,4 +32,10 @@ UnitTest = Tests.new({ UnitTest.setup_default_rake_tasks() desc 'Build and link all artifacts' -task :release => [ DLangParser.name() ] +task :release => [ :cork, DLangParser.name() ] + +task :cork do + Dir.chdir('./deps/cork') + sh 'rake release' + Dir.chdir(PROJECT_ROOT) +end