class RBT::Scons

Constants

NAMESPACE
#

NAMESPACE

#
USE_THIS_COMMAND
#

USE_THIS_COMMAND

#

Public Class Methods

new( extra_args = nil, run_already = true ) click to toggle source
#

initialize

#
# File lib/rbt/utility_scripts/scons.rb, line 33
def initialize(
    extra_args  = nil,
    run_already = true
  )
  set_extra_args(extra_args)
  reset
  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 86
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 64
def default_prefix?
  @default_prefix
end
Also aliased as: default_prefix
guess_prefix(of_this_dir = Dir.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 119
def guess_prefix(of_this_dir = Dir.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 106
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

#
Calls superclass method RBT::Base#reset
# File lib/rbt/utility_scripts/scons.rb, line 52
def reset # reset tag.
  super()
  @scons_string   = "#{USE_THIS_COMMAND} ".dup
  @default_prefix = "#{programs_directory?}Libzub/0.2.3"
  @namespace = NAMESPACE
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 131
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 140
def run
  opnn; e @scons_string
  system @scons_string
  ewarn 'hmmm do a scons install next?????????????? '\
        'DEBUG from '+sdir(Dir.pwd)
end
set_extra_args(i) click to toggle source
#

set_extra_args

#
# File lib/rbt/utility_scripts/scons.rb, line 45
def set_extra_args(i)
  @extra_args = i
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 73
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 95
def set_scons_lib_dir
  _ = 'export SCONS_LIB_DIR=`pwd`/src/engine'
  opnn; e _
  sys _
end