summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-20 19:59:01 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-20 19:59:01 +0000
commit431c35dccb53c2296f7b9a2814dc0ff828e7e921 (patch)
tree692af92078169015e3398013201a538f87f0765b
parentc429ec8049cd45e48d19e9add32bdc416ec139e7 (diff)
downloadrtems-431c35dccb53c2296f7b9a2814dc0ff828e7e921.tar.bz2
Miscellaneous improvements and cleanups committed so I can merge
Ralf's end of day version.
-rw-r--r--scripts/Makefile.am2
-rw-r--r--scripts/Makefile.in13
-rw-r--r--scripts/TODO6
-rw-r--r--scripts/binutils/binutils.spec.in5
-rw-r--r--scripts/buildall177
-rw-r--r--scripts/configure4
-rw-r--r--scripts/configure.in4
-rw-r--r--scripts/gccnewlib/gccnewlib.spec.in3
-rw-r--r--scripts/gdb/gdb.spec.in3
-rwxr-xr-xscripts/mkbinutils_subpackage_version2
-rw-r--r--scripts/mkbinutilspec.in5
-rw-r--r--scripts/mkgccnewlibspec.in5
-rw-r--r--scripts/mkgdbspec.in5
13 files changed, 35 insertions, 199 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 4dd357a165..1ff0ae8ed1 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -27,3 +27,5 @@ setup.cache: setup.def
cp setup.def $@
DISTCLEANFILES = setup.cache
+
+CLEANFILES = buildall
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index cebcc16270..7c95f9021f 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -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)
diff --git a/scripts/TODO b/scripts/TODO
index 8b13789179..98970c979b 100644
--- a/scripts/TODO
+++ b/scripts/TODO
@@ -1 +1,7 @@
+#
+# $Id$
+#
+There is plenty left to do on this :)
+
+ + Add GNAT/RTEMS version.
diff --git a/scripts/binutils/binutils.spec.in b/scripts/binutils/binutils.spec.in
index 923f9890f5..bc0a5b8837 100644
--- a/scripts/binutils/binutils.spec.in
+++ b/scripts/binutils/binutils.spec.in
@@ -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
diff --git a/scripts/buildall b/scripts/buildall
deleted file mode 100644
index c91d6e9a2c..0000000000
--- a/scripts/buildall
+++ /dev/null
@@ -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
diff --git a/scripts/configure b/scripts/configure
index cb6e09da8b..e917aa451d 100644
--- a/scripts/configure
+++ b/scripts/configure
@@ -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
diff --git a/scripts/configure.in b/scripts/configure.in
index 6302e33d4e..7ceff551c5 100644
--- a/scripts/configure.in
+++ b/scripts/configure.in
@@ -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
)
diff --git a/scripts/gccnewlib/gccnewlib.spec.in b/scripts/gccnewlib/gccnewlib.spec.in
index 7bc611b3e8..1d270f8584 100644
--- a/scripts/gccnewlib/gccnewlib.spec.in
+++ b/scripts/gccnewlib/gccnewlib.spec.in
@@ -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
diff --git a/scripts/gdb/gdb.spec.in b/scripts/gdb/gdb.spec.in
index bb522d9d75..fdec2c6810 100644
--- a/scripts/gdb/gdb.spec.in
+++ b/scripts/gdb/gdb.spec.in
@@ -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
diff --git a/scripts/mkbinutils_subpackage_version b/scripts/mkbinutils_subpackage_version
index 00f42fe928..ea2dcef272 100755
--- a/scripts/mkbinutils_subpackage_version
+++ b/scripts/mkbinutils_subpackage_version
@@ -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."
diff --git a/scripts/mkbinutilspec.in b/scripts/mkbinutilspec.in
index 5433b97b44..18c087f200 100644
--- a/scripts/mkbinutilspec.in
+++ b/scripts/mkbinutilspec.in
@@ -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" \
diff --git a/scripts/mkgccnewlibspec.in b/scripts/mkgccnewlibspec.in
index 9fec129fa5..d9abb70558 100644
--- a/scripts/mkgccnewlibspec.in
+++ b/scripts/mkgccnewlibspec.in
@@ -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" \
diff --git a/scripts/mkgdbspec.in b/scripts/mkgdbspec.in
index b512be6921..0b4cfbdfd0 100644
--- a/scripts/mkgdbspec.in
+++ b/scripts/mkgdbspec.in
@@ -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" \