Print this page
first pass

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/nightly.sh
          +++ new/usr/src/tools/scripts/nightly.sh
↓ open down ↓ 155 lines elided ↑ open up ↑
 156  156          fi
 157  157  }
 158  158  
 159  159  #
 160  160  # usage: filelist DESTDIR PATTERN
 161  161  #
 162  162  function filelist {
 163  163          DEST=$1
 164  164          PATTERN=$2
 165  165          cd ${DEST}
 166      -
 167      -        OBJFILES=${ORIG_SRC}/xmod/obj_files
 168      -        if [ ! -f ${OBJFILES} ]; then
 169      -                return;
 170      -        fi
 171      -        for i in `grep -v '^#' ${OBJFILES} | \
 172      -            grep ${PATTERN} | cut -d: -f2 | tr -d ' \t'`
 173      -        do
 174      -                # wildcard expansion
 175      -                for j in $i
 176      -                do
 177      -                        if [ -f "$j" ]; then
 178      -                                echo $j
 179      -                        fi
 180      -                        if [ -d "$j" ]; then
 181      -                                echo $j
 182      -                        fi
 183      -                done
 184      -        done | sort | uniq
 185  166  }
 186  167  
 187  168  # function to save off binaries after a full build for later
 188  169  # restoration
 189  170  function save_binaries {
 190  171          # save off list of binaries
 191  172          echo "\n==== Saving binaries from build at `date` ====\n" | \
 192  173              tee -a $mail_msg_file >> $LOGFILE
 193  174          rm -f ${BINARCHIVE}
 194  175          cd ${CODEMGR_WS}
↓ open down ↓ 213 lines elided ↑ open up ↑
 408  389          /bin/time $MAKE -e ${MAKETARG} 2>&1 | \
 409  390              tee -a $SRC/${MAKETARG}.out >> $LOGFILE
 410  391          echo "\n==== ${MAKETARG} build errors ====\n" >> $mail_msg_file
 411  392          egrep ":" $SRC/${MAKETARG}.out | \
 412  393                  egrep -e "(^${MAKE}:|[  ]error[:        \n])" | \
 413  394                  egrep -v "Ignoring unknown host" | \
 414  395                  egrep -v "warning" >> $mail_msg_file
 415  396  
 416  397          echo "clearing state files." >> $LOGFILE
 417  398          find . -name '.make*' -exec rm -f {} \;
 418      -
 419      -        cd ${DEST}
 420      -        if [ "${MAKETARG}" = "CRYPT_SRC" ]; then
 421      -                rm -f ${CODEMGR_WS}/crypt_files.cpio.Z
 422      -                echo "\n==== xmod/cry_files that don't exist ====\n" | \
 423      -                    tee -a $mail_msg_file >> $LOGFILE
 424      -                CRYPT_FILES=${WS}/usr/src/xmod/cry_files
 425      -                for i in `cat ${CRYPT_FILES}`
 426      -                do
 427      -                        # make sure the files exist
 428      -                        if [ -f "$i" ]; then
 429      -                                continue
 430      -                        fi
 431      -                        if [ -d "$i" ]; then
 432      -                                continue
 433      -                        fi
 434      -                        echo "$i" | tee -a $mail_msg_file >> $LOGFILE
 435      -                done
 436      -                find `cat ${CRYPT_FILES}` -print 2>/dev/null | \
 437      -                    cpio -ocB 2>/dev/null | \
 438      -                    compress > ${CODEMGR_WS}/crypt_files.cpio.Z
 439      -        fi
 440      -
 441      -        if [ "${MAKETARG}" = "EXPORT_SRC" ]; then
 442      -                # rename first, since we might restore a file
 443      -                # of the same name (mapfiles)
 444      -                rename_files ${EXPORT_SRC} EXPORT_SRC
 445      -                if [ "$SH_FLAG" = "y" ]; then
 446      -                        hybridize_files ${EXPORT_SRC} EXPORT_SRC
 447      -                fi
 448      -        fi
 449      -
 450      -        # save the cleartext
 451      -        echo "\n==== Creating ${MAKETARG}.cpio.Z ====\n" | \
 452      -            tee -a $mail_msg_file >> $LOGFILE
 453      -        cd ${DEST}
 454      -        rm -f ${MAKETARG}.cpio.Z
 455      -        find usr -depth -print | \
 456      -            grep -v usr/src/${MAKETARG}.out | \
 457      -            cpio -ocB 2>/dev/null | \
 458      -            compress > ${CODEMGR_WS}/${MAKETARG}.cpio.Z
 459      -        if [ "${MAKETARG}" = "EXPORT_SRC" ]; then
 460      -                restore_binaries ${EXPORT_SRC} EXPORT_SRC
 461      -        fi
 462      -
 463      -        if [ "${MAKETARG}" = "CRYPT_SRC" ]; then
 464      -                restore_binaries ${CRYPT_SRC} CRYPT_SRC
 465      -        fi
 466      -
 467  399  }
 468  400  
 469  401  # Return library search directive as function of given root.
 470  402  function myldlibs {
 471  403          echo "-L$1/lib -L$1/usr/lib"
 472  404  }
 473  405  
 474  406  # Return header search directive as function of given root.
 475  407  function myheaders {
 476  408          echo "-I$1/usr/include"
↓ open down ↓ 614 lines elided ↑ open up ↑
1091 1023          -w      report on differences between previous and current proto areas
1092 1024          -z      compress cpio archives with gzip
1093 1025          -W      Do not report warnings (freeware gate ONLY)
1094 1026          -S      Build a variant of the source product
1095 1027                  E - build exportable source
1096 1028                  D - build domestic source (exportable + crypt)
1097 1029                  H - build hybrid source (binaries + deleted source)
1098 1030                  O - build (only) open source
1099 1031  '
1100 1032  #
1101      -#       -x      less public handling of xmod source for the source product
1102      -#
1103 1033  #       A log file will be generated under the name $LOGFILE
1104 1034  #       for partially completed build and log.`date '+%F'`
1105 1035  #       in the same directory for fully completed builds.
1106 1036  #
1107 1037  
1108 1038  # default values for low-level FLAGS; G I R are group FLAGS
1109 1039  A_FLAG=n
1110 1040  C_FLAG=n
1111 1041  D_FLAG=n
1112 1042  F_FLAG=n
↓ open down ↓ 2135 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX