[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.184 and 1.184.2.1

version 1.184, 2008/02/03 06:10:53 version 1.184.2.1, 2008/03/24 07:14:28
Line 515  Usage: ${progname} [-EnorUux] [-a arch] 
Line 515  Usage: ${progname} [-EnorUux] [-a arch] 
                         except \`etc'.  Useful after "distribution" or "release"                          except \`etc'.  Useful after "distribution" or "release"
     kernel=conf         Build kernel with config file \`conf'      kernel=conf         Build kernel with config file \`conf'
     releasekernel=conf  Install kernel built by kernel=conf to RELEASEDIR.      releasekernel=conf  Install kernel built by kernel=conf to RELEASEDIR.
     sets                Create binary sets in RELEASEDIR/MACHINE/binary/sets.      sets                Create binary sets in
                           RELEASEDIR/RELEASEMACHINEDIR/binary/sets.
                         DESTDIR should be populated beforehand.                          DESTDIR should be populated beforehand.
     sourcesets          Create source sets in RELEASEDIR/source/sets.      sourcesets          Create source sets in RELEASEDIR/source/sets.
     syspkgs             Create syspkgs in RELEASEDIR/MACHINE/binary/syspkgs.      syspkgs             Create syspkgs in
                           RELEASEDIR/RELEASEMACHINEDIR/binary/syspkgs.
     iso-image           Create CD-ROM image in RELEASEDIR/iso.      iso-image           Create CD-ROM image in RELEASEDIR/iso.
     iso-image-source    Create CD-ROM image with source in RELEASEDIR/iso.      iso-image-source    Create CD-ROM image with source in RELEASEDIR/iso.
     params              Display various make(1) parameters.      params              Display various make(1) parameters.
Line 985  validatemakeparams()
Line 987  validatemakeparams()
                 ${runcmd} cd "${TOP}"                  ${runcmd} cd "${TOP}"
         fi          fi
   
         # Find TOOLDIR, DESTDIR, and RELEASEDIR.          # Find TOOLDIR, DESTDIR, RELEASEDIR, and RELEASEMACHINEDIR.
         #          #
         TOOLDIR=$(getmakevar TOOLDIR)          TOOLDIR=$(getmakevar TOOLDIR)
         statusmsg "TOOLDIR path:     ${TOOLDIR}"          statusmsg "TOOLDIR path:     ${TOOLDIR}"
         DESTDIR=$(getmakevar DESTDIR)          DESTDIR=$(getmakevar DESTDIR)
         RELEASEDIR=$(getmakevar RELEASEDIR)          RELEASEDIR=$(getmakevar RELEASEDIR)
           RELEASEMACHINEDIR=$(getmakevar RELEASEMACHINEDIR)
         if ! $do_expertmode; then          if ! $do_expertmode; then
                 _SRC_TOP_OBJ_=$(getmakevar _SRC_TOP_OBJ_)                  _SRC_TOP_OBJ_=$(getmakevar _SRC_TOP_OBJ_)
                 : ${DESTDIR:=${_SRC_TOP_OBJ_}/destdir.${MACHINE}}                  : ${DESTDIR:=${_SRC_TOP_OBJ_}/destdir.${MACHINE}}
Line 1033  validatemakeparams()
Line 1036  validatemakeparams()
                     [ "${MKUNPRIVED}" = "no" ] ; then                      [ "${MKUNPRIVED}" = "no" ] ; then
                         bomb "-U or -E must be set for build as an unprivileged user."                          bomb "-U or -E must be set for build as an unprivileged user."
                 fi                  fi
         fi          fi
         if ${do_releasekernel} && [ -z "${RELEASEDIR}" ]; then          if ${do_releasekernel} && [ -z "${RELEASEDIR}" ]; then
                 bomb "Must set RELEASEDIR with \`releasekernel=...'"                  bomb "Must set RELEASEDIR with \`releasekernel=...'"
         fi          fi
   
           # Install as non-root is a bad idea.
           #
           if ${do_install} && [ "$(id -u 2>/dev/null)" -ne 0 ] ; then
                   if ${do_expertmode}; then
                           warning "Will install as an unprivileged user."
                   else
                           bomb "-E must be set for install as an unprivileged user."
                   fi
           fi
   
           # If a previous build.sh run used -U (and therefore created a
           # METALOG file), then most subsequent build.sh runs must also
           # use -U.  If DESTDIR is about to be removed, then don't perform
           # this check.
           #
           case "${do_removedirs} ${removedirs} " in
           true*" ${DESTDIR} "*)
                   # DESTDIR is about to be removed
                   ;;
           *)
                   if ( ${do_build} || ${do_distribution} || ${do_release} || \
                       ${do_install} ) && \
                       [ -e "${DESTDIR}/METALOG" ] && \
                       [ "${MKUNPRIVED}" = "no" ] ; then
                           if $do_expertmode; then
                                   warning "A previous build.sh run specified -U."
                           else
                                   bomb "A previous build.sh run specified -U; you must specify it again now."
                           fi
                   fi
                   ;;
           esac
 }  }
   
   
Line 1217  buildkernel()
Line 1253  buildkernel()
 releasekernel()  releasekernel()
 {  {
         getkernelconf $1          getkernelconf $1
         kernelreldir="${RELEASEDIR}/${MACHINE}/binary/kernel"          kernelreldir="${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/kernel"
         ${runcmd} mkdir -p "${kernelreldir}"          ${runcmd} mkdir -p "${kernelreldir}"
         kernlist=$(awk '$1 == "config" { print $2 }' ${kernelconfpath})          kernlist=$(awk '$1 == "config" { print $2 }' ${kernelconfpath})
         for kern in ${kernlist:-netbsd}; do          for kern in ${kernlist:-netbsd}; do
Line 1276  main()
Line 1312  main()
                         statusmsg "Building sets from pre-populated ${DESTDIR}"                          statusmsg "Building sets from pre-populated ${DESTDIR}"
                         ${runcmd} "${makewrapper}" ${parallel} ${op} ||                          ${runcmd} "${makewrapper}" ${parallel} ${op} ||
                             bomb "Failed to make ${op}"                              bomb "Failed to make ${op}"
                         statusmsg "Successful make ${op}"                          setdir=${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
                           statusmsg "Built sets to ${setdir}"
                         ;;                          ;;
   
                 obj|build|distribution|release|sourcesets|syspkgs|params)                  obj|build|distribution|release|sourcesets|syspkgs|params)

Legend:
Removed from v.1.184  
changed lines
  Added in v.1.184.2.1

CVSweb <webmaster@jp.NetBSD.org>