Class: BuildTool::BuildSystem::Make
- Inherits:
-
Object
- Object
- BuildTool::BuildSystem::Make
- Includes:
- MJ::Tools::SubProcess
- Defined in:
- lib/build-tool/build-system/make.rb
Overview
The make buildsystem.
Provides helper methods for other build-system currently.
Defined Under Namespace
Classes: MakeError
Class Method Summary collapse
Class Method Details
.make(target, build_directory, environment) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/build-tool/build-system/make.rb', line 21 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 ) elsif line.index( /undefined reference to / ) logger.error( line ) else logger.verbose( line ) end end if rc != 0 raise MakeError, "make #{ target || "" } failed with error code #{rc}"; end rc end |