summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-15 17:49:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-15 17:49:35 +0000
commit64cc4bb5af9eaac1b1c9d30f675d7205bfcf99e5 (patch)
tree60fd5aedf40ada1113a44c008870fae48e16b1bf /scripts
parent76c6828d8a37855a88ee41db57a7be09340df00e (diff)
downloadrtems-64cc4bb5af9eaac1b1c9d30f675d7205bfcf99e5.tar.bz2
2001-10-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* mkbinutilsspec.in: Guard sed-pattern against autoconf. * mkgccnewlibspec.in: Guard sed-pattern against autoconf, remove Target_alias. * mkgdbspec.in: Guard sed-pattern against autoconf. * mkbspspec.in: Guard sed-pattern against autoconf. * configure.ac: Rework check for RPM_SPECSdir. * autotools/automake-rtems.spec: Update to automake-1.5.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ChangeLog10
-rw-r--r--scripts/autotools/automake-rtems.spec4
-rw-r--r--scripts/configure.ac38
-rw-r--r--scripts/mkbinutilspec.in12
-rw-r--r--scripts/mkbspspec.in12
-rw-r--r--scripts/mkgccnewlibspec.in16
-rw-r--r--scripts/mkgdbspec.in14
7 files changed, 62 insertions, 44 deletions
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index bc00f010a1..dcd16cc29c 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,13 @@
+2001-10-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * mkbinutilsspec.in: Guard sed-pattern against autoconf.
+ * mkgccnewlibspec.in: Guard sed-pattern against autoconf, remove
+ Target_alias.
+ * mkgdbspec.in: Guard sed-pattern against autoconf.
+ * mkbspspec.in: Guard sed-pattern against autoconf.
+ * configure.ac: Rework check for RPM_SPECSdir.
+ * autotools/automake-rtems.spec: Update to automake-1.5.
+
2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* .cvsignore: Add autom4te.cache for autoconf > 2.52.
diff --git a/scripts/autotools/automake-rtems.spec b/scripts/autotools/automake-rtems.spec
index cf79986cdd..b8e57a0e27 100644
--- a/scripts/autotools/automake-rtems.spec
+++ b/scripts/autotools/automake-rtems.spec
@@ -2,8 +2,8 @@
# spec file for automake
#
-%define rpmvers 1.4_p5
-%define srcvers 1.4-p5
+%define rpmvers 1.5
+%define srcvers 1.5
%define _defaultbuildroot /var/tmp/%{name}-%{srcvers}-root
%define _prefix /opt/rtems
diff --git a/scripts/configure.ac b/scripts/configure.ac
index 2d94ef16bc..f343676ec0 100644
--- a/scripts/configure.ac
+++ b/scripts/configure.ac
@@ -21,25 +21,33 @@ AC_MSG_RESULT([$EXEEXT])
test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache
. ./setup.cache
-# Some linux distributions use /usr/src/packages
-# redhat uses /usr/src/redhat
-# others might use /usr/src
AC_MSG_CHECKING(for rpm SPECS directory)
-if test -d /usr/src/packages/SPECS;
-then
- RPM_SPECSdir=/usr/src/packages/SPECS;
-elif test -d /usr/src/redhat/SPECS;
-then
- RPM_SPECSdir=/usr/src/redhat/SPECS;
-elif test -d /usr/src/SPECS;
+# Allow users to override RPM_SPECSdir from the environment.
+if test x"$RPM_SPECSdir" = x"$RPM_SPECSdir";
then
- RPM_SPECSdir=/usr/src/SPECS;
-elif test -d /usr/local/src/redhat/SPECS;
-then
- RPM_SPECSdir=/usr/local/src/redhat/SPECS;
+# SuSE uses /usr/src/packages
+# redhat uses /usr/src/redhat
+# MDK is reported to use /usr/src/RPM
+# others might use /usr/src
+ rpmpath="/usr:/usr/local"
+ rpmdirs="src/packages:src/redhat:src/RPM:src"
+ save_IFS="$IFS"; IFS=":"
+ for d in $rpmdirs; do
+ for p in $rpmpath; do
+ list="$p/$d:$list"
+ done
+ done
+ for d in $list; do
+ if test -d $d/SPECS; then
+ RPM_SPECSdir="$d/SPECS";
+ break;
+ fi
+ done
+ IFS="$save_IFS"
fi
+
if test x"$RPM_SPECSdir" = x"" ; then
-AC_MSG_ERROR(not found)
+AC_MSG_ERROR([not found])
fi
AC_MSG_RESULT($RPM_SPECSdir)
AC_SUBST(RPM_SPECSdir)
diff --git a/scripts/mkbinutilspec.in b/scripts/mkbinutilspec.in
index d2adf3bd56..489aa9a931 100644
--- a/scripts/mkbinutilspec.in
+++ b/scripts/mkbinutilspec.in
@@ -50,12 +50,12 @@ 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" \
- -e "s%@exe_ext@%${exe_ext}%g" \
+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" \
+ -e "s%@exe_ext\@%${exe_ext}%g" \
< ${RTEMS_DIR}/binutils/binutils.spec.in \
> ${specfile}
diff --git a/scripts/mkbspspec.in b/scripts/mkbspspec.in
index 02edf02dc8..83e10eda39 100644
--- a/scripts/mkbspspec.in
+++ b/scripts/mkbspspec.in
@@ -50,12 +50,12 @@ bsp=$2
specfile=${dst}/$target_alias-$bsp-${rtems_version}.spec
-sed -e "s%@Release@%${rtems_rpm_release}%g" \
- -e "s%@bsp@%${bsp}%g" \
- -e "s%@rtems_version@%${rtems_version}%g" \
- -e "s%@rpm_build_root@%${rpm_build_root}%g" \
- -e "s%@target_alias@%${target_alias}%g" \
- -e "s%@exe_ext@%${exe_ext}%g" \
+sed -e "s%@Release\@%${rtems_rpm_release}%g" \
+ -e "s%@bsp\@%${bsp}%g" \
+ -e "s%@rtems_version\@%${rtems_version}%g" \
+ -e "s%@rpm_build_root\@%${rpm_build_root}%g" \
+ -e "s%@target_alias\@%${target_alias}%g" \
+ -e "s%@exe_ext\@%${exe_ext}%g" \
< ${RTEMS_DIR}/rtems/rtems.spec.in \
> ${specfile}
diff --git a/scripts/mkgccnewlibspec.in b/scripts/mkgccnewlibspec.in
index 013f4d71b7..2064c0f96c 100644
--- a/scripts/mkgccnewlibspec.in
+++ b/scripts/mkgccnewlibspec.in
@@ -57,14 +57,14 @@ target_alias=$1
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" \
- -e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
- -e "s%@exe_ext@%${exe_ext}%g" \
+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" \
+ -e "s%@newlib_patch_version\@%${newlib_patch_version}%g" \
+ -e "s%@exe_ext\@%${exe_ext}%g" \
< ${specsrc} \
> ${specfile}
diff --git a/scripts/mkgdbspec.in b/scripts/mkgdbspec.in
index fc4329bc13..3e73746225 100644
--- a/scripts/mkgdbspec.in
+++ b/scripts/mkgdbspec.in
@@ -65,13 +65,13 @@ case ${target_alias} in
;;
esac
-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" \
- -e "s%@extra_configure_arguments@%${extra_configure_arguments}%g" \
- -e "s%@exe_ext@%${exe_ext}%g" \
+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" \
+ -e "s%@extra_configure_arguments\@%${extra_configure_arguments}%g" \
+ -e "s%@exe_ext\@%${exe_ext}%g" \
< ${RTEMS_DIR}/gdb/gdb.spec.in \
> ${specfile}