Index: linkers/wscript
===================================================================
--- linkers/wscript	(revision 73388116079288523c84f4c93fe19646c34644b9)
+++ linkers/wscript	(revision b7d48ef5a4a09010305a5981f64005161a34409d)
@@ -9,10 +9,10 @@
 
 def options(opt):
-    opt.load("g++")
-    opt.load("gcc")
+    opt.load('compiler_c')
+    opt.load('compiler_cxx')
 
 def configure(conf):
-    conf.load("g++")
-    conf.load("gcc")
+    conf.load('compiler_c')
+    conf.load('compiler_cxx')
 
     conf.env.C_OPTS = conf.options.c_opts.split(',')
Index: rtemstoolkit/macros.py
===================================================================
--- rtemstoolkit/macros.py	(revision 73388116079288523c84f4c93fe19646c34644b9)
+++ rtemstoolkit/macros.py	(revision b7d48ef5a4a09010305a5981f64005161a34409d)
@@ -34,4 +34,5 @@
 
 import copy
+import inspect
 import re
 import os
@@ -72,9 +73,19 @@
             self.read_map_locked = False
             self.write_map = 'global'
+            self.rtpath = path.abspath(path.dirname(inspect.getfile(macros)))
+            if path.dirname(self.rtpath).endswith('/share/rtems'):
+                self.prefix = path.dirname(self.rtpath)[:-len('/share/rtems')]
+            else:
+                self.prefix = '.'
             self.macros['global'] = {}
             self.macros['global']['nil'] = ('none', 'none', '')
-            self.macros['global']['_cwd'] = ('dir', 'required', path.abspath(os.getcwd()))
-            self.macros['global']['_rtdir'] = ('dir', 'required', path.abspath(rtdir))
-            self.macros['global']['_rttop'] = ('dir', 'required', path.abspath(path.dirname(rtdir)))
+            self.macros['global']['_cwd'] = ('dir',
+                                             'required',
+                                             path.abspath(os.getcwd()))
+            self.macros['global']['_prefix'] = ('dir', 'required', self.prefix)
+            self.macros['global']['_rtdir'] = ('dir',
+                                               'required',
+                                               path.abspath(self.expand(rtdir)))
+            self.macros['global']['_rttop'] = ('dir', 'required', self.prefix)
         else:
             self.macros = {}
@@ -420,6 +431,12 @@
     def expand(self, _str):
         """Simple basic expander of config file macros."""
+        start_str = _str
         expanded = True
+        count = 0
         while expanded:
+            count += 1
+            if count > 1000:
+                raise error.general('expansion looped over 1000 times "%s"' %
+                                    (start_str))
             expanded = False
             for m in self.macro_filter.findall(_str):
@@ -427,5 +444,4 @@
                 macro = self.get(name)
                 if macro is None:
-                    print self.macros
                     raise error.general('cannot expand default macro: %s in "%s"' %
                                         (m, _str))
@@ -475,4 +491,5 @@
     import copy
     import sys
+    print inspect.getfile(macros)
     m = macros(name = 'defaults.mc')
     d = copy.copy(m)
Index: rtemstoolkit/wscript
===================================================================
--- rtemstoolkit/wscript	(revision 73388116079288523c84f4c93fe19646c34644b9)
+++ rtemstoolkit/wscript	(revision b7d48ef5a4a09010305a5981f64005161a34409d)
@@ -15,10 +15,10 @@
 
 def options(opt):
-    opt.load("g++")
-    opt.load("gcc")
+    opt.load('compiler_c')
+    opt.load('compiler_cxx')
 
 def configure(conf):
-    conf.load("g++")
-    conf.load("gcc")
+    conf.load('compiler_c')
+    conf.load('compiler_cxx')
     conf_libiberty(conf)
     conf_libelf(conf)
@@ -100,4 +100,27 @@
               cxxflags = conf['cxxflags'] + conf['warningflags'],
               linkflags = conf['linkflags'])
+
+    #
+    # The Python toolkit.
+    #
+    bld(features = 'py',
+        source = ['__init__.py',
+                  'check.py',
+                  'config.py',
+                  'darwin.py',
+                  'error.py',
+                  'execute.py',
+                  'freebsd.py',
+                  'git.py',
+                  'linux.py',
+                  'log.py',
+                  'macros.py',
+                  'mailer.py',
+                  'options.py',
+                  'path.py',
+                  'stacktraces.py',
+                  'version.py',
+                  'windows.py'],
+        install_path = '${PREFIX}/share/rtems/rtemstoolkit')
 
 def rebuild(ctx):
Index: tester/rt/options.py
===================================================================
--- tester/rt/options.py	(revision 73388116079288523c84f4c93fe19646c34644b9)
+++ tester/rt/options.py	(revision b7d48ef5a4a09010305a5981f64005161a34409d)
@@ -49,4 +49,9 @@
 import version
 
+#
+# The path for the defaults.
+#
+defaults_mc = 'rtems/testing/defaults.mc'
+
 class command_line(options.command_line):
     """Process the command line in a common way for all Tool Builder commands."""
@@ -72,5 +77,5 @@
 def load(args, optargs = None,
          command_path = None,
-         defaults = '%{_rtdir}/rtems/testing/defaults.mc'):
+         defaults = '%s' % (defaults_mc)):
     #
     # The path to this command if not supplied by the upper layers.
@@ -81,4 +86,15 @@
             command_path = '.'
     #
+    # Check if there is a defaults.mc file under the command path. If so this is
+    # the tester being run from within the git repo. If not found assume the tools
+    # have been installed and the defaults is in the install prefix.
+    #
+    print path.join(command_path, defaults_mc)
+    if path.exists(path.join(command_path, defaults_mc)):
+        rtdir = command_path
+    else:
+        rtdir = '%{_prefix}/share/rtems/tester'
+    defaults = '%s/%s' % (rtdir, defaults_mc)
+    #
     # The command line contains the base defaults object all build objects copy
     # and modify by loading a configuration.
@@ -86,6 +102,5 @@
     opts = command_line(args,
                         optargs,
-                        macros.macros(name = defaults,
-                                      rtdir = command_path),
+                        macros.macros(name = defaults, rtdir = rtdir),
                         command_path)
     options.load(opts)
@@ -94,5 +109,5 @@
 def run(args):
     try:
-        _opts = load(args = args, defaults = 'rtems/testing/defaults.mc')
+        _opts = load(args = args, defaults = defaults_mc)
         log.notice('RTEMS Test - Defaults, v%s' % (version.str()))
         _opts.log_info()
Index: tester/rt/test.py
===================================================================
--- tester/rt/test.py	(revision 73388116079288523c84f4c93fe19646c34644b9)
+++ tester/rt/test.py	(revision b7d48ef5a4a09010305a5981f64005161a34409d)
@@ -308,5 +308,5 @@
         sys.exit(2)
     except KeyboardInterrupt:
-        if opts.find_arg('--stacktrace'):
+        if opts is not None and opts.find_arg('--stacktrace'):
             print '}} dumping:', threading.active_count()
             for t in threading.enumerate():
Index: tester/rtems-test
===================================================================
--- tester/rtems-test	(revision 73388116079288523c84f4c93fe19646c34644b9)
+++ tester/rtems-test	(revision b7d48ef5a4a09010305a5981f64005161a34409d)
@@ -33,5 +33,6 @@
 base = os.path.dirname(os.path.abspath(sys.argv[0]))
 parent = os.path.dirname(base)
-sys.path = [base, parent] + sys.path
+rtems = os.path.join(parent, 'share', 'rtems')
+sys.path = [base, parent, rtems] + sys.path
 
 try:
Index: tester/rtems/testing/defaults.mc
===================================================================
--- tester/rtems/testing/defaults.mc	(revision 73388116079288523c84f4c93fe19646c34644b9)
+++ tester/rtems/testing/defaults.mc	(revision b7d48ef5a4a09010305a5981f64005161a34409d)
@@ -76,5 +76,4 @@
 _localedir:          dir,     none,     '%{_datadir}/locale'
 _localstatedir:      dir,     none,     '%{_prefix}/var'
-_prefix:             dir,     none,     '%{_usr}'
 _usr:                dir,     none,     '/usr/local'
 _usrsrc:             dir,     none,     '%{_usr}/src'
Index: tester/wscript
===================================================================
--- tester/wscript	(revision 73388116079288523c84f4c93fe19646c34644b9)
+++ tester/wscript	(revision b7d48ef5a4a09010305a5981f64005161a34409d)
@@ -1,5 +1,5 @@
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2014 Chris Johns (chrisj@rtems.org)
+# Copyright 2015 Chris Johns (chrisj@rtems.org)
 # All rights reserved.
 #
@@ -35,12 +35,47 @@
         ctx.recurse(sd)
 
-def options(ctx):
-    recurse(ctx)
+def options(opt):
+    recurse(opt)
+    opt.load('python')
 
 def configure(ctx):
     recurse(ctx)
+    conf.load('python')
+    conf.check_python_version((2,7,3))
 
-def build(ctx):
-    recurse(ctx)
+def build(bld):
+    recurse(bld)
+
+    #
+    # Install the tester code.
+    #
+    bld(features = 'py',
+        source = ['rt/__init__.py',
+                  'rt/bsps.py',
+                  'rt/config.py',
+                  'rt/console.py',
+                  'rt/gdb.py',
+                  'rt/options.py',
+                  'rt/report.py',
+                  'rt/stty.py',
+                  'rt/test.py',
+                  'rt/version.py'],
+        install_path = '${PREFIX}/share/rtems/rt')
+    bld(features = 'py',
+        source = ['rt/pygdb/__init__.py',
+                  'rt/pygdb/mi_parser.py',
+                  'rt/pygdb/spark.py'],
+        install_path = '${PREFIX}/share/rtems/rt/pygdb')
+    bld.install_files('${PREFIX}/bin', ['rtems-test'], chmod = 0755)
+    bld.install_files('${PREFIX}/bin', ['rtems-test'], chmod = 0755)
+
+    #
+    # Install the tester configuration files.
+    #
+    config = bld.path.find_dir('rtems')
+    bld.install_files('${PREFIX}/share/rtems/tester/rtems',
+                      config.ant_glob('**', excl=['*~']),
+                      cwd = config,
+                      relative_trick = True)
 
 def install(ctx):
Index: tools/gdb/python/wscript
===================================================================
--- tools/gdb/python/wscript	(revision 73388116079288523c84f4c93fe19646c34644b9)
+++ tools/gdb/python/wscript	(revision b7d48ef5a4a09010305a5981f64005161a34409d)
@@ -4,8 +4,9 @@
 
 def options(opt):
-    pass
+    opt.load('python')
 
 def configure(conf):
     conf.load('python')
+    conf.check_python_version((2,7,3))
 
 def build(bld):
@@ -27,4 +28,5 @@
               'threads.py',
               'watchdog.py']
-    bld(features = 'py', source = source, install_path = None)
-    bld.install_files('${PREFIX}/share/gdb/python/rtems', source)
+    bld(features = 'py',
+        source = source,
+        install_path = '${PREFIX}/share/gdb/python/rtems')
