lib/autoproj/autobuild.rb in autoproj-1.1.3 vs lib/autoproj/autobuild.rb in autoproj-1.2.0

- old
+ new

@@ -59,11 +59,11 @@ def self.import_autobuild_file(source, path) return if @loaded_autobuild_files.include?(path) @file_stack.push([source, File.basename(path)]) begin - load path + Kernel.load path rescue Exception => e filter_load_exception(e, source, path) end @loaded_autobuild_files << path @@ -84,14 +84,20 @@ def package_common(package_type, spec) package_name = Autoproj.package_name_from_options(spec) begin Rake::Task[package_name] - Autoproj.warn "#{package_name} in #{Autoproj.current_file[0]} has been overriden in #{Autoproj.definition_source(package_name)}" + Autoproj.warn "#{package_name} from #{Autoproj.current_file[0]} is overriden by the definition in #{Autoproj.definition_source(package_name)}" + return rescue end + # Check if this package is ignored + if Autoproj.manifest.ignored?(package_name) + return Autoproj.define(:dummy, spec) + end + Autoproj.define(package_type, spec) do |pkg| pkg.srcdir = pkg.name yield(pkg) if block_given? end end @@ -127,9 +133,25 @@ end end end def ruby_common(pkg) + def pkg.prepare_for_forced_build + super + extdir = File.join(srcdir, 'ext') + if File.directory?(extdir) + FileUtils.rm_rf File.join(extdir, "build", "CMakeCache.txt") + FileUtils.rm_rf File.join(extdir, "Makefile") + end + end + def pkg.prepare_for_rebuild + super + extdir = File.join(srcdir, 'ext') + if File.directory?(extdir) + FileUtils.rm_rf File.join(extdir, "build") + end + end + def pkg.prepare super Autobuild.update_environment srcdir end