49 Commits

Author SHA1 Message Date
Chris Johns
c98555c5f2 sb: Do not filter -f options from a BSP. 2016-04-15 11:59:30 +10:00
Chris Johns
29819a2719 sb: fix the if logic to handle directives in if statements.
Directives in if statements end at the end of an if. The cannot
change or split across directive boundaries.

Add more trace detail to config.py.

Updates #2661.
2016-03-19 17:25:34 +11:00
Chris Johns
721fbe05a1 sb: Fix vairable type in _if.
Updates #2655.
2016-03-18 14:41:03 +11:00
Chris Johns
eb252061aa sb: Fix op parsing bug where the string was not created.
Updates #2655.
2016-03-18 14:41:03 +11:00
Chris Johns
8bde727065 sb: Fix %if logical OP parsing.
Updates #2655.
2016-03-18 10:45:28 +11:00
Chris Johns
db8ec8c99e bare: Update qemu package source hashes that are missing.
Add support for pkgconfig checks to fail when just downloading the
source so it is actually downloaded on hosts that may have a package
installed.

Updates #2657.
2016-03-17 18:30:13 +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
27a934e46c Remove the warning when undefining an undefined macro. 2015-12-11 16:31:05 +11:00
Chris Johns
6444d5806d Canandian Cross Compiling and RTEMS 3rd party package building Fixes.
The change fixes installing for RTEMS 3rd Party packages where the
RSB considered them Canadian Cross Compiling (Cxc). Fixing the
Cxc issue broke real Cxc builds. The change corrects the issue of
macros being changed in the Cxc and the prep data not being udpated.
The configuration is loaded again after the updated macros. The
macros are also copied and restored to ensure a clean stable base.

The change also introduces --rtems-tools and --rtems-bsp to align
the command line with the waf configure process or RTEMS application.
2015-07-20 13:49:42 +10:00
Chris Johns
99768016de sb: Expand each data line. 2015-06-05 16:58:29 +10:00
Chris Johns
2b4cd57ed8 sb: Fix the if logic for parameters. 2014-08-23 13:26:24 +00:00
Chris Johns
257d1e4378 rtems-4.11: Fix building the SPARC simulator.
Add support for simulator options to enable special features of
some gdb simulators.
2014-08-21 22:40:47 +10:00
Chris Johns
a083b52921 Add checksum support for downloaded files.
File download by http, ftp, pw support checksum. The %hash
directive provides a means of setting a hash used to
checksum the file.

Files on disk or just downloaded are checked.
2014-07-29 16:35:43 +10:00
Chris Johns
62cb64747f sb: Trace relative paths for nesting configs. 2014-06-17 10:58:30 +12:00
Chris Johns
0ffee19316 sb: Add support for building RTEMS 3rd party packages.
Remove the 'opt' from various macros and shell variables.

Add pkgconfig to the checks to make it clear the check is a
pkgconfig check.

Add NTP support as the first package to be built using the RSB.

Split the RTEMS URL's out from the base bset file into a separate
file that be included by other files.

Add an RTEMS BSP configuration file to help abstract the process
of building 3rd party packages.

Clean the cross and canadian cross support up so we can cleanly support
cross and canadian cross building.

Refactor the pkgconfig support and clean up the PC file handling of
loading modules.

Add support for %{?..} to return false if a macro is %{nil}.

Add %{pkgconfig ..} support to allow better control of access RTEMS
pkgconfig files.
2014-06-15 17:40:34 +12:00
Chris Johns
9a15c40e1b sb: Implement %source and %patch to manage source and patches.
Remove the numbered source and patches and automatically manage
sources and patches. This removes the overhead in maintaining large
collections of patches.
2014-05-13 23:26:09 +10:00
Chris Johns
f3b549010d config,sb: Qemu build updates for FreeBSD and the start of MinG32.
Hack round the FreeBSD iconv support in Freebsd 10. In 10 libc now
supports iconv however iconv.h is present under /usr/local.

Start to add support to build qemu for MinGW via a Cxc. This is a
work in progress and contains lots of hidden traps.

In config.py separate out of the canadian build status.
2014-04-08 15:11:00 +10:00
Chris Johns
c5b5493c19 config: Change pkgconfig to check.
Add the extra actions: ccflags, cflags, ldflags and libs to allow the
fetching of these from pkg-config files.
2014-02-11 14:06:45 +11:00
Chris Johns
c4fefdeb55 sb: Add pkg-config support.
Add a pkg-config look alike command so packages that use pkg-config can
build if pkg-config is not present on a host.

Add support to query package config from configuration scripts.
2014-02-11 10:18:35 +11:00
Chris Johns
7a691b8280 sb: Fix the config _parse args. 2013-09-03 08:50:06 +10:00
Chris Johns
845e92ffce sb: Fix nesting if statements.
Nesting if statements did not correctly process the contents of
the nested if script. This change makes the processing uniform
across all the logic stages.
2013-09-03 08:30:26 +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
5237f1ccb7 Fix support for Windows (MinGW) native builds using MSYS.
Fix paths that need to be coverted to host format.

The shell expansion needs to invoke a shell on Windows as cmd.exe
will not work.

Munch the paths into smaller sizes for Windows due to the limited
path size.
2013-05-13 14:44:49 +10:00
Chris Johns
8837860347 Add a function to return the config file name. 2013-04-29 08:59:53 +10:00
Chris Johns
22afed354e Fix the trace message for _disable. 2013-04-28 15:51:51 +10:00
Chris Johns
517f03669c Add '%disable select' to turn off the macros maps. 2013-04-27 20:26:49 +10:00
Chris Johns
5142becd8e Refactor the logging support. 2013-04-21 18:37:02 +10:00
Chris Johns
b8ee74d356 Add a %testing section to the configuration files. 2013-04-15 13:26:36 +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
376aabf5e4 Another defines bug fix. 2013-04-13 10:39:02 +10:00
Chris Johns
5c7b1ef1e7 Package data into macro, sources from macro and a bug fix.
Package descritions and info and now always added to macros.

Hack to get the source in macros into the source this. This needs
to move to the package class and will soon.

Fix a bug where the old defines was still referenced.
2013-04-13 10:34:47 +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
e4cb1d01d6 Report the exit code on a shell macro failure. 2013-04-03 08:56:35 +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
aabd20d513 Clean up the error message. 2013-03-11 10:37:13 +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
50da39a33a Macro %define updates an existing macro.
Analysis of the current script shows a number of updates are happening
and this should be the default.
2013-03-08 13:58:48 +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
3b0ce4e0fa More info helpers, allow info to append and fix %{?} expansion.
Add URL and summary to the info helpers. Fix the package get_info and
allow infos to be appended to. This lets a summary be on more than
one line.

Fix the %{?} expansion logic so %{?macro} expands to the macro if it
exists.
2013-03-04 18:04:00 +11:00
Chris Johns
c18c4b6d33 Catch any importing errors. 2013-03-04 09:17:41 +11:00
Chris Johns
45ca8cf134 Conditional macros are defined for true else must be 0 for false.
The RPM spec file will return value for %{?macro:value} if the
macro is defined. This means you need to:

%if %something
 %define macro 1
%else
 %undefine macro
%endif

which means you have to have more complex tests to check for the macro
and its value. Therefore we support defined as true and defined and
0 as false.
2013-03-02 16:08:05 +11:00
Chris Johns
c096c20d7b Fix %{?:} and %{!?:} conditional macros.
Building on Windows showed the --enable-plugin was being set yet
it was disabled. The code was just checking if the macro was defined
and not actually testing the value. The value is now being tested
and it needs to be true to succeed.
2013-03-02 15:20:28 +11:00
Chris Johns
87118b9de2 Fix the spelling. 2013-02-27 12:26:42 +11:00
Chris Johns
99eee0e776 Fix the != operator. 2013-02-26 17:55:58 +11:00
Chris Johns
9c2fe141db Clean out the unused directives. 2013-02-24 18:42:48 +11:00
Chris Johns
d58a31bc58 Remove debug print from the config parsing. 2013-02-13 11:39:28 +11:00
Chris Johns
d963553b51 Restructure RTEMS Config Files
Add arch build files. This allows archs to have different versions
and patches for specific tools.

Break the RTEMS config directory up into separate directories to
make long term maintenance easier. This required a change to config.py
to handle the config files being in subdirs of the config directory.

The defaults have been updated to include the install SB root so
packages built before a package are available.

Add makeinfo to the required tools. GDB (and others) need it to
build without error.
2013-02-13 11:35:36 +11:00
Chris Johns
c80560d9a4 Move into the source-builder tree. 2012-11-06 10:09:40 +11:00