27 Commits

Author SHA1 Message Date
Chris Johns
5e02e80d5a Add --no-download to disable the downloader. 2013-04-15 09:48:42 +10:00
Chris Johns
0565e1fa4b Add support for snapshot testing.
User macro files passed on the command line allow a user to
override the defaults in configuration files to test new changes
in pending releases.

Fix macros issues with keys with more than one map.
2013-04-13 18:29:30 +10:00
Chris Johns
7ed2835f8e Hack in sources and print the macros when tracing. 2013-04-13 10:41:40 +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
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
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
ce5e9911d9 Store downloaded patches in %{_patchdir}. 2013-03-10 14:50:55 +11:00
Chris Johns
54d76bb037 Provide the main package as a function. 2013-03-04 18:03:19 +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
a18e76bd85 If %setup -c then always create and change into the directory. 2013-03-02 16:06:59 +11:00
Chris Johns
7618a74c62 Fix %setup now the scripts have been cleaned up. 2013-03-01 10:01:11 +11:00
Chris Johns
60f70d6c1d Fix the %setup error messages. 2013-02-28 16:36:37 +11:00
Chris Johns
bc710668cf Fix host paths on Windows. 2013-02-27 16:04:29 +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
1b7e392fa1 Make the shell cmd path relative on error. 2013-02-21 10:16:52 +11:00
Chris Johns
e5aa27f028 Make sources directory if it does not exist.
Remove the need to add the --force option. Also revert the force option
back to the --force from --no-force and leave it so the user can
bypass the host check of various packages.
2013-02-21 10:07:04 +11:00
Chris Johns
b112284fb3 Use a relative path for the download notice message. 2013-02-20 14:48:54 +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
e908afb868 Listing options now handle nested directories. 2013-02-14 18:00:38 +11:00
Chris Johns
bd8fef3767 Improve mkdir and rmdir.
Testing on various hosts shows a few problems. These changes seem
to help resolve them.
2013-02-01 12:35:59 +11:00
Chris Johns
e40c4dee09 Fix the parsing of the paths for patches. 2012-11-09 15:40:06 +11:00
Chris Johns
c80560d9a4 Move into the source-builder tree. 2012-11-06 10:09:40 +11:00