Made the RTEMS version get substituted properly even though it is

not right yet.

Now can specify rpm_build_root via setup.
This commit is contained in:
Joel Sherrill
1999-10-21 17:22:02 +00:00
parent f4a5803e44
commit 7063e223dc
14 changed files with 27 additions and 9 deletions

View File

@@ -65,6 +65,7 @@ GDBVERS = @GDBVERS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
RPM_SPECSdir = @RPM_SPECSdir@
RTEMS_VERSION = @RTEMS_VERSION@
VERSION = @VERSION@
AUTOMAKE_OPTIONS = foreign

View File

@@ -65,6 +65,7 @@ GDBVERS = @GDBVERS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
RPM_SPECSdir = @RPM_SPECSdir@
RTEMS_VERSION = @RTEMS_VERSION@
VERSION = @VERSION@
AUTOMAKE_OPTIONS = foreign

View File

@@ -16,7 +16,7 @@ Provides: @target_alias@-binutils
Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
Buildroot: /opt/tmp
Buildroot: @rpm_build_root@
Prefix: /opt
Version: @binutils_version@

5
scripts/configure vendored
View File

@@ -769,6 +769,7 @@ fi
# RTEMS_CHECK_VERSION(..)
RTEMS_VERSION=GET_RTEMS_VERSION_XXX
test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache
. ./setup.cache
@@ -777,7 +778,7 @@ test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache
# redhat uses /usr/src/redhat
# others might use /usr/src
echo $ac_n "checking for rpm SPECS directory""... $ac_c" 1>&6
echo "configure:781: checking for rpm SPECS directory" >&5
echo "configure:782: checking for rpm SPECS directory" >&5
if test -d /usr/src/packages/SPECS;
then
RPM_SPECSdir=/usr/src/packages/SPECS;
@@ -803,6 +804,7 @@ GDBVERS="gdb-${gdb_version}"
BSPVERS="${RTEMS_VERSION}"
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -973,6 +975,7 @@ s%@RPM_SPECSdir@%$RPM_SPECSdir%g
s%@GCCNEWLIBVERS@%$GCCNEWLIBVERS%g
s%@BINUTILSVERS@%$BINUTILSVERS%g
s%@GDBVERS@%$GDBVERS%g
s%@RTEMS_VERSION@%$RTEMS_VERSION%g
s%@BSPVERS@%$BSPVERS%g
CEOF

View File

@@ -4,6 +4,7 @@ AC_INIT(binutils)
AM_INIT_AUTOMAKE(scripts,19991021-0,no)
# RTEMS_CHECK_VERSION(..)
RTEMS_VERSION=GET_RTEMS_VERSION_XXX
test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache
. ./setup.cache
@@ -35,6 +36,7 @@ AC_SUBST(BINUTILSVERS)
GDBVERS="gdb-${gdb_version}"
AC_SUBST(GDBVERS)
BSPVERS="${RTEMS_VERSION}"
AC_SUBST(RTEMS_VERSION)
AC_SUBST(BSPVERS)
AC_OUTPUT(

View File

@@ -65,6 +65,7 @@ GDBVERS = @GDBVERS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
RPM_SPECSdir = @RPM_SPECSdir@
RTEMS_VERSION = @RTEMS_VERSION@
VERSION = @VERSION@
AUTOMAKE_OPTIONS = foreign

View File

@@ -65,6 +65,7 @@ GDBVERS = @GDBVERS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
RPM_SPECSdir = @RPM_SPECSdir@
RTEMS_VERSION = @RTEMS_VERSION@
VERSION = @VERSION@
AUTOMAKE_OPTIONS = foreign

View File

@@ -24,7 +24,8 @@ Summary: gdb for target @target_alias@
Source0: gdb-@gdb_version@.tar.gz
Patch0: gdb-@gdb_version@-rtems-@gdb_patch_version@.diff
Buildroot: /tmp
Buildroot: @rpm_build_root@
# Patch:
%description
RTEMS is an open source operating system for embedded systems.

View File

@@ -50,6 +50,7 @@ target_alias=$1
specfile=${dst}/$target_alias-binutils-${binutils_version}.spec
sed -e "s%@Release@%${binutils_rpm_release}%g" \
-e "s%@rpm_build_root@%${rpm_build_root}%g" \
-e "s%@target_alias@%${target_alias}%g" \
-e "s%@binutils_version@%${binutils_version}%g" \
-e "s%@binutils_patch_version@%${binutils_patch_version}%g" \

View File

@@ -50,9 +50,10 @@ bsp=$2
specfile=${dst}/$target_alias-$bsp-$RTEMS_VERSION.spec
sed -e "s%@Version@%${RTEMS_VERSION}%g" \
-e "s%@bsp@%${bsp}%g" \
-e "s%@Release@%${rtems_release}%g" \
-e "s%@target_alias@%${target_alias}%g" \
-e "s%@bsp@%${bsp}%g" \
-e "s%@Release@%${rtems_release}%g" \
-e "s%@rpm_build_root@%${rpm_build_root}%g" \
-e "s%@target_alias@%${target_alias}%g" \
< ${RTEMS_DIR}/rtems/rtems.spec.in \
> ${specfile}

View File

@@ -51,6 +51,7 @@ specfile=${dst}/$target_alias-gcc-${gcc_version}-newlib-${newlib_version}.spec
sed -e "s%@Release@%${gccnewlib_rpm_release}%g" \
-e "s%@target_alias@%${target_alias}%g" \
-e "s%@rpm_build_root@%${rpm_build_root}%g" \
-e "s%@gcc_version@%${gcc_version}%g" \
-e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
-e "s%@newlib_version@%${newlib_version}%g" \

View File

@@ -50,6 +50,7 @@ target_alias=$1
specfile=${dst}/$target_alias-gdb-${gdb_version}.spec
sed -e "s%@Release@%${gdb_rpm_release}%g" \
-e "s%@rpm_build_root@%${rpm_build_root}%g" \
-e "s%@target_alias@%${target_alias}%g" \
-e "s%@gdb_version@%${gdb_version}%g" \
-e "s%@gdb_patch_version@%${gdb_patch_version}%g" \

View File

@@ -22,7 +22,7 @@ Summary: A free operating system for embedded systems
Source: rtems-@Version@.tar.gz
# We claim to be relocatible, but in fact we are not
Prefix: /opt
Buildroot: /opt/tmp
Buildroot: @rpm_build_root@
# Patch:
%description
RTEMS is a free operating system for embedded systems.

View File

@@ -34,9 +34,10 @@ do
echo "8 gdb version : $gdb_version"
echo "9 gdb patch version : $gdb_patch_version"
echo "a gdb rpm release : $gdb_rpm_release"
echo "b rpm build root : $rpm_build_root"
echo
echo -n "[0-9a] or any other key to quit >"
echo -n "[0-9ab] or any other key to quit >"
read sel
case $sel in
0) echo -n "BINUTILS source >"
@@ -61,6 +62,8 @@ do
read gdb_patch_version ;;
a) echo -n "GDB RPM release >"
read gdb_rpm_release ;;
b) echo -n "RPM build root >"
read rpm_build_root ;;
*)
return 0 ;;
esac
@@ -83,7 +86,8 @@ echo "gcc_patch_version=$gcc_patch_version" >> $CFG
echo "gccnewlib_rpm_release=$gccnewlib_rpm_release" >> $CFG
echo "gdb_version=$gdb_version" >> $CFG
echo "gdb_patch_version=$gdb_patch_version" >> $CFG
echo "gdbrpm_release=$gdbrpm_release" >> $CFG
echo "gdb_rpm_release=$gdb_rpm_release" >> $CFG
echo "rpm_build_root=$rpm_build_root" >> $CFG
echo " done"
test -f Makefile || ./configure