mirror of
https://github.com/t-crest/rtems.git
synced 2025-11-16 12:34:47 +00:00
Miscellaneous improvements and cleanups committed so I can merge
Ralf's end of day version.
This commit is contained in:
@@ -27,3 +27,5 @@ setup.cache: setup.def
|
||||
cp setup.def $@
|
||||
|
||||
DISTCLEANFILES = setup.cache
|
||||
|
||||
CLEANFILES = buildall
|
||||
|
||||
@@ -84,16 +84,18 @@ EXTRA_DIST = $(noinst_DATA) $(noinst_SCRIPTS)
|
||||
CONFIGURE_DEPENDENCIES = setup.cache
|
||||
|
||||
DISTCLEANFILES = setup.cache
|
||||
|
||||
CLEANFILES = buildall
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES = mkbinutilspec mkgccnewlibspec mkgdbspec
|
||||
CONFIG_CLEAN_FILES = buildall mkbinutilspec mkgccnewlibspec mkgdbspec
|
||||
SCRIPTS = $(noinst_SCRIPTS)
|
||||
|
||||
DATA = $(noinst_DATA)
|
||||
|
||||
DIST_COMMON = README Makefile.am Makefile.in TODO aclocal.m4 configure \
|
||||
configure.in install-sh missing mkbinutilspec.in mkgccnewlibspec.in \
|
||||
mkgdbspec.in mkinstalldirs
|
||||
DIST_COMMON = README Makefile.am Makefile.in TODO aclocal.m4 \
|
||||
buildall.in configure configure.in install-sh missing mkbinutilspec.in \
|
||||
mkgccnewlibspec.in mkgdbspec.in mkinstalldirs
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
@@ -116,6 +118,8 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
buildall: $(top_builddir)/config.status buildall.in
|
||||
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
mkbinutilspec: $(top_builddir)/config.status mkbinutilspec.in
|
||||
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
mkgccnewlibspec: $(top_builddir)/config.status mkgccnewlibspec.in
|
||||
@@ -305,6 +309,7 @@ installdirs-am:
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
There is plenty left to do on this :)
|
||||
|
||||
+ Add GNAT/RTEMS version.
|
||||
|
||||
@@ -16,10 +16,10 @@ Provides: @target_alias@-binutils
|
||||
|
||||
Autoreqprov: on
|
||||
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
|
||||
Buildroot: /tmp
|
||||
Buildroot: /opt/tmp
|
||||
Prefix: /opt
|
||||
|
||||
Version: binutils@binutils_version@
|
||||
Version: @binutils_version@
|
||||
Summary: binutils for target @target_alias@
|
||||
Source0: binutils-@binutils_version@.tar.gz
|
||||
Patch0: binutils-@binutils_version@-rtems-@binutils_patch_version@.diff
|
||||
@@ -35,6 +35,7 @@ Authors:
|
||||
...
|
||||
|
||||
%prep
|
||||
echo RPM_BUILD_ROOT=${RPM_BUILD_ROOT}
|
||||
# untar the sources inside @target_alias@-binutils
|
||||
%setup -c -n @target_alias@-binutils -a 0
|
||||
|
||||
|
||||
177
scripts/buildall
177
scripts/buildall
@@ -1,177 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Generate all the specs and then cycle through building them.
|
||||
#
|
||||
|
||||
RTEMS_DIR=`dirname $0`
|
||||
|
||||
# This is the full list .. hppa1.1 does not build now.
|
||||
#ALL_TARGETS="hppa1.1-rtems i386-rtems i960-rtems m68k-rtems \
|
||||
# m68k-rtemself mips64orion-rtems \
|
||||
# powerpc-rtems sh-rtems sh-rtemself sparc-rtems"
|
||||
|
||||
# This is the full buildable set.
|
||||
ALL_TARGETS="i386-rtems i960-rtems m68k-rtems \
|
||||
m68k-rtemself mips64orion-rtems \
|
||||
powerpc-rtems sh-rtems sh-rtemself sparc-rtems"
|
||||
|
||||
# This is what we are building this time
|
||||
#TARGETS=${ALL_TARGETS}
|
||||
TARGETS="sh-rtems"
|
||||
|
||||
binutils=990901
|
||||
gcc=2.95.1
|
||||
gdb=4.18
|
||||
newlib=1.8.2
|
||||
buildroot=/opt/tmp
|
||||
|
||||
testing=yes
|
||||
do_binutils=yes
|
||||
do_gdb=yes
|
||||
do_gccnewlib=yes
|
||||
staging_dir=/usr3/rtems_cds/test_cd/linux
|
||||
|
||||
#
|
||||
# Now get started
|
||||
#
|
||||
start=`date`
|
||||
|
||||
echo PATH=$PATH
|
||||
|
||||
if [ ${testing} = yes ] ; then
|
||||
ECHO=echo
|
||||
fi
|
||||
|
||||
installed_count=`rpm -qa | grep rtems | wc -l`
|
||||
if [ ${installed_count} -ne 0 ] ; then
|
||||
echo This script should be run with NO rtems RPMs installed.
|
||||
echo It appears that the following rtems RPMs are installed:
|
||||
echo
|
||||
rpm -qa | grep rtems
|
||||
echo
|
||||
echo Please remove these and restart this script.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Some linux distributions use /usr/src/packages
|
||||
# redhat uses /usr/src/redhat
|
||||
# others might use /usr/src
|
||||
if test -d /usr/src/packages/SPECS;
|
||||
then
|
||||
dst=/usr/src/packages/SPECS;
|
||||
elif test -d /usr/src/redhat/SPECS;
|
||||
then
|
||||
dst=/usr/src/redhat/SPECS;
|
||||
elif test -d /usr/src/SPECS/;
|
||||
then
|
||||
dst=/usr/src/SPECS;
|
||||
fi
|
||||
|
||||
if [ ${testing} = no ] ; then
|
||||
cd ${RTEMS_DIR}/scripts
|
||||
./configure || exit 1
|
||||
make || exit 1
|
||||
fi
|
||||
|
||||
# Now generate all the specs
|
||||
for target in ${TARGETS}
|
||||
do
|
||||
tspecs=`find . -name "${target}*"`
|
||||
${ECHO} cp -r ${tspecs} ${dst}
|
||||
done
|
||||
|
||||
# clean up a bit before we start
|
||||
cd ${dst}
|
||||
test -d log || mkdir log
|
||||
|
||||
# do all the tools
|
||||
for target in ${TARGETS}
|
||||
do
|
||||
if [ ${do_binutils} = yes ] ; then
|
||||
logfile=log/${target}-binutils
|
||||
specfile=${dst}/${target}-binutils-${binutils}.spec
|
||||
echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
|
||||
if [ ${testing} = no ] ; then
|
||||
rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
|
||||
fi
|
||||
${ECHO} rm -rf ${dst}/../BUILD/${target}-binutils*
|
||||
${ECHO} rm -rf ${buildroot}/opt
|
||||
else
|
||||
echo Skipping binutils for ${target}
|
||||
fi
|
||||
|
||||
if [ ${do_gdb} = yes ] ; then
|
||||
# now build gdb
|
||||
logfile=log/${target}-gdb
|
||||
specfile=${dst}/${target}-gdb-${gdb}.spec
|
||||
echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
|
||||
if [ ${testing} = no ] ; then
|
||||
rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
|
||||
fi
|
||||
${ECHO} rm -rf ${dst}/../BUILD/${target}-gdb*
|
||||
${ECHO} rm -rf ${buildroot}/opt
|
||||
else
|
||||
echo Skipping gdb for ${target}
|
||||
fi
|
||||
|
||||
if [ ${do_gccnewlib} = yes ] ; then
|
||||
# now build gcc/newlib
|
||||
# NOTE: This requires having binutils installed and we immediately
|
||||
# remove it once finished.
|
||||
binutils_rpm=${dst}/../RPMS/i386/${target}-binutils-${binutils}-0.i386.rpm
|
||||
if [ ! -f ${binutils_rpm} ] ; then
|
||||
echo There is no RPM for binutils for ${target}.
|
||||
echo Looked for ${binutils_rpm}.
|
||||
fi
|
||||
${ECHO} rpm -i ${binutils_rpm}
|
||||
|
||||
logfile=log/${target}-gccnewlib
|
||||
specfile=${dst}/${target}-gcc-${gcc}-newlib-${newlib}.spec
|
||||
echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
|
||||
if [ ${testing} = no ] ; then
|
||||
rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
|
||||
fi
|
||||
${ECHO} rm -rf ${dst}/../BUILD/${target}-gcc*
|
||||
${ECHO} rm -rf ${buildroot}/opt
|
||||
|
||||
echo uninstalling binutils for ${target}
|
||||
if [ ${testing} = no ] ; then
|
||||
rpm -e `rpm -qa | grep rtems`
|
||||
fi
|
||||
else
|
||||
echo Skipping gcc/newlib for ${target}
|
||||
fi
|
||||
done
|
||||
|
||||
if [ X${staging_dir} != X ] ; then
|
||||
echo "Moving files to a staging directory for distribution."
|
||||
echo "Plus it saves space in /usr. :)"
|
||||
echo
|
||||
echo Making staging directory..
|
||||
${ECHO} mkdir ${staging_dir}
|
||||
${ECHO} mkdir ${staging_dir}/RPMS
|
||||
${ECHO} mkdir ${staging_dir}/SRPMS
|
||||
|
||||
echo Moving RPMs to CD staging directory
|
||||
for file in `ls -1 ${dst}/../RPMS/i386/*.rpm 2>/dev/null`
|
||||
do
|
||||
echo Moving ${file}
|
||||
${ECHO} mv ${file} ${staging_dir}/RPMS
|
||||
done
|
||||
|
||||
echo Moving SRPMs to CD staging directory
|
||||
for file in `ls -1 ${dst}/../SRPMS/*.rpm 2>/dev/null`
|
||||
do
|
||||
echo Moving ${file}
|
||||
${ECHO} mv ${file} ${staging_dir}/SRPMS
|
||||
done
|
||||
fi
|
||||
|
||||
# Now we are done
|
||||
|
||||
stop=`date`
|
||||
|
||||
echo
|
||||
echo "Started: " $start
|
||||
echo "Finished: " $stop
|
||||
exit 0
|
||||
4
scripts/configure
vendored
4
scripts/configure
vendored
@@ -913,12 +913,14 @@ ac_given_srcdir=$srcdir
|
||||
ac_given_INSTALL="$INSTALL"
|
||||
|
||||
trap 'rm -fr `echo "Makefile
|
||||
buildall
|
||||
mkbinutilspec
|
||||
mkgccnewlibspec
|
||||
mkgdbspec
|
||||
binutils/Makefile
|
||||
gccnewlib/Makefile
|
||||
gdb/Makefile
|
||||
rtems/Makefile
|
||||
" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
@@ -1008,12 +1010,14 @@ EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
||||
buildall
|
||||
mkbinutilspec
|
||||
mkgccnewlibspec
|
||||
mkgdbspec
|
||||
binutils/Makefile
|
||||
gccnewlib/Makefile
|
||||
gdb/Makefile
|
||||
rtems/Makefile
|
||||
"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
AC_INIT(binutils)
|
||||
AM_INIT_AUTOMAKE(scripts,19991020-0,no)
|
||||
AM_INIT_AUTOMAKE(scripts,19991020-1,no)
|
||||
|
||||
test -f ./setup.cache || cp ./setup.def ./setup.cache
|
||||
. ./setup.cache
|
||||
@@ -33,10 +33,12 @@ AC_SUBST(GDBVERS)
|
||||
|
||||
AC_OUTPUT(
|
||||
Makefile
|
||||
buildall
|
||||
mkbinutilspec
|
||||
mkgccnewlibspec
|
||||
mkgdbspec
|
||||
binutils/Makefile
|
||||
gccnewlib/Makefile
|
||||
gdb/Makefile
|
||||
rtems/Makefile
|
||||
)
|
||||
|
||||
@@ -18,7 +18,7 @@ Requires: @target_alias@-binutils
|
||||
Autoreqprov: on
|
||||
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
|
||||
|
||||
Version: gcc@gcc_version@newlib@newlib_version@
|
||||
Version: @gcc_version@newlib@newlib_version@
|
||||
Summary: rtems gcc and newlib C Library for target @target_alias@
|
||||
Source0: gcc-@gcc_version@.tar.gz
|
||||
Source1: newlib-@newlib_version@.tar.gz
|
||||
@@ -38,6 +38,7 @@ Authors:
|
||||
...
|
||||
|
||||
%prep
|
||||
echo RPM_BUILD_ROOT=${RPM_BUILD_ROOT}
|
||||
# untar the sources inside @target_alias@-gcc-newlib -@Version@
|
||||
%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Provides: @target_alias@-gdb
|
||||
Autoreqprov: on
|
||||
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
|
||||
|
||||
Version: gdb@gdb_version@
|
||||
Version: @gdb_version@
|
||||
Summary: gdb for target @target_alias@
|
||||
Source0: gdb-@gdb_version@.tar.gz
|
||||
Patch0: gdb-@gdb_version@-rtems-@gdb_patch_version@.diff
|
||||
@@ -37,6 +37,7 @@ Authors:
|
||||
...
|
||||
|
||||
%prep
|
||||
echo RPM_BUILD_ROOT=${RPM_BUILD_ROOT}
|
||||
# untar the sources inside @target_alias@-gdb
|
||||
%setup -c -n @target_alias@-gdb -a 0
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ echo "Summary: binutils for RTEMS"
|
||||
echo "Source0: binutils-990901.tar.gz"
|
||||
echo "Patch0: binutils-990901-rtems-19991015.diff"
|
||||
echo ""
|
||||
echo "Buildroot: /tmp"
|
||||
echo "Buildroot: /opt/tmp"
|
||||
echo "# Patch:"
|
||||
echo "%description"
|
||||
echo "RTEMS is an open source operating system for embedded systems."
|
||||
|
||||
@@ -45,14 +45,11 @@ fi
|
||||
# target to build for
|
||||
target_alias=$1
|
||||
|
||||
# RPM release number
|
||||
rpm_release=0
|
||||
|
||||
. ./$CFG
|
||||
|
||||
specfile=${dst}/$target_alias-binutils-${binutils_version}.spec
|
||||
|
||||
sed -e "s%@Release@%${rpm_release}%g" \
|
||||
sed -e "s%@Release@%${binutils_rpm_release}%g" \
|
||||
-e "s%@target_alias@%${target_alias}%g" \
|
||||
-e "s%@binutils_version@%${binutils_version}%g" \
|
||||
-e "s%@binutils_patch_version@%${binutils_patch_version}%g" \
|
||||
|
||||
@@ -45,14 +45,11 @@ fi
|
||||
# target to build for
|
||||
target_alias=$1
|
||||
|
||||
# RPM release number
|
||||
rpm_release=0
|
||||
|
||||
. ./$CFG
|
||||
|
||||
specfile=${dst}/$target_alias-gcc-${gcc_version}-newlib-${newlib_version}.spec
|
||||
|
||||
sed -e "s%@Release@%${rpm_release}%g" \
|
||||
sed -e "s%@Release@%${gccnewlib_rpm_release}%g" \
|
||||
-e "s%@target_alias@%${target_alias}%g" \
|
||||
-e "s%@gcc_version@%${gcc_version}%g" \
|
||||
-e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
|
||||
|
||||
@@ -44,14 +44,11 @@ fi
|
||||
# target to build for
|
||||
target_alias=$1
|
||||
|
||||
# RPM release number
|
||||
rpm_release=0
|
||||
|
||||
. ./$CFG
|
||||
|
||||
specfile=${dst}/$target_alias-gdb-${gdb_version}.spec
|
||||
|
||||
sed -e "s%@Release@%${rpm_release}%g" \
|
||||
sed -e "s%@Release@%${gdb_rpm_release}%g" \
|
||||
-e "s%@target_alias@%${target_alias}%g" \
|
||||
-e "s%@gdb_version@%${gdb_version}%g" \
|
||||
-e "s%@gdb_patch_version@%${gdb_patch_version}%g" \
|
||||
|
||||
Reference in New Issue
Block a user