summaryrefslogtreecommitdiffstats
path: root/source-builder/sb-defaults
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-04-09 13:51:43 +1000
committerChris Johns <chrisj@rtems.org>2013-04-09 13:51:43 +1000
commitcb12e4875c203f794a5cd4b3de36101ff9a88403 (patch)
tree26b85a25d05806ea75ecc41ca3590b65c6a248a3 /source-builder/sb-defaults
parentAdd the GCC version message. (diff)
downloadrtems-source-builder-cb12e4875c203f794a5cd4b3de36101ff9a88403.tar.bz2
Refactor defaults, macros and options.
To support building snapshots and pre-release source the defaults has been refactored. The defaults have been moved to a stand alone file and a macros.py module added. This modile abstracts the old default dictionary turning it into a class. The macros class can load macros from a file therefore the defaults have been moved to a stand alone file. The use of defaults has been removed from the project. The only case where it is used in the options where the defaults are read from a file. Macros are used everywhere now. The defaults.py has been moved to the option.py and the separate options and defaults values has been moved to a new pattern. When constructing an object that needs macros and options if the macros passed in is None the defaults from the options are used. This makes it clear when the defaults are being used or when a modified set of macros is being used. The macros class support maps. The default is 'global' and where all the defaults reside and where configuratiion file changes end up. Maps allow macros to be read from a file and override the values being maintained in the 'global' map. Reading a macro first checks the map and if not present checks the 'global' map. The addition of maps to the macros provides the base to support snapshots and pre-release testing with standard configurations. This functionality needs to be added. It works by letting to specify a snapshot with: source0: none, override, 'my-dist.tar.bz2' and it will be used rather the value from the standard configuration. With a build set you need to also specify the package these macros are for. The maps provide this.
Diffstat (limited to 'source-builder/sb-defaults')
-rwxr-xr-xsource-builder/sb-defaults4
1 files changed, 2 insertions, 2 deletions
diff --git a/source-builder/sb-defaults b/source-builder/sb-defaults
index 2ae5b3d..37dac2a 100755
--- a/source-builder/sb-defaults
+++ b/source-builder/sb-defaults
@@ -22,8 +22,8 @@ import sys, os
base = os.path.dirname(sys.argv[0])
sys.path.insert(0, base + '/sb')
try:
- import defaults
- defaults.run(sys.argv)
+ import options
+ options.run(sys.argv)
except ImportError:
print >> sys.stderr, "Incorrect Defaults installation"
sys.exit(1)