bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patches Re: gmake check blows up: Solaris 2.7 (fwd)


From: Hugh Sasse Staff Elec Eng
Subject: Patches Re: gmake check blows up: Solaris 2.7 (fwd)
Date: Thu, 29 Nov 2001 12:29:53 +0000 (GMT)

I posted this to info-cvs but have had no response.  It applies to:

   Concurrent Versions System (CVS) 1.11 (client/server)

   Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn,
                           Jeff Polk, and other authors

I have a possible test for proper gnu functionality now as well,
if that is any use, but I don't have enough systems to test its
portability.
        Hugh

---------- Forwarded message ----------
Date: Thu, 15 Nov 2001 15:02:17 +0000 (GMT)
From: Hugh Sasse Staff Elec Eng <hgs@dmu.ac.uk>
To: Info-cvs@gnu.org
Subject: Re: gmake check blows up: Solaris 2.7

On Thu, 15 Nov 2001, I wrote about make check failing:

>
> cd src ; gmake AR='ar' CC='gcc' CFLAGS='-g -O2' LDFLAGS='' LIBPROGS='' 
> LIBS='-lxnet ' MAKE='gmake' MAKEINFO='makeinfo' RANLIB='ranlib' 
> TEXI2DVI='texi2dvi' YACC='yacc' bindir='/usr/local/bin' 
> infodir='/usr/local/info' libdir='/usr/local/lib' mandir='/usr/local/man' 
> prefix='/usr/local' exec_prefix='/usr/local' check
> gmake[1]: Entering directory `/scratch/hgs/cvs-1.11/src'
> /bin/sh ./sanity.sh `pwd`/cvs
> This test should produce no other output than this line, and a final "OK".
> id: illegal option -- u
> Usage: id [user]
>        id -a [user]
> /bin/id: illegal option -- -
> Usage: id [user]
>        id -a [user]
> Notice: The default version of id is defective, using
> /bin/id instead.
> /bin/id: illegal option -- u
> Usage: id [user]
>        id -a [user]
> expr: RE error
> Test suite does not work correctly when run by a username
> containing regular expression meta-characters.
> gmake[1]: *** [check] Error 1
> gmake[1]: Leaving directory `/scratch/hgs/cvs-1.11/src'
> gmake: *** [check] Error 2

        [...]
>
> neelix hgs 47 %> gmake --version
> GNU Make version 3.79, by Richard Stallman and Roland McGrath.
        [...]
> neelix hgs 48 %> uname -a
> SunOS neelix 5.7 Generic_106541-11 sun4u sparc SUNW,Ultra-250
>

I believe I have fixed this now.  gmake check works on my system.

The patch below does two things:
The first is it changes (where UTIL is AWK, EXPR, etc):
: ${UTIL=util}
to be
: ${UTIL:=util}

This will catch the case where $UTIL is set, but is null, as well as the
case where it is simply unset.

The second thing it does is to search in the GNUish places first.  In
the find_tools function, attempts are made to find the gnu executables
by g$UTIL first, then by $UTIL.  However, $PATH is searched first, before
the GNU directories.  I have switched this around on the basis that
it is pretty standard to install the gnu things in the directories specified,
and the find_tools function bails out when it finds an executable, even
though it might not have gnu functionality.

A better fix would be to use grep to search the output of $1 --version
to see if it contains GNU, and if not, use this as a fallback position.
I'm not sure I could program that portably, though.

My patches are below.  Could someone let me know if these patches are
accepted, rejected, or if I must post to bugs-cvs or some such to get things
changed for sure?

        Thank you,
        Hugh
        hgs@dmu.ac.uk


--- src/sanity.sh.orig  Wed Aug 23 21:02:22 2000
+++ src/sanity.sh       Thu Nov 15 14:18:47 2001
@@ -54,7 +54,7 @@
 #     if we wanted to get baroque we could start making symlinks
 #     to ensure the two are different.
 tmp=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null`
-: ${TESTDIR=$tmp/cvs-sanity}
+: ${TESTDIR:=$tmp/cvs-sanity}

 # "debugger"
 #set -x
@@ -152,14 +152,14 @@

 # Make sure various tools work the way we expect, or try to find
 # versions that do.
-: ${AWK=awk}
-: ${EXPR=expr}
-: ${ID=id}
-: ${TR=tr}
+: ${AWK:=awk}
+: ${EXPR:=expr}
+: ${ID:=id}
+: ${TR:=tr}

 find_tool ()
 {
-  GLOCS="`echo $PATH | sed 's/:/ /g'` /usr/local/bin /usr/contrib/bin 
/usr/gnu/bin /local/bin /local/gnu/bin /gun/bin"
+  GLOCS="/usr/local/bin /usr/contrib/bin /usr/gnu/bin /local/bin 
/local/gnu/bin /gun/bin `echo $PATH | sed 's/:/ /g'` "
   TOOL=""
   for path in $GLOCS ; do
     if test -x $path/g$1 ; then


_______________________________________________
Info-cvs mailing list
Info-cvs@gnu.org
http://mail.gnu.org/mailman/listinfo/info-cvs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]