From 7063e223dc6cb5fe43b8664c08ab437b1a2d0547 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 21 Oct 1999 17:22:02 +0000 Subject: Made the RTEMS version get substituted properly even though it is not right yet. Now can specify rpm_build_root via setup. --- scripts/Makefile.in | 1 + scripts/binutils/Makefile.in | 1 + scripts/binutils/binutils.spec.in | 2 +- scripts/configure | 5 ++++- scripts/configure.in | 2 ++ scripts/gccnewlib/Makefile.in | 1 + scripts/gdb/Makefile.in | 1 + scripts/gdb/gdb.spec.in | 3 ++- scripts/mkbinutilspec.in | 1 + scripts/mkbspspec.in | 7 ++++--- scripts/mkgccnewlibspec.in | 1 + scripts/mkgdbspec.in | 1 + scripts/rtems/rtems.spec.in | 2 +- scripts/setup | 8 ++++++-- 14 files changed, 27 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 6467e1affb..3193c1ecae 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -65,6 +65,7 @@ GDBVERS = @GDBVERS@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ RPM_SPECSdir = @RPM_SPECSdir@ +RTEMS_VERSION = @RTEMS_VERSION@ VERSION = @VERSION@ AUTOMAKE_OPTIONS = foreign diff --git a/scripts/binutils/Makefile.in b/scripts/binutils/Makefile.in index f7c6c4d3ca..5be140f630 100644 --- a/scripts/binutils/Makefile.in +++ b/scripts/binutils/Makefile.in @@ -65,6 +65,7 @@ GDBVERS = @GDBVERS@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ RPM_SPECSdir = @RPM_SPECSdir@ +RTEMS_VERSION = @RTEMS_VERSION@ VERSION = @VERSION@ AUTOMAKE_OPTIONS = foreign diff --git a/scripts/binutils/binutils.spec.in b/scripts/binutils/binutils.spec.in index bbcad0e7bd..7423e7efc6 100644 --- a/scripts/binutils/binutils.spec.in +++ b/scripts/binutils/binutils.spec.in @@ -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@ diff --git a/scripts/configure b/scripts/configure index b869a30646..795fa4ba2d 100644 --- a/scripts/configure +++ b/scripts/configure @@ -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 diff --git a/scripts/configure.in b/scripts/configure.in index bf31304680..f6fdf59ece 100644 --- a/scripts/configure.in +++ b/scripts/configure.in @@ -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( diff --git a/scripts/gccnewlib/Makefile.in b/scripts/gccnewlib/Makefile.in index ca78c7a434..a37d562684 100644 --- a/scripts/gccnewlib/Makefile.in +++ b/scripts/gccnewlib/Makefile.in @@ -65,6 +65,7 @@ GDBVERS = @GDBVERS@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ RPM_SPECSdir = @RPM_SPECSdir@ +RTEMS_VERSION = @RTEMS_VERSION@ VERSION = @VERSION@ AUTOMAKE_OPTIONS = foreign diff --git a/scripts/gdb/Makefile.in b/scripts/gdb/Makefile.in index 0973fb87d1..00c2c14171 100644 --- a/scripts/gdb/Makefile.in +++ b/scripts/gdb/Makefile.in @@ -65,6 +65,7 @@ GDBVERS = @GDBVERS@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ RPM_SPECSdir = @RPM_SPECSdir@ +RTEMS_VERSION = @RTEMS_VERSION@ VERSION = @VERSION@ AUTOMAKE_OPTIONS = foreign diff --git a/scripts/gdb/gdb.spec.in b/scripts/gdb/gdb.spec.in index c08e71bcba..ab99739bfa 100644 --- a/scripts/gdb/gdb.spec.in +++ b/scripts/gdb/gdb.spec.in @@ -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. diff --git a/scripts/mkbinutilspec.in b/scripts/mkbinutilspec.in index 05a38bf853..1ee614e6a6 100644 --- a/scripts/mkbinutilspec.in +++ b/scripts/mkbinutilspec.in @@ -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" \ diff --git a/scripts/mkbspspec.in b/scripts/mkbspspec.in index 5cc5cb82c3..3187be2cf1 100644 --- a/scripts/mkbspspec.in +++ b/scripts/mkbspspec.in @@ -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} diff --git a/scripts/mkgccnewlibspec.in b/scripts/mkgccnewlibspec.in index aaf0f3d5cd..c27279c368 100644 --- a/scripts/mkgccnewlibspec.in +++ b/scripts/mkgccnewlibspec.in @@ -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" \ diff --git a/scripts/mkgdbspec.in b/scripts/mkgdbspec.in index c86537528d..1f7d3c261f 100644 --- a/scripts/mkgdbspec.in +++ b/scripts/mkgdbspec.in @@ -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" \ diff --git a/scripts/rtems/rtems.spec.in b/scripts/rtems/rtems.spec.in index 96f8d49645..fdc8a43b04 100644 --- a/scripts/rtems/rtems.spec.in +++ b/scripts/rtems/rtems.spec.in @@ -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. diff --git a/scripts/setup b/scripts/setup index 11d5712757..a102f2a14b 100755 --- a/scripts/setup +++ b/scripts/setup @@ -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 -- cgit v1.2.3