Skip to content
Snippets Groups Projects
Commit ec4ded27 authored by Ger van Diepen's avatar Ger van Diepen
Browse files

bug 1131:

Use uname -m instead of arch
Always use 2>&1 (and never >&)
Accept -jn in rubbuild and pass it correctly to dorubbuild
parent 3e2e3be2
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,8 @@ skipbuilt=$1 ...@@ -36,6 +36,8 @@ skipbuilt=$1
shift shift
kopt=$1 kopt=$1
shift shift
jobsopt=$1
shift
buildmake=$1 buildmake=$1
shift shift
conf=$1 conf=$1
...@@ -147,7 +149,7 @@ for pkg in $pkgs ...@@ -147,7 +149,7 @@ for pkg in $pkgs
do do
echo "" >> $logfile echo "" >> $logfile
if [ $skipbuilt = 1 ]; then if [ $skipbuilt = 1 ]; then
fgrep "$pkg " $resfile >& /dev/null fgrep "$pkg " $resfile 2>&1 > /dev/null
if [ $? = 0 ]; then if [ $? = 0 ]; then
echo " skipping package $pkg; already built in a previous run" | tee -a $logfile echo " skipping package $pkg; already built in a previous run" | tee -a $logfile
continue continue
......
...@@ -174,7 +174,7 @@ if [ "$lfr_use_casa" = 1 ]; then ...@@ -174,7 +174,7 @@ if [ "$lfr_use_casa" = 1 ]; then
AIPSPP_CPPFLAGS="$AIPSPP_CPPFLAGS -DAIPS_NO_TEMPLATE_SRC" AIPSPP_CPPFLAGS="$AIPSPP_CPPFLAGS -DAIPS_NO_TEMPLATE_SRC"
fi fi
# Check if we're on a x86-64 bit system. # Check if we're on a x86-64 bit system.
if test "`arch`" = "x86_64"; then if test "`uname -m`" = "x86_64"; then
AIPSPP_CPPFLAGS="$AIPSPP_CPPFLAGS -DAIPS_64B" AIPSPP_CPPFLAGS="$AIPSPP_CPPFLAGS -DAIPS_64B"
fi fi
......
...@@ -281,7 +281,7 @@ else ...@@ -281,7 +281,7 @@ else
## Use different lib directory on 64 bit systems. ## Use different lib directory on 64 bit systems.
lfr_libdext=lib lfr_libdext=lib
if test "`arch`" = "x86_64"; then if test "`uname -m`" = "x86_64"; then
lfr_libdext=lib64; lfr_libdext=lib64;
fi fi
## Put possible version into the library names. ## Put possible version into the library names.
......
...@@ -412,7 +412,7 @@ AC_CHECK_FILE([$lfr_find], [lfr_var=yes], [lfr_var=no]) ...@@ -412,7 +412,7 @@ AC_CHECK_FILE([$lfr_find], [lfr_var=yes], [lfr_var=no])
[fi] [fi]
# Make sure that libraries are installed in lib64 on x86_64 architectures. # Make sure that libraries are installed in lib64 on x86_64 architectures.
if test "`arch`" == "x86_64"; then if test "`uname -m`" == "x86_64"; then
if test "$libdir" = '${exec_prefix}/lib'; then if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64' libdir='${exec_prefix}/lib64'
AC_SUBST(libdir, "$libdir") AC_SUBST(libdir, "$libdir")
......
...@@ -725,7 +725,7 @@ if [ $boot != 0 ]; then ...@@ -725,7 +725,7 @@ if [ $boot != 0 ]; then
for pkg in $pkgs for pkg in $pkgs
do do
if [ $skipbuilt = 1 ]; then if [ $skipbuilt = 1 ]; then
fgrep "$pkg " build.result >& /dev/null fgrep "$pkg " build.result 2>&1 > /dev/null
if [ $? = 0 ]; then if [ $? = 0 ]; then
echo " package $pkg already bootstrapped in a previous run" | tee build.log echo " package $pkg already bootstrapped in a previous run" | tee build.log
continue continue
......
...@@ -190,6 +190,10 @@ do ...@@ -190,6 +190,10 @@ do
shift shift
else else
case "$1" in case "$1" in
-j*)
jobsopt='-j'`echo $1 | sed -e 's/-j//'`
shift
;;
-*) -*)
echo "$1 is an unknown rubbuild option" echo "$1 is an unknown rubbuild option"
exit 1 exit 1
...@@ -284,8 +288,8 @@ fi ...@@ -284,8 +288,8 @@ fi
# dorubbuild writes the build output to a log file. # dorubbuild writes the build output to a log file.
if [ $bg = 1 ]; then if [ $bg = 1 ]; then
echo "Building packages on `uname -n` in $buildvarpr in the background" echo "Building packages on `uname -n` in $buildvarpr in the background"
$pgmpath/dorubbuild "$srcdir" "$builddir" "$variant" "$skipbuilt" "$kopt" "$buildmake" "$conf" "$confopt" "$clean" "$bldtest" "$check" "$checktool" "$install" "$dist" "$distcheck" "$rpm" $pkgs >> /dev/null 2>&1 & $pgmpath/dorubbuild "$srcdir" "$builddir" "$variant" "$skipbuilt" "$kopt" "$jobsopt" "$buildmake" "$conf" "$confopt" "$clean" "$bldtest" "$check" "$checktool" "$install" "$dist" "$distcheck" "$rpm" $pkgs >> /dev/null 2>&1 &
else else
echo "Building packages in $buildvarpr ..." echo "Building packages in $buildvarpr ..."
$pgmpath/dorubbuild "$srcdir" "$builddir" "$variant" "$skipbuilt" "$kopt" "$buildmake" "$conf" "$confopt" "$clean" "$bldtest" "$check" "$checktool" "$install" "$dist" "$distcheck" "$rpm" $pkgs $pgmpath/dorubbuild "$srcdir" "$builddir" "$variant" "$skipbuilt" "$kopt" "$jobsopt" "$buildmake" "$conf" "$confopt" "$clean" "$bldtest" "$check" "$checktool" "$install" "$dist" "$distcheck" "$rpm" $pkgs
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment