Hi,
there is no (clean) way to have in a programmatic way a Makefile with "V = 1" during extension building, since in rubygems/ext/ext_conf_builder.rb, make is run the next line just after the creation of the Makefile with "V = 0". The only way to override the value of V is to pass V=1 to make as an argument. Ruby1.9.1 and ruby2.0 check the environment variable 'make' to determine how to invoke make. The attached patch overrides this environment variable to append V=1 (and defaults to 'make V=1' if it was not set) the time for gem2deb to build the extension, and then restore its value. This patch is committed in the verbose-build branch of the gem2deb repository at git.debian.org/git/pkg-ruby-extras/gem2deb.git. Cheers, Cédric
diff --git a/lib/gem2deb/extension_builder.rb b/lib/gem2deb/extension_builder.rb index d69e230..d53a543 100644 --- a/lib/gem2deb/extension_builder.rb +++ b/lib/gem2deb/extension_builder.rb @@ -56,6 +56,11 @@ module Gem2Deb exit(1) end begin + # override make environment variable to set V variable to 1 for verbose builds + env_make_old = ENV['make'] + ENV['make'] ||= 'make' + ENV['make'] += " V=1" + target = File.expand_path(File.join(destdir, RbConfig::CONFIG['vendorarchdir'])) FileUtils.mkdir_p(File.dirname(target)) Dir.chdir(directory) do @@ -65,6 +70,8 @@ module Gem2Deb rescue Exception => e puts results raise e + ensure + ENV['make']=env_make_old end end
signature.asc
Description: Digital signature