Sha256: 88a041eb549f94f85d8c1a2063a624a51f3d9dca27846c5d193086298c983f8e
Contents?: true
Size: 1.13 KB
Versions: 9
Compression:
Stored size: 1.13 KB
Contents
# -*- coding: UTF-8 -*- require 'mj/tools/subprocess' module BuildTool; module BuildSystem # The make buildsystem. # # Provides helper methods for other build-system currently. class Make include MJ::Tools::SubProcess class MakeError < BuildTool::Error; end # Class Methods class << self def make( target, build_directory, environment ) rc = self.execute( "make #{target ? target : "" }", build_directory, environment ) do |line| line.chomp if line.index( /[^\w]error:/ ) logger.error( line ) elsif line.index( /\/ld:/ ) logger.error( line ) elsif line.index( /(core dumped)/ ) logger.error( line ) else logger.verbose( line ) end end if rc != 0 raise MakeError, "make #{ target || "" } failed with error code #{rc}"; end rc end end end end; end
Version data entries
9 entries across 9 versions & 1 rubygems