From 53a5ae92c164459f1a40f9cef918e42bd26d84cd Mon Sep 17 00:00:00 2001 From: Warwick Stone Date: Sun, 14 Jul 2013 20:37:39 +1000 Subject: [PATCH] Updated examples rakefile * Build directory created if it doesn't exist. This fixes a gcc "no such file or directory" error when running rake --- examples/rakefile.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/rakefile.rb b/examples/rakefile.rb index 0a64118..9eade7a 100644 --- a/examples/rakefile.rb +++ b/examples/rakefile.rb @@ -5,13 +5,24 @@ require 'rake/clean' require 'rake/testtask' require HERE+'rakefile_helper' +TEMP_DIRS = [ + File.join(HERE, 'build') +] + +TEMP_DIRS.each do |dir| + directory(dir) + CLOBBER.include(dir) +end + +task :prepare_for_tests => TEMP_DIRS + include RakefileHelpers # Load default configuration, for now DEFAULT_CONFIG_FILE = 'gcc_32.yml' configure_toolchain(DEFAULT_CONFIG_FILE) -task :unit do +task :unit => [:prepare_for_tests] do run_tests get_unit_test_files end