class RBT::Scons

Constants

USE_THIS_COMMAND
#

USE_THIS_COMMAND

#

Public Class Methods

new( commandline_arguments = ARGV, run_already = true ) click to toggle source
#

initialize

#
# File lib/rbt/utility_scripts/scons.rb, line 31
def initialize(
    commandline_arguments = ARGV,
    run_already           = true
  )
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  run if run_already
end

Public Instance Methods

append(this_string) click to toggle source
#

append

This method will simply append data onto the @scons_string. NO checking involved, so call it only when you are sure that you want to add this.

#
# File lib/rbt/utility_scripts/scons.rb, line 85
def append(this_string)
  @scons_string << " #{this_string}"
end
default_prefix()
Alias for: default_prefix?
default_prefix?() click to toggle source
#

default_prefix?

The default prefix is stored here.

#
# File lib/rbt/utility_scripts/scons.rb, line 63
def default_prefix?
  @default_prefix
end
Also aliased as: default_prefix
guess_prefix( of_this_dir = return_pwd ) click to toggle source
#

guess_prefix

of_this_dir should include a ‘-’ guess_prefix sets @default_prefix

#
# File lib/rbt/utility_scripts/scons.rb, line 118
def guess_prefix(
    of_this_dir = return_pwd
  )
  basename = File.basename(of_this_dir).split('-')
  @default_prefix = programs_directory?+
                    basename.first.to_s.capitalize+'/'+
                    basename[1]
  return @default_prefix
end
pinstall() click to toggle source
#

pinstall

Do some postinstall stuff here.

#
# File lib/rbt/utility_scripts/scons.rb, line 105
def pinstall
  system('python setup.py build')
  # sys 'python setup.py install'
  # sys 'python src/script/scons.py build/scons'
  # sys 'python setup.py install'
end
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method RBT::Base#reset
# File lib/rbt/utility_scripts/scons.rb, line 45
def reset
  super()
  infer_the_namespace
  # ======================================================================= #
  # === @scons_string
  # ======================================================================= #
  @scons_string   = "#{USE_THIS_COMMAND} ".dup
  # ======================================================================= #
  # === @default_prefix
  # ======================================================================= #
  @default_prefix = "#{programs_directory?}Libzub/0.2.3"
end
rscons_string()
Alias for: rscons_string?
rscons_string?() click to toggle source
#

rscons_string?

Query method - the ivar @rscons_string contains the configure string object.

#
# File lib/rbt/utility_scripts/scons.rb, line 134
def rscons_string?
  @rscons_string
end
Also aliased as: rscons_string
run() click to toggle source
#

run

run it.

#
# File lib/rbt/utility_scripts/scons.rb, line 143
def run
  opne @scons_string
  system @scons_string
  ewarn 'Todo: do a scons install next?????????????? '\
        'DEBUG from '+sdir(return_pwd)
end
set_prefix( to_this_prefix = @default_prefix ) click to toggle source
#

set_prefix

set_prefix PROGRAMS_DIR+‘/Mppenc/1.16/’

#
# File lib/rbt/utility_scripts/scons.rb, line 72
def set_prefix(
    to_this_prefix = @default_prefix
  )
  to_this_prefix = guess_prefix if to_this_prefix == :guess
  append 'PREFIX='+to_this_prefix
end
set_scons_lib_dir() click to toggle source
#

set_scons_lib_dir

Not sure if this is still needed.

#
# File lib/rbt/utility_scripts/scons.rb, line 94
def set_scons_lib_dir
  _ = 'export SCONS_LIB_DIR=`pwd`/src/engine'
  opne _
  sys _
end