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

5 4.11.2
Last change on this file since 3520323 was 3520323, checked in by Chris Johns <chrisj@…>, on Jul 9, 2017 at 10:36:44 PM

Deoxygen DOT_NUM_THREADS means use all processors and this crashes on FreeBSD.

  • Property mode set to 100755
File size: 3.8 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')
129perl=$(which perl | sed -e 's/\//\\\//g')
130cat ${prefix}/cpukit/Doxyfile.in | \
131    sed -e "s/@PACKAGE_VERSION@/${release}/g" \
132        -e "s/@top_srcdir@/${top_srcdir}/g" \
133        -e "s/@PERL@/${perl}/g" \
134        -e "s/^INPUT[[:space:]].*=.*$/INPUT = ${top_srcdir}/g" \
135        -e "s/^HAVE_DOT[[:blank:]]/DOT_NUM_THREADS = 1\\
136HAVE_DOT /g"> Doxyfile
137doxygen Doxyfile
138
139echo "Creating: rtems-doxygen-${release}.tar.${comp_ext}"
140mv cpukit_doxy/html rtems-doxygen-${release}
141tar cf - rtems-doxygen-${release} | \
142    ${comp} > ../rtems-doxygen-${release}.tar.${comp_ext}
143
144exit 0
Note: See TracBrowser for help on using the repository browser.