class RBT::Actions::Configure
Constants
- REGEX_TO_CAPTURE_THE_PREFIX_FOR_CMAKE_BUILD_TYPES
#¶ ↑
REGEX_TO_CAPTURE_THE_PREFIX_FOR_CMAKE_BUILD_TYPES
¶ ↑#¶ ↑
- REGEX_TO_CAPTURE_THE_PREFIX_FOR_CONFIGURE_BUILD_TYPES
#¶ ↑
REGEX_TO_CAPTURE_THE_PREFIX_FOR_CONFIGURE_BUILD_TYPES
¶ ↑#¶ ↑
Public Class Methods
new( i = ARGV, run_already = true ) { || ... }
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/configure/configure.rb, line 40 def initialize( i = ARGV, run_already = true, &block ) reset # Must come before set_commandline_arguments(). set_commandline_arguments(i) # ======================================================================= # # === Handle blocks next # ======================================================================= # if block_given? yielded = yield case yielded # ===================================================================== # # === :be_extra_verbose # ===================================================================== # when :be_extra_verbose @internal_hash[:be_extra_verbose] = true end end run if run_already end
Public Instance Methods
automatically_try_to_determine_the_real_build_type()
click to toggle source
#¶ ↑
automatically_try_to_determine_the_real_build_type
¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/configure/configure.rb, line 224 def automatically_try_to_determine_the_real_build_type build_system = RBT.infer_build_system case build_system # ======================================================================= # # === cmake # ======================================================================= # when 'cmake' set_build_type_to_use(:cmake) end end
be_extra_verbose?()
click to toggle source
build_type_is_cmake?()
click to toggle source
build_type_is_configure?()
click to toggle source
build_type_to_use?()
click to toggle source
do_compile_statically( be_verbose = true )
click to toggle source
#¶ ↑
do_compile_statically
¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/configure/configure.rb, line 186 def do_compile_statically( be_verbose = true ) if be_verbose e "#{rev}Enabling static compilation mode next - at the least trying to." end ENV['CFLAGS'] = ENV['CFLAGS']+' -static -g' # This works as-is; determined in June 2023. end
do_run_the_sys_command( i = @internal_hash[:sys_command] )
click to toggle source
#¶ ↑
do_run_the_sys_command
¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/configure/configure.rb, line 212 def do_run_the_sys_command( i = @internal_hash[:sys_command] # This is our default here. ) if be_extra_verbose? e "#{rev}The current working directory is `#{sdir(return_pwd)}#{rev}`." end coloured_and_padded_esystem(i) { :dodgerblue } end
program_version?()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
Calls superclass method
RBT::Action#reset
# File lib/rbt/actions/individual_actions/configure/configure.rb, line 66 def reset super() # ======================================================================= # # === :try_to_use_configure_options # ======================================================================= # @internal_hash[:try_to_use_configure_options] = true # ======================================================================= # # === :be_extra_verbose # ======================================================================= # @internal_hash[:be_extra_verbose] = false # ======================================================================= # # === :build_type_to_use # ======================================================================= # set_build_type_to_use(:configure) end
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/configure/configure.rb, line 238 def run cwd = return_pwd work_on_this_program = File.basename(cwd) @internal_hash[:program_name] = ProgramInformation.program_name(work_on_this_program) @internal_hash[:program_version] = ProgramInformation.program_version(work_on_this_program) cookbook = RBT.return_cookbook_for(@internal_hash[:program_name]) automatically_try_to_determine_the_real_build_type case build_type_to_use? # ======================================================================= # # === :configure # ======================================================================= # when :configure, :default _ = './configure'.dup _ << ' --prefix=/usr/' # ======================================================================= # # === :cmake # ======================================================================= # when :cmake _ = 'cmake'.dup _ << ' -DCMAKE_INSTALL_PREFIX=/usr/' else ewarn "Unknown build type: #{steelblue(build_type_to_use?)}" exit end if try_to_use_configure_options? _ << " #{cookbook.configure_options?}" _.rstrip! # We have to do this in case the above returns an empty String. end # ======================================================================= # # Use a build directory in this event. # ======================================================================= # if cookbook.use_build_directory? name_of_the_build_directory = cookbook.name_of_the_build_directory? if name_of_the_build_directory.nil? name_of_the_build_directory = 'BUILD/' end mkdir(name_of_the_build_directory) cd(name_of_the_build_directory) if build_type_is_configure? _.prepend('.') elsif build_type_is_cmake? _ << (' ..') end end @internal_hash[:sys_command] = _ menu(commandline_arguments?) do_run_the_sys_command(@internal_hash[:sys_command]) end
set_build_type_to_use(i)
click to toggle source