source: rtems-release/rtems-release-kernel @ bcd2dd3

5
Last change on this file since bcd2dd3 was bcd2dd3, checked in by Chris Johns <chrisj@…>, on 04/12/17 at 00:54:02

Use defaults for compress.

The threading option is added to the XZ command.

  • Property mode set to 100755
File size: 3.7 KB
Line 
1#! /bin/sh
2#
3# RTEMS Tools Project (http://www.rtems.org/)
4# Copyright 2015-2016 Chris Johns (chrisj@rtems.org)
5# All rights reserved.
6#
7# This file is part of the RTEMS Tools package in 'rtems-tools'.
8#
9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions are met:
11#
12# 1. Redistributions of source code must retain the above copyright notice,
13# this list of conditions and the following disclaimer.
14#
15# 2. Redistributions in binary form must reproduce the above copyright notice,
16# this list of conditions and the following disclaimer in the documentation
17# and/or other materials provided with the distribution.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29# POSSIBILITY OF SUCH DAMAGE.
30#
31
32#
33# This worker script bootstraps the RTEMS kernel.
34#
35echo "RTEMS Release RTEMS Kernel, v0.1"
36
37#
38# Defaults.
39#
40. ${release_top}/rtems-release-defaults
41
42#
43# The package, version and revision.
44#
45if [ $# -ne 4 ]; then
46    echo "error: must be arguments, the package, version," \
47         "release and the top directory."
48 exit 1
49fi
50package=$1
51version=$2
52revision=$3
53toptop=$4
54
55release=${version}.${revision}
56prefix=${package}-${release}
57
58echo "Package: ${package}"
59echo "Release: ${release}"
60
61#
62# Unpack the released RSB.
63#
64rsb=rtems-source-builder-${release}
65echo "tar ${comp_tar}xf ../${rsb}.tar.${comp_ext}"
66tar ${comp_tar}xf ../${rsb}.tar.${comp_ext}
67
68#
69# Build autoconf and automake.
70#
71cd ${rsb}/rtems
72../source-builder/sb-set-builder --without-release-url \
73                                 --prefix=${top}/at ${version}/rtems-autotools
74cd ../..
75
76#
77# Set the path to the autotools.
78#
79export XPATH=$PATH
80export PATH=${top}/at/bin:$PATH
81
82#
83# Bootstrap RTEMS.
84#
85cd ${prefix}
86 echo "Set the version in the build system.."
87 for f in $(find . -name version.m4)
88 do
89  echo " Generating ${f}"
90  cat <<EOF > ${f}
91dnl Autogenerated for RTEMS release: ${release}
92AC_DEFUN([RTEMS_VERSIONING],
93m4_define([_RTEMS_VERSION],[${release}]))
94dnl RTEMS API Version
95m4_define([_RTEMS_API],[${version}])
96EOF
97 done
98 echo "Bootstrapping RTEMS"
99 ./bootstrap -c
100 ./bootstrap -p
101 ${top}/${rsb}/source-builder/sb-bootstrap
102 echo "Cleaning autom4te.cache"
103 rm -rf $(find . -name autom4te.cache)
104 echo "Generate ARCH-BSP.txt"
105 ./rtems-bsps > ARCH-BSP.txt
106 cp ARCH-BSP.txt ${toptop}
107 cd ..
108
109#
110# Clean up.
111#
112rm -rf ${rsb} ${at}
113
114echo "Bootstrap complete."
115
116#
117# Only build doxygen output if present on the system.
118#
119if [ "`command -v doxygen`"no = no ]; then
120 echo "warning: doxygen not built: doxygen not found"
121 exit 0
122fi
123
124#
125# Doxygen
126#
127echo "Creating: Doxyfile"
128top_srcdir=$(echo ${prefix}/cpukit | sed -e 's/\//\\\//g')
129cat ${prefix}/cpukit/Doxyfile.in | \
130    sed -e "s/@PACKAGE_VERSION@/${release}/g" \
131        -e "s/@top_srcdir@/${top_srcdir}/g" \
132        -e "s/@PERL@/perl/g" \
133        -e "s/^INPUT[[:space:]].*=.*$/INPUT = ${top_srcdir}/g" > Doxyfile
134doxygen Doxyfile
135
136echo "Creating: rtems-doxygen-${release}.tar.${comp_ext}"
137mv cpukit_doxy/html rtems-doxygen-${release}
138tar cf - rtems-doxygen-${release} | \
139    ${comp} > ../rtems-doxygen-${release}.tar.${comp_ext}
140
141exit 0
Note: See TracBrowser for help on using the repository browser.