Class: BuildTool::Commands::Configure
- Inherits:
-
ModuleBasedCommand
- Object
- Base
- Standard
- ModuleBasedCommand
- BuildTool::Commands::Configure
- Includes:
- MJ::Tools::SubProcess
- Defined in:
- lib/build-tool/commands/configure.rb
Overview
BuildCommand
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #applicable? ⇒ Boolean
- #do_execute_module(mod) ⇒ Object
- #initialize_options ⇒ Object
- #is_module_ready?(mod) ⇒ Boolean
-
#log? ⇒ Boolean
Log this command if $noop is not active.
Methods inherited from ModuleBasedCommand
#clean, #clone, #configure, #do_execute, #fetch, #initialize, #install, #make, #prepare_module, #rebase, #reconfigure, #remove_build_directory, #remove_source_directory, #summarize
Methods inherited from Standard
#complete_module, #complete_modules, #initialize, #log_directory, #while_logging_to
Methods inherited from Base
#<=>, #cleanup_after_vcs_access, #complete_arguments, #complete_readline, #configuration, #debug, #debug2, #do_complete, #do_execute, #each_option, #error, #execute, #fullname, #info, #initialize, #quiet, #setup_command, #setup_options, #show_help, #skip_command, #summarize, #teardown_command, #trace, #usage, #verbose, #warn
Methods included from HelpText
#cmdalias, #description, included, #long_description, #name
Constructor Details
This class inherits a constructor from BuildTool::Commands::ModuleBasedCommand
Instance Method Details
#applicable? ⇒ Boolean
52 53 54 |
# File 'lib/build-tool/commands/configure.rb', line 52 def applicable? BuildTool::Application.instance.has_recipe? end |
#do_execute_module(mod) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/build-tool/commands/configure.rb', line 65 def do_execute_module( mod ) if mod.checkedout? # clean/from-scratch if @from_scratch remove_build_directory( mod ) elsif @clean clean( mod ) end if @rmcache and !@from_scratch reconfigure( mod ) else configure( mod ) end else info( "Not checked out. Skipping" ) end end |
#initialize_options ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/build-tool/commands/configure.rb', line 28 def . = "Usage: #{self.fullname} [OPTIONS]... MODULES..." .separator( "" ) .separator( "Options" ) @rmcache = false @from_scratch = false @clean = false .on( "--[no-]clean", "Make clean before building." ) { |t| @clean = t } .on( nil, "--from-scratch", "Rebuild from scratch" ) { |t| @from_scratch = true } .on( "--rmcache", "Remove cache file." ) { |t| @rmcache = true } super end |
#is_module_ready?(mod) ⇒ Boolean
56 57 58 59 60 61 62 |
# File 'lib/build-tool/commands/configure.rb', line 56 def is_module_ready?( mod ) isready = true if !mod.checkedout? warn( "#{mod.name}: module not checked out -> skipping." ) end return isready end |
#log? ⇒ Boolean
Log this command if $noop is not active
24 25 26 |
# File 'lib/build-tool/commands/configure.rb', line 24 def log? ! $noop end |