21 Commits

Author SHA1 Message Date
Chris Johns
650c6f9933 sb: Use shebang env python
Closes #4037
2020-08-25 21:21:50 +10:00
Sebastian Huber
784f518df4 Be more resilient against $PATH errors
Close #3781.
2019-12-02 09:45:10 +01:00
Chris Johns
5f7c53a7bd sb: Align the version processing with rtems-tools.
- Use the same VERSION file format as rtems-tools so a common release
  generation can be used.

- The version.py is almost the same as rtems-tools. There are some
  minor differences, one is the RTEMS version is present in this
  file while rtems-tool uses config/rtems-release.ini.

Updates #3822
2019-11-18 11:29:45 +11:00
Chris Johns
a293ddc992 sb: Disable a log file for the check command.
Fix a minor issue in the log module.
2018-01-18 13:38:52 +11:00
Chris Johns
3ddbd791b8 sb: Add an orphan check to sb-check.
The orphans check lets you see which configuration and build set
files in the RSB are not referernced. You can audit the list and
remove any configuration files not being used. Top level
build set files are included so you need to becareful not to
remove something that is valid and useful. To run:

 $ ./source-builder/sb-check --check-orphans
2018-01-18 13:16:47 +11:00
Chris Johns
38ed59a301 sb: Support --dry-run --with-download for 3rd party RTEMS BSP packages.
The building of 3rd party packages for an RTEMS BSP requires a valid
BSP so the standard method to download the source for releasing does
not work. This change adds support to allow this. The RTEMS BSP support
will not generate an error is no BSP or tools are provided or found.

The change addis logic operators to the %if statement so you can '||'
to 'or' and '&&' to 'and' logic expressions.

A new %log directive has been added to clean up the messages.

A new %{!define ...} has been added to aid checking within logic
expressions.

All command line --with/--without now appear as macros.

Add version.version to get just the RTEMS major and minor version.

Some pkg-config issues have been resolved.

Closes #2655.
2016-03-17 16:50:05 +11:00
Chris Johns
3a972f6102 sb: Update code base to support Python3 and Python2.
Fix Windows support to allow MSYS2 Python to be used.

Updates #2619.
2016-03-07 15:02:58 +11:00
Chris Johns
47d703fd8c sb. Add VERSION support for releasing the RSB.
Add support to release the RSB by adding the VERSION file. The file
is a single line with the version.

Fix the reports to include the version. Update the INI file
support to include the details of the build.

Show the GIT or released version when the command starts.

Closes #2480.
2015-12-03 22:25:00 +11:00
Chris Johns
d4eb08f55a Windows native build fixes.
The testing of building on Windows is done using MSYS2.
2015-02-07 17:58:17 +11:00
Chris Johns
04aadb631d Check the user's PATH environment variable. 2014-01-30 14:04:42 +11:00
Chris Johns
1b40c77e7b Make outputing errors optional. 2013-05-15 13:23:41 +10:00
Chris Johns
db65c6aaf1 Support Canadian cross builds on FreeBSD (and other hosts).
Set up the rules to manage the separate host and build setting to
allow a Canadian cross to complete.

Update the scripts to move the build directory and host/build
flags into the defaults so they are common for all build
configurations.
2013-05-15 12:15:14 +10:00
Chris Johns
5142becd8e Refactor the logging support. 2013-04-21 18:37:02 +10:00
Chris Johns
51b40617d2 Provide a better error message. 2013-04-13 10:41:00 +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
5e502a9ab1 Update ^C message to the user. 2013-03-04 18:06:51 +11:00
Chris Johns
b366c7536c Fix the spelling. 2013-02-27 12:26:26 +11:00
Chris Johns
de8f4bfb0f Rename Source Builder to RTEMS Source Builder. 2013-02-23 10:09:40 +11:00
Chris Johns
6e10a49c8b Clean up the exception handling. Lets --help work. 2012-11-10 16:10:30 +11:00
Chris Johns
c80560d9a4 Move into the source-builder tree. 2012-11-06 10:09:40 +11:00