diff options
author | Chris Johns <chrisj@rtems.org> | 2022-11-10 14:05:18 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2022-11-10 14:07:48 +1100 |
commit | 93f05fb3a8dd2a2b2683bc4b1c1210d7bb2e81c6 (patch) | |
tree | c4e18ed7aef5cc011cfb2fd899872c098c4a2042 /rtems-release-kernel | |
parent | release: Fix the version number parsing (diff) | |
download | rtems-release-93f05fb3a8dd2a2b2683bc4b1c1210d7bb2e81c6.tar.bz2 |
release/kernel: Add waf build system support.
Diffstat (limited to 'rtems-release-kernel')
-rwxr-xr-x | rtems-release-kernel | 110 |
1 files changed, 69 insertions, 41 deletions
diff --git a/rtems-release-kernel b/rtems-release-kernel index 188fc39..176fc55 100755 --- a/rtems-release-kernel +++ b/rtems-release-kernel @@ -62,26 +62,28 @@ echo "] RTEMS Release RTEMS Kernel, v${release}" echo "] Package: ${package}" echo "] Release: ${release}" -# -# Unpack the released RSB. -# -rsb=rtems-source-builder-${release} -echo "tar ${comp_tar}xf ../${rsb}.tar.${comp_ext}" -tar ${comp_tar}xf ../${rsb}.tar.${comp_ext} - -# -# Build autoconf and automake. -# -cd ${rsb}/rtems -../source-builder/sb-set-builder --without-release-url \ - --prefix=${top}/at ${version}/rtems-autotools -cd ../.. - -# -# Set the path to the autotools. -# -export XPATH=$PATH -export PATH=${top}/at/bin:$PATH +if [ ${rtems_waf} = no ]; then + # + # Unpack the released RSB. + # + rsb=rtems-source-builder-${release} + echo "tar ${comp_tar}xf ../${rsb}.tar.${comp_ext}" + tar ${comp_tar}xf ../${rsb}.tar.${comp_ext} + + # + # Build autoconf and automake. + # + cd ${rsb}/rtems + ../source-builder/sb-set-builder --without-release-url \ + --prefix=${top}/at ${version}/rtems-autotools + cd ../.. + + # + # Set the path to the autotools. + # + export XPATH=$PATH + export PATH=${top}/at/bin:$PATH +fi # # Massage the version.revision string into major.minor.revision @@ -95,31 +97,55 @@ fi release_ver_rel_minor="${release_ver_rel}.0" # -# Bootstrap RTEMS, collect the BSPs, and update the README. +# Handle the different build system # cd ${prefix} - echo "] Set the version in the build system.." - for f in $(find . -name version.m4) - do - echo "] Generating ${f}" - cat <<EOF > ${f} + if [ ${rtems_waf} = yes ]; then + # + # Waf build system. Update RTEMS version and collect the BSPs + # + echo "] RTEMS Build System: waf" + f="spec/build/cpukit/optvermaj.yml" + echo "] Update ${f}" + sed -i "s/- get-string-command-line:.*/- get-string-command-line: '${version}'/" ${f} + f="spec/build/cpukit/optvermin.yml" + echo "] Update ${f}" + minor=$(echo ${revision} | sed 's/-.*//') + sed -i "s/- set-value:.*/- set-value: '${minor}'/" ${f} + f="spec/build/cpukit/optverrev.yml" + echo "] Update ${f}" + sed -i "s/- set-value:.*/- set-value: '0'/" ${f} + else + # + # Autoconf build system. Bootstrap RTEMS + # + echo "] RTEMS Build System: autoconf" + echo "] Set the version in the build system.." + for f in $(find . -name version.m4) + do + echo "] Generating ${f}" + cat <<EOF > ${f} dnl Autogenerated for RTEMS release: ${release} (${release_ver_rel_minor}) AC_DEFUN([RTEMS_VERSIONING], m4_define([_RTEMS_VERSION],[${release_ver_rel_minor}])) dnl RTEMS API Version m4_define([_RTEMS_API],[${version}]) EOF - done - echo "] Bootstrapping RTEMS" - ./bootstrap -c - if [ ${version} -lt 5 ]; then - ./bootstrap -p - ${top}/${rsb}/source-builder/sb-bootstrap - else - ./rtems-bootstrap + done + echo "] Bootstrapping RTEMS" + ./bootstrap -c + if [ ${version} -lt 5 ]; then + ./bootstrap -p + ${top}/${rsb}/source-builder/sb-bootstrap + else + ./rtems-bootstrap + fi + echo "] Cleaning autom4te.cache" + rm -rf $(find . -name autom4te.cache) fi - echo "] Cleaning autom4te.cache" - rm -rf $(find . -name autom4te.cache) + # + # Collect the BSPs, update the README. + # echo "] Generate ARCH-BSP.txt" ./rtems-bsps -m > ${toptop}/ARCH-BSP.md echo "] Generate README" @@ -131,12 +157,14 @@ EOF rm -r README.tmp cd .. -# -# Clean up. -# -rm -rf ${rsb} ${at} +if [ ${rtems_autoconf} = yes ]; then + # + # Clean up. + # + rm -rf ${rsb} ${at} -echo "] Bootstrap complete." + echo "] Bootstrap complete." +fi # # Only build doxygen output if present on the system. |