99 Commits

Author SHA1 Message Date
Chris Johns
72f89c5fc9 sb: Output the new info message.
With the set builder add nesting count support.
2013-09-03 08:29:36 +10:00
Chris Johns
869b8a6bd3 sb: Fix the copy tree.
Python's distutil's copy tree code maintains a cache of directories
created so deleting a tree a different way then coping the same
tree results in an error because the destination folders in the
tree are not present because distutils thinks they exist. The
solution is to implement a copy tree function.
2013-08-15 12:20:29 +10:00
Chris Johns
01b28157ff SB: Fix internal build and mailing. Output errors to the log. 2013-07-21 10:22:03 +10:00
Chris Johns
ebf8a1f0f8 Automtically build the Autotools to bootstrap RTEMS.
This changes adds support to build the autotools if the host installed
version is not a suitable version. Autoconf and automake have hard coded
references to the install prefix and host tools and this makes it impossible
to relocate, that is use in any path other than the install prefix. To
bootstrap automake you need to first build a suitable autoconf and with that
you can built automake for the install prefix. The other complication is
not referencing the install prefix in the path when building in the RSB.
Having the install prefix in the path can result in strange issues appearing
such as gcc using a new assembler feature not present in an older assember
installed under the install prefix.

The process is to build the autotools using an install prefix to an
internal path inside the RSB temporary path and to use that autoconf
to build the version for the install prefix. The internal install
prefix version is also used to bootstrap RTEMS.
2013-07-16 10:02:41 +10:00
Chris Johns
8a1e7a0ab0 Add better error messages. 2013-05-14 11:12:54 +10:00
Chris Johns
04f447f979 Show a trace message on copy when with --dry-run. 2013-05-13 14:47:14 +10:00
Chris Johns
df56f7ee09 Improve the email reporter. 2013-05-01 10:42:08 +10:00
Chris Johns
c914e1d306 Add tail support to the log. Email the log tail in a failure. 2013-05-01 10:08:36 +10:00
Chris Johns
97a685fae3 Add mail support to mail reports. 2013-04-30 11:20:54 +10:00
Chris Johns
adf09460a2 Report from the setbuilder's build config.
Refactor the reporter to allow the setbuilder to use its build config
rather than regenerating the configuration from the configuration file.
Using the config file and the build macros exposed an issue if a
macro was undefined that was defined in a build set above the
config file. Using the build set's configuration as used to build
is a better solution.

The reporter was refactored to allow a config class to be used
to report.

The setbuild can now take a configuration file as an input file.
2013-04-29 09:01:14 +10:00
Chris Johns
5142becd8e Refactor the logging support. 2013-04-21 18:37:02 +10:00
Chris Johns
2cc7a974a5 PR 2117 - Only check the prefix is writable if installing and not a dry run. 2013-04-15 12:16:26 +10:00
Chris Johns
9994530920 PR 2115 - Check prefix path write access before starting to build.
Added a check in the options post processing to check is the
prefix path allows writes. No actual write check is made. just
the permissions are checked. If the --no-install options is
used the check is not made.

Moved the --no-install option from the set builder to the options
module.
2013-04-15 10:05:23 +10:00
Chris Johns
8508944647 PR 2115 - Fixed the exception on no 'what'. 2013-04-15 09:48:42 +10:00
Chris Johns
e45a2e4b1d Bug fix the list name. 2013-04-14 07:54:58 +10:00
Chris Johns
cb12e4875c 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.
2013-04-09 13:51:43 +10:00
Chris Johns
54993543d7 Remove the deep copy and use a shallow copy so it worked on Python 2.6. 2013-04-06 08:28:09 +11:00
Chris Johns
affea817cd Fix the version module's name. 2013-04-05 14:10:48 +11:00
Chris Johns
efb6688be0 Support a common verion number for all commands. 2013-04-05 09:17:47 +11:00
Chris Johns
0add2eaa70 PR 2108, PR 2109. Add --jobs and --always-clean.
Refactor the options handling in defaults.py to allow the --jobs
option have varing specific parameters. The option supports 'none',
'max' and 'half' or a fraction to divide the number of CPUs or
an integer value which is the number of jobs. The --no-smp has
been removed.

The host specific modules have been changed to set the number of
CPUs in the defaults table.

Fixed the --keep-going to clean up is --always-clean is provided
even if the build has an error.
2013-04-03 14:31:41 +11:00
Chris Johns
4f26bdb2f0 Add Canadian Cross support.
Add support to build MinGW tools using Cygwin. This is a Canadian cross
build.

Do not expand the directives when parsing a configuration file. Hold
in the package object the text as read from the configuration file. Still
parse the logic but leave the macros. This allows a configuration to be
varied when the build happens. The Canadian cross uses this to build a
build compiler used to build a Cxc runtime.

Add Cxc support to the build module. In the defaults add rm and rmfile
macros, add Cxc paths and pre-build script code.

In the setbuilder check for a Cxc build and if so and the package
allow Cxc build the build host version then the host target
version.

Add cygiwn support to the defaults processing and to the Windows module.
2013-04-01 15:19:56 +11:00
Sebastian Huber
1e1ea1e1a2 Install reports under "share" directory
This is normally the place for architecture-independent (shared) data.
2013-03-23 08:55:56 +11:00
Chris Johns
aa4f8f66e0 Generate a better error message. Use the package name in the installing message. 2013-03-15 15:34:24 +11:00
Chris Johns
fa653c2ce2 Use the new opts define and add an undefine. 2013-03-12 18:30:15 +11:00
Chris Johns
5cba075c71 Improve the parsing in build set files. 2013-03-11 10:39:57 +11:00
Chris Johns
b48dc23f95 Define as a macro as the remaining fields of the split. 2013-03-08 18:20:11 +11:00
Chris Johns
79f80fd979 Add a deps option to print the dependent config files. 2013-03-07 15:23:29 +11:00
Chris Johns
984e4e6f39 Provide better control of sharing the defaults.
When using the set builder and nesting builds prpvide the nested
set builder and build objects with copies of the master defaults.
Python's variable sharing was sharing a single set of defaults
across all build sets and this resulted in popluted configurations.
2013-03-06 13:30:54 +11:00
Chris Johns
5e883dbc6f Do not copy on a dry run. 2013-03-06 12:35:01 +11:00
Chris Johns
0606a65718 Clean path when building autoconf and automake.
Autoconf hard codes paths into itself. This change is a first
pass at allowing a clean environment to let automake build. The
ability to 'make install DESTDIR=xxx' autoconf then use it to
build automake needs a clean environment. The purpose is to
allow a prefix that needs root without building and packaging
when root.
2013-03-05 19:43:43 +11:00
Chris Johns
06834cfcf5 Build set reports are the package name and not the config name. 2013-03-04 18:07:38 +11:00
Chris Johns
0759d98628 Move find_configs to build and fix. Install reports to 'rtems-source-builder'. 2013-03-04 10:14:57 +11:00
Chris Johns
864e8ff9fa Clean up build set configuration reporting. 2013-03-04 09:42:08 +11:00
Chris Johns
c18c4b6d33 Catch any importing errors. 2013-03-04 09:17:41 +11:00
Chris Johns
26595c7b29 Create a report for each configuration file installed.
Add reporting to the build set building. Add options to disable reporting
and control the report format.
2013-03-04 09:14:11 +11:00
Chris Johns
d63f135f5d Make the bset/cfg lister a function. 2013-02-28 20:43:33 +11:00
Chris Johns
dab4a9bbbe Check the dry-opt option before doing the install. 2013-02-24 18:15:12 +11:00
Chris Johns
de8f4bfb0f Rename Source Builder to RTEMS Source Builder. 2013-02-23 10:09:40 +11:00
Chris Johns
ee47d7210e Create tar directory when making build set tar files.
Move the mkdir and removeall code from the build module to the path
module.
2013-02-22 14:44:51 +11:00
Chris Johns
cafbcc611b Support directly installing.
By default the Source Builder now directly installs in the prefix and
does not create tar files. You need to supply options to create build
set level tar files and/or package level tar files.
2013-02-21 19:03:09 +11:00
Chris Johns
729f0bb61f Build sets can optional keep going on failure to support tool build testing.
The --keep-going option lets a build set continue if it fails. The keep
going is only at the build set level and not at the package level.
2013-02-21 10:17:24 +11:00
Chris Johns
251a42d399 Output the time a build set takes. 2013-02-20 17:30:59 +11:00
Chris Johns
4f8fb656c4 Fix the path handling of nesting build sets. 2013-02-20 16:38:46 +11:00
Chris Johns
ab99d6fe8c Print the installed path as relative. 2013-02-19 20:04:26 +11:00
Chris Johns
fba1136108 Build Sets can reference other build sets.
A build set can invoke another build set. This allows an 'all'
type build set that builds all the RTEMS archs.

Change the get config call to return a map of paths and files.
2013-02-19 19:00:56 +11:00
Chris Johns
8d7624e1d4 Clean _tmproot. Move config listing to the setbuilder module.
Add the mising _tmprool clean.

Move the list printing out of the build which now just returns a
list of config files to the location of the options.
2013-02-17 11:50:02 +11:00
Chris Johns
6fad89b9b0 Default a define with no value to 1. 2013-02-11 14:22:02 +11:00
Chris Johns
2f72d35a79 Add per arch build sets using %include.
Add per arch build sets as this is really what RTEMS needs. You
can then vary the version based on the architecture.

Add '%include' to the buildset files.
2013-02-09 19:07:37 +11:00
Chris Johns
c80560d9a4 Move into the source-builder tree. 2012-11-06 10:09:40 +11:00