Class: RBT::Make

Inherits:
CompileBase show all
Defined in:
lib/rbt/make/make.rb,
lib/rbt/make/menu.rb

Overview

RBT::Make

Constant Summary collapse

NAMESPACE =
#

NAMESPACE

#
inspect
DEFAULT_RUN_ALREADY =
#

DEFAULT_RUN_ALREADY

#
false

Constants inherited from Base

Base::ALL_COLOUR_METHODS, Base::ARRAY_KDE_KONSOLE_COLOURS_IN_USE, Base::KONSOLE

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CompileBase

#check_whether_we_will_install_only_programs_from_the_bin_subdirectory, #cleanup_system_tag_directory, #consider_removing_libtool_la_files, #consider_symlinking_cmake_modules, #consider_symlinking_header_files_into_the_usr_include_hierarchy, #consider_symlinking_lib64_into_lib, #cookbook_dataset_autosymlink_lib64?, #cookbook_dataset_program_version?, #create_a_new_current_symlink_here, #create_architecture_file, #do_invoke_symlink_program, #do_play_song, #has_an_error_occurred?, #install_only_binaries?, #is_make_available?, #no_error_has_occurred?, #query_path?, #register_program, #remove_compiling_is_in_progress, #return_chained_programs, #return_files_from_the_profiles_directory, #return_these_programs, #shall_we_symlink_the_header_files_into_the_usr_include_hierarchy?, #silent_redirection?, #store_full_configure_command_into_resources_directory, #symlink_into_tags, #symlink_into_usr_lib_dir?, #symlink_m4_macros, #symlink_program?, #use_gobolinux_symlinkprogram?, #uses_appdir_prefix?

Methods inherited from Base

