[BACK]Return to build.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/build.sh between version 1.197 and 1.198

version 1.197, 2008/08/22 23:41:24 version 1.198, 2008/10/26 23:40:06
Line 894  try_set_TOOLDIR()
Line 894  try_set_TOOLDIR()
 {  {
         [ -n "${TOOLDIR}" ] && return          [ -n "${TOOLDIR}" ] && return
   
         # Set guess_TOOLDIR, in the same way that <bsd.own.mk> would set          # Set host_ostype to something like "NetBSD-4.5.6-i386".  This
         # TOOLDIR if /etc/mk.conf isn't interfering.          # is intended to match the HOST_OSTYPE variable in <bsd.own.mk>.
           #
         local host_ostype="${uname_s}-$(          local host_ostype="${uname_s}-$(
                 echo "${uname_r}" | sed -e 's/([^)]*)//g' -e 's/ /_/g'                  echo "${uname_r}" | sed -e 's/([^)]*)//g' -e 's/ /_/g'
                 )-$(                  )-$(
                 echo "${uname_p}" | sed -e 's/([^)]*)//g' -e 's/ /_/g'                  echo "${uname_p}" | sed -e 's/([^)]*)//g' -e 's/ /_/g'
                 )"                  )"
         local guess_TOOLDIR="${TOP_objdir}/tooldir.${host_ostype}"  
   
         # Look for a suitable ${toolprefix}make, nbmake, bmake, or make.          # Look in a few potential locations for
         guess_make="${guess_TOOLDIR}/bin/${toolprefix}make"          # ${possible_TOOLDIR}/bin/${toolprefix}make.
         [ -x "${guess_make}" ] || guess_make=""          # If we find it, then set guess_make.
           #
           # In the usual case (without interference from environment
           # variables or /etc/mk.conf), <bsd.own.mk> should set TOOLDIR to
           # "${TOP_objdir}/tooldir.${host_ostype}".  However, in practice
           # we might have the wrong value of TOP_objdir, so we also try
           # some other possibilities.
           #
           local possible_TOP_OBJ
           local possible_TOOLDIR
           for possible_TOP_OBJ in "${TOP_objdir}" "${TOP}" "${TOP}/obj" \
                   "${TOP}/obj.${MACHINE}"
           do
                   possible_TOOLDIR="${possible_TOP_OBJ}/tooldir.${host_ostype}"
                   guess_make="${possible_TOOLDIR}/bin/${toolprefix}make"
                   if [ -x "${guess_make}" ]; then
                           break;
                   else
                           unset guess_make
                   fi
           done
   
           # If the above didn't work, search the PATH for a suitable
           # ${toolprefix}make, nbmake, bmake, or make.
           #
         : ${guess_make:=$(find_in_PATH ${toolprefix}make '')}          : ${guess_make:=$(find_in_PATH ${toolprefix}make '')}
         : ${guess_make:=$(find_in_PATH nbmake '')}          : ${guess_make:=$(find_in_PATH nbmake '')}
         : ${guess_make:=$(find_in_PATH bmake '')}          : ${guess_make:=$(find_in_PATH bmake '')}
         : ${guess_make:=$(find_in_PATH make '')}          : ${guess_make:=$(find_in_PATH make '')}
   
         # Use ${guess_make} with nobomb_getmakevar          # Use ${guess_make} with nobomb_getmakevar to try to find
           # the value of TOOLDIR.  If this fails, unset TOOLDIR.
           #
           unset TOOLDIR
         if [ -x "${guess_make}" ]; then          if [ -x "${guess_make}" ]; then
                 TOOLDIR=$(make="${guess_make}" nobomb_getmakevar TOOLDIR)                  TOOLDIR=$(make="${guess_make}" nobomb_getmakevar TOOLDIR)
                 [ $? -eq 0 -a -n "${TOOLDIR}" ] || unset TOOLDIR                  [ $? -eq 0 -a -n "${TOOLDIR}" ] || unset TOOLDIR

Legend:
Removed from v.1.197  
changed lines
  Added in v.1.198

CVSweb <webmaster@jp.NetBSD.org>