#abbreviations?, #add_to_the_commandline_arguments, #all_binaries?, #all_libraries?, #always_show_dependencies?, #appdir_location_of?, #append_what_into, #archive_type_of?, #available_programs?, #be_quiet?, #be_verbose?, #begins_with_a_comment?, #capitalize_first_alphabetical_character, #capitalize_program_names?, #cat, #cd_to_the_log_directory, #cd_to_the_temp_directory, #change_directory, #change_permission, #cheering_person?, #chmod, #chop_off_archive, #cliner, #colourize_directory_for_system_results, #colourize_this_error, #colourize_this_file_path, #colourize_this_warning, #commandline_arguments?, #commandline_arguments_without_hyphens?, #config?, #convert_env_variable, #cookbook_files?, #cookbooks_include_this_program?, #copy_directory, #copy_files, #copy_recursively, #cpr, #create_directory, #current_hour?, #dd_mmm_yyy, #debug, #debug?, #determine_appdir_prefix_from_this_input, #determine_archive_type, #directory_expanded_cookbooks?, #directory_validation?, #disable_colours, #display_md5sum?, #do_not_debug, #do_not_show_names, #does_the_cookbook_include_this_program?, #does_this_expanded_cookbook_file_exist_for_this_program?, #does_this_file_exist?, #does_this_file_exist_and_is_it_a_file?, #e, #eblue, #ecomment, #ecrimson, #edir, #editor?, #efancy, #eimp, #email?, #enable_colours, #enable_debug, #ensure_main_encoding_for, #eparse, #esystem_gold, #etomato, #ewarn, #exit_on_unregistered_cookbook_entries?, #exit_program, #expanded_cookbooks_directory_exists?, #fast_return_file_size_of_this_program, #file_compiled_programs?, #file_last_symlinked_program?, #file_predefined_installation_instructions?, #file_programs_version_url, #file_specification_of_registered_cookbook_entries, #find_cookbook_alias_for, #find_this_yaml_file, #first_argument?, #gem_version, #get_all_directories_from, #get_all_files_from, #get_all_programs, #get_date, #get_files_and_directories_from, #go_to_base_dir, #home_dir?, #host_system?, #is_a_64bit_system?, #is_an_archive?, #is_ccache_available?, #is_file?, #is_on_gobolinux?, #is_on_windows?, #is_porg_available?, #is_roebe?, #is_this_a_header?, #is_this_a_library?, #is_this_program_included?, #load_dataset_from_this_expanded_cookbook, #load_yaml, #load_yaml_file_from_the_cookbook_directory_for_this_program, #log_directory?, #main_encoding?, make_command?, #make_install_command?, #move_file, #n_programs_available?, #new_cookbook_instance_for, #no_directory_exists_at, #no_opn, #no_such_file_exists, #open_in_browser, #open_in_editor, #opne, #opnef, #opnerror, #opnewarn, #opnn, #path_to_this_expanded_cookbooks_dataset, #play_song?, #predefined_installation_instructions?, #program_dir?, #program_exists?, #programs_dir?, #project_base_dir?, #project_yaml_directory?, #publish_list_of_all_programs_version, #rarrow?, #rbt_logs?, #read_file, #read_file_in_default_encoding, #readlines, #readlines_with_proper_encoding, #recipes_dir?, #register_sigint, registered_binaries?, #remove, #remove_archive_from_the_end, #remove_comments_from_each_line, #remove_directory, #remove_double_slashes, #remove_file, #remove_file_extension, #remove_newlines, #remove_parens, #remove_symlink, #remove_this_commandline_argument, #remove_trailing_ANSII_escape_code, #remove_unnecessary_data_from_url, #rename, #rename_kde_konsole_tab, #repackage, #report_n_programs, #report_pwd, #report_to_developers, #report_working_directory, #return_all_archives_from_this_directory, #return_commandline_arguments_with_leading_hyphens, #return_current_hour_minutes_second, #return_date, #return_day_of_the_month_based_on_utc, #return_full_time, #return_hours_minutes_seconds_based_on_utc, #return_location_to_this_programs_yaml_file, #return_month_based_on_this_number, #return_month_based_on_utc, #return_n_random_characters, #return_opnn, #return_program_information, #return_program_name, #return_program_name_for_gobolinux_systems, #return_pwd, #return_unicode_warning_symbol_or_empty_string, #return_utc, #return_utc_time_in_a_format_similar_to_slackware, #return_version_of_this_program, #return_weekday_based_on_utc, #return_year_based_on_utc, #rev, #run_ldconfig?, #run_make_then_make_install, #run_simulation=, #run_simulation?, #sanitize_url1_entry, #sdir, #sdir_return_pwd, #set_be_silent, #set_be_verbose, #set_source_directory, #set_use_opn, #set_xorg_buffer, #sfancy, #sfile, #show_overview_over_available_utility_scripts, #silently_create_this_directory_if_it_does_not_yet_exist, #simp, #source_base_directory?, #ssym, #stderr, #store_into_this_directory?, #swarn, #symlink, #symlink_all_files_from_this_directory_to_that_directory, #sysbin_directory?, #sysetc_directory?, #sysinclude_directory?, #syslib_directory?, #sysshare_directory?, #system_directory?, #system_tags?, #temp_directory?, #to_bool, #to_camelcase, #to_unicode, #today?, #touch, #unicode_cliner, #unicode_middle_cliner, #upload_list_of_all_programs_version, #use_ccache?, #use_colours=, #use_colours?, #use_mrxvt?, #use_opn=, #use_opn?, #use_porg?, #use_stow?, #use_tags?, #use_yaml_database_for_tags?, #verbose_truth, #warn_and_exit, #wget, #word_wrap, #write_what_into, #write_what_into_via_unicode, #yes_or_no

Constructor Details

#initialize(optional_commandline_arguments = ARGV, run_already = DEFAULT_RUN_ALREADY) ⇒ Make

#

initialize

By default run_already will be false, as we wish to let the user more easily decide at which point to .run() on this class.

Do note that this class can also be invoked via the following way:

Make.new { :run }
#

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/rbt/make/make.rb', line 48

def initialize(
    optional_commandline_arguments = ARGV,
    run_already                    = DEFAULT_RUN_ALREADY
  )
  register_sigint
  reset
  @run_already = run_already
  set_commandline_arguments(
    optional_commandline_arguments
  )
  # ======================================================================= #
  # === Handle blocks next
  # ======================================================================= #
  if block_given?
    yielded = yield
    handle_this_block(yielded)
  end
  run if @run_already
end

Class Method Details

.[](i = '') ⇒ Object

#

RBT::Make[]

#

562
563
564
# File 'lib/rbt/make/make.rb', line 562

def self.[](i = '')
  new(i).run
end

Instance Method Details

#append_make_options(i) ⇒ Object Also known as: parameters_to_make, append_these_options, append_this_option_to_make, append_these_make_options

#

append_make_options

#

199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/rbt/make/make.rb', line 199

def append_make_options(i)
  # ======================================================================= #
  # Handle String input such as 'foo,bar' or 'foo;bar' next:
  # ======================================================================= #
  if i.is_a? String
    if i.include?(',')
      i = i.split(',')
    elsif i.include?(';')
      i = i.split(';')
    end
  end
  @make_options << i
  @make_options.flatten!
end

#append_these_options?Boolean Also known as: make_options?

#

append_these_options?

#

Returns:

  • (Boolean)

231
232
233
# File 'lib/rbt/make/make.rb', line 231

def append_these_options?
  @make_options
end

#colourize_parser?Boolean Also known as: cparser?

#

colourize_parser?

#

Returns:

  • (Boolean)

170
171
172
# File 'lib/rbt/make/make.rb', line 170

def colourize_parser?
  @colourize_parser
end

#determine_which_commands_to_runObject

#

determine_which_commands_to_run

#

142
143
144
# File 'lib/rbt/make/make.rb', line 142

def determine_which_commands_to_run
  @array_run_these_commands << @use_this_make_command
end

#do_run_make_installObject

#

do_run_make_install

#

277
278
279
# File 'lib/rbt/make/make.rb', line 277

def do_run_make_install
  @run_make_install = true
end

#do_run_the_commands(i = @array_run_these_commands) ⇒ Object

#

do_run_the_commands

This is the main powerhorse method of this class, aka the most important one.

#

449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/rbt/make/make.rb', line 449

def do_run_the_commands(
    i = @array_run_these_commands
  )
  if @run_make
    i.each {|entry|
      unless @make_options.empty?
        # ===================================================================== #
        # Append the make-options to "make" next:
        # ===================================================================== #
        entry = entry.dup if entry.frozen?
        entry << ' '+joined_make_options?
      end
      entry = entry.dup if entry.frozen?
      entry.squeeze!(' ')
      entry << SILENT_REDIRECTION if silent_redirection?
      now_running(entry)
      run_this_command_via_io_popen(entry)
    }
  end
  # ======================================================================= #
  # Next, run "make install" or the equivalent if the user decided
  # that this should be run. 
  # ======================================================================= #
  if run_make_install?
    if @use_porg
      entry = "porg -lp #{@program_name_and_program_version} \"#{make_command?} install\""
      now_running(entry)
      run_this_command_via_io_popen(entry)
    else
      cmd_to_run = "#{make_command?} install"
      esystem cmd_to_run
    end
  end
end

#do_run_the_make_install_step_as_wellObject

#

do_run_the_make_install_step_as_well

#

238
239
240
# File 'lib/rbt/make/make.rb', line 238

def do_run_the_make_install_step_as_well
  determine_whether_to_run_make_install(:yup)
end

#do_use_ninjaObject Also known as: use_ninja

#

do_use_ninja

#

439
440
441
# File 'lib/rbt/make/make.rb', line 439

def do_use_ninja
  set_use_this_command :ninja
end

#do_use_porgObject

#

do_use_porg

#

149
150
151
# File 'lib/rbt/make/make.rb', line 149

def do_use_porg
  @use_porg = true
end

#esystem(i) ⇒ Object

#

esystem

The following is an adaptation to esystem() defined on the toplevel namespace. Internally we use IO.popen, but this is only equivalent to system(), so the leading e (for puts) is omitted. Thus we must display it here, before then calling popen.

#

499
500
501
502
503
# File 'lib/rbt/make/make.rb', line 499

def esystem(i)
  # e mediumturquoise(i) # <- This colour has to be manually synced for now.
  now_running(i) # <- We will use this - seems to be better. Unless we have more system() tasks here.
  run_this_command_via_io_popen(i)
end

#handle_hash_or_symbol(i) ⇒ Object

#

handle_hash_or_symbol

#

319
320
321
322
323
324
325
# File 'lib/rbt/make/make.rb', line 319

def handle_hash_or_symbol(i)
  if i.is_a? Hash
    handle_this_hash(i)
  elsif i.is_a? Symbol
    handle_this_symbol(i)
  end
end

#handle_symbols(i = nil) ⇒ Object Also known as: determine_whether_to_run_make_install, handle_this_symbol

#

handle_symbols

This method will specifically handle Symbols passed as a block to .new().

#

396
397
398
399
400
401
402
403
404
405
406
# File 'lib/rbt/make/make.rb', line 396

def handle_symbols(i = nil)
  return unless i
  case i
  when :run,
       :do_run
    @run_already = true
  when :and_run_make_install_as_well,
       :yup
    @run_make_install = true
  end
end

#handle_this_hash(yielded) ⇒ Object Also known as: handle_this_block

#

handle_this_hash

#

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/rbt/make/make.rb', line 330

def handle_this_hash(yielded)
  if yielded.is_a? Hash
    # ===================================================================== #
    # === append_these_options
    # ===================================================================== #
    if yielded.has_key? :append_these_options
      _ = yielded[:append_these_options]
      _ = _.join(' ').strip if _.is_a? Array
      append_these_options(_.to_s)
    # ===================================================================== #
    # === use_stow
    # ===================================================================== #
    elsif yielded.has_key?(:append)
      append_these_options(yielded[:append].to_s)
    end
    # ===================================================================== #
    # === run_make
    # ===================================================================== #
    if yielded.has_key? :run_make
      @run_make = yielded.delete(:run_make)
    end
    # ===================================================================== #
    # === :use_this_make_command
    # ===================================================================== #
    if yielded.has_key? :use_this_make_command
      use_this_command = yielded.delete(:use_this_make_command)
      set_use_this_make_command(
        use_this_command
      )
    end
    # ===================================================================== #
    # === :use_porg
    # ===================================================================== #
    if yielded.has_key? :use_porg
      use_porg = yielded.delete(:use_porg)
      set_use_porg(
        use_porg
      )
    end
    # ===================================================================== #
    # === :program_name_and_program_version
    # ===================================================================== #
    if yielded.has_key? :program_name_and_program_version
      set_program_name_and_program_version(
        yielded.delete(:program_name_and_program_version)
      )
    end
    # ===================================================================== #
    # === :run_make_install
    # ===================================================================== #
    if yielded.has_key? :run_make_install
      set_run_make_install(
        yielded.delete(:run_make_install)
      )
    end
  elsif yielded.is_a? Symbol
    handle_symbols(yielded)
  end
end

#history_of_commands_run?Boolean

#

history_of_commands_run?

#

Returns:

  • (Boolean)

245
246
247
# File 'lib/rbt/make/make.rb', line 245

def history_of_commands_run?
  @array_history_of_commands_run
end

#joined_make_options?Boolean

#

joined_make_options?

This method will return a String variant of the content found in We have to apply only .rstrip here because there may be valid padding on the left hand side, such as ' install', which may become 'make install' subsequently.

#

Returns:

  • (Boolean)

192
193
194
# File 'lib/rbt/make/make.rb', line 192

def joined_make_options?
  @make_options.join(' ').rstrip
end

#makeObject

#

make

This method will essentially just run “make”, with any options given to make on top of that.

#

255
256
257
258
# File 'lib/rbt/make/make.rb', line 255

def make
  cmd = ('make '+joined_make_options?).strip
  esystem cmd
end
#

menu (menu tag)

#

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/rbt/make/menu.rb', line 14

def menu(
    i = @commandline_arguments
  )
  if i.is_a? Array
    i.each {|entry| menu(entry) }
  else
    case i # case tag
    # ===================================================================== #
    # === rbt_make --ninja
    #
    # We require the two leading -- here, since as of May 2019. The
    # reason being that there is a program called "ninja", and we
    # wish to support installing this program, so we need to distinguish
    # between input that is "ninja" and "--ninja".
    # ===================================================================== #
    when /^--ninja$/
      do_use_ninja
      do_run_the_make_install_step_as_well  
    # ===================================================================== #
    # === rbt_make --porg
    # ===================================================================== #
    when /^--porg$/
      do_use_porg
      do_run_the_make_install_step_as_well
    # ===================================================================== #
    # === rbt_make --fast
    #
    # This entry point will make use of several cores, if the computer
    # has more than one core.
    # ===================================================================== #
    when /^-?-?fast$/
      e 'We will use "make -j 4".'
      set_use_this_command 'make -j 4'
    # ===================================================================== #
    # === rbt_make --show_help
    # ===================================================================== #
    when /-?-?help$/
      show_help
      exit
    # ===================================================================== #
    # === rbt_make --install
    # ===================================================================== #
    when /-?-?install/,
         /-?-?ins/,
         /-?-?i$/
      set_use_this_command 'make install'
    # ===================================================================== #
    # === rbt_make --make-install
    # ===================================================================== #
    when /^-?-?make(-|_)?install$/i,
         /^-?-?install$/i
      do_run_make_install
    end
  end
end

#now_running(i) ⇒ Object

#

now_running

#

487
488
489
# File 'lib/rbt/make/make.rb', line 487

def now_running(i)
  e "Now running `#{mediumturquoise(i)}` from #{sdir_return_pwd}."
end

#resetObject

#

reset

#

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/rbt/make/make.rb', line 71

def reset
  super()
  # ======================================================================= #
  # === @namespace
  # ======================================================================= #
  @namespace        = NAMESPACE
  # ======================================================================= #
  # === @run_make
  # ======================================================================= #
  @run_make         = true # Whether to really invoke "make" or not.
  # ======================================================================= #
  # === @run_make_install
  # ======================================================================= #
  @run_make_install = false
  reset_internal_dataset
end

#reset_internal_datasetObject

#

reset_internal_dataset

#

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/rbt/make/make.rb', line 98

def reset_internal_dataset
  # ======================================================================= #
  # The next Array will keep track as to which commands were run.
  # ======================================================================= #
  @array_history_of_commands_run = []
  # === @make_options
  @make_options = []
  # === @use_this_make_command
  @use_this_make_command = 'make'
  # ======================================================================= #
  # The following Array can be modified by the user.
  # ======================================================================= #
  @array_run_these_commands = []
  # ======================================================================= #
  # We will delegate towards class RBT::ColourizeParser, in order
  # to colourize the output. This could, in principle, be disabled,
  # but I like colours, so the default is to make use of it.
  # ======================================================================= #
  @colourize_parser = RBT::ColourizeParser.new
  # ======================================================================= #
  # The next variable determines whether we will make use of porg
  # during the "make install" step. This is optional, so it will
  # be disabled by default.
  # ======================================================================= #
  @use_porg = false
  # ======================================================================= #
  # The next variable can be used specifically for when we will make use
  # of porg. When set then it should be a String such as "htop-2.2.1".
  # ======================================================================= #
  @program_name_and_program_version = nil
end

#runObject

#

run

#

550
551
552
553
554
555
556
557
# File 'lib/rbt/make/make.rb', line 550

def run
  menu
  if block_given?
    determine_whether_to_run_make_install(yield)
  end
  determine_which_commands_to_run
  do_run_the_commands
end

#run_make_install?Boolean

#

run_make_install?

#

Returns:

  • (Boolean)

270
271
272
# File 'lib/rbt/make/make.rb', line 270

def run_make_install?
  @run_make_install
end

#run_this_command_via_io_popen(entry) ⇒ Object Also known as: run_this_sys_command

#

run_this_command_via_io_popen

#

508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
# File 'lib/rbt/make/make.rb', line 508

def run_this_command_via_io_popen(entry)
  cparser = cparser?
  case entry
  # ======================================================================= #
  # The next line will handle instructions such as:
  #
  #   "make -j4 -j4 install"
  #
  # ======================================================================= #
  when /^make/
    unless is_make_available?
      opnn; e tomato('Note that no binary called ')+sfancy('make')+
              tomato(' is available on this computer system.')
      opnn; e tomato('This means that compilation will typically not work.')
      opnn; e tomato('Thus, we end here at this point - you will need '\
              'a version of ')+sfancy('make')+tomato('.')
      exit_program
    end
  end
  # ======================================================================= #
  # We delegate towards IO.popen next.
  # ======================================================================= #
  io_object = IO.popen(entry, :err => [:child, :out]).each { |line|
    cparser.grab_this_line(line)
    # ===================================================================== #
    # Delegate towards module RBT::Errors::MapLineToASpecificError to
    # register any possible error.
    # ===================================================================== #
    RBT::Errors::MapLineToASpecificError.parse_this_line(line)
    line = cparser.line?
    # ===================================================================== #
    # Store the line in our history:
    # ===================================================================== #
    @array_history_of_commands_run << line
    e line # Output here.
  }
  io_object.close # Close it up again.
end

#set_commandline_arguments(i = nil) ⇒ Object

#

set_commandline_arguments

#

284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/rbt/make/make.rb', line 284

def set_commandline_arguments(
    i = nil
  )
  if i.is_a? Hash
    # ===================================================================== #
    # First pass into a special method:
    # ===================================================================== #
    handle_hash_or_symbol(i)
    # ===================================================================== #
    # === :use_this_make_command
    # ===================================================================== #
    if i.has_key? :use_this_make_command
      set_use_this_make_command(
        i.delete(:use_this_make_command)
      )
    end
    # ===================================================================== #
    # === :run_make_install
    # ===================================================================== #
    if i.has_key? :run_make_install
      if (i.delete(:run_make_install) == true) # Query for truthness.
e 'WE WANT TO APPEND SHIT'
exit
        try_to_append_this_option_to_make(
          ' install'
        )
      end
    end
  end
  @commandline_arguments = [i].flatten.compact
end

#set_program_name_and_program_version(i) ⇒ Object

#

set_program_name_and_program_version

#

263
264
265
# File 'lib/rbt/make/make.rb', line 263

def set_program_name_and_program_version(i)
  @program_name_and_program_version = i
end

#set_run_make_install(i) ⇒ Object

#

set_run_make_install

#

91
92
93
# File 'lib/rbt/make/make.rb', line 91

def set_run_make_install(i)
  @run_make_install = i
end

#set_use_porg(i = false) ⇒ Object

#

set_use_porg

#

133
134
135
136
137
# File 'lib/rbt/make/make.rb', line 133

def set_use_porg(
    i = false
  )
  @use_porg = i
end

#set_use_this_make_command(i = :default) ⇒ Object Also known as: set_use_this_command

#

set_use_this_make_command

We need this setter-method so that we can toggle between, e. g. “make” or “ninja” or any other similar build system.

#

415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# File 'lib/rbt/make/make.rb', line 415

def set_use_this_make_command(
    i = :default
  )
  case i
  when :make_install
    # ===================================================================== #
    # This one is a bit different - we will only run "make install"
    # here, not both "make" and "make install" combined.
    # ===================================================================== #
    i = 'make' # Handle "make install" instruction here.
    append_this_option_to_make('install')
  when :ninja
    i = 'ninja'
  when :rake
    i = 'rake'
  when :default, nil, :make
    i = 'make' # <- We need to use a sane default value, aka "make".
  end
  @use_this_make_command = i
end

#show_helpObject

#

show_help (help tag)

#

156
157
158
159
160
161
162
163
164
165
# File 'lib/rbt/make/make.rb', line 156

def show_help
  help_string = <<-EOF

Documented options include:

 #{gold('--fast')} # #{slateblue('make use of more than one CPU core')}

EOF
  e help_string
end

#try_to_append_this(i = ' install') ⇒ Object Also known as: try_to_append_this_option_to_make

#

try_to_append_this

#

220
221
222
223
224
225
226
# File 'lib/rbt/make/make.rb', line 220

def try_to_append_this(
    i = ' install'
  )
  unless use_which_command?.end_with? i
    append_these_make_options(i)
  end
end

#use_which_make_command?Boolean Also known as: use_which_command?, make_command?

#

use_which_make_command?

#

Returns:

  • (Boolean)

177
178
179
# File 'lib/rbt/make/make.rb', line 177

def use_which_make_command?
  @use_this_make_command
end