947 # have we set RELEASE_DATE in our env file?
948 if [ -z "$RELEASE_DATE" ]; then
949 RELEASE_DATE=$(LC_ALL=C date +"%B %Y")
950 fi
951 BUILD_DATE=$(LC_ALL=C date +%Y-%b-%d)
952 BASEWSDIR=$(basename $CODEMGR_WS)
953 DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\""
954
955 # we export POUND_SIGN, RELEASE_DATE and DEV_CM to speed up the build process
956 # by avoiding repeated shell invocations to evaluate Makefile.master
957 # definitions.
958 export POUND_SIGN RELEASE_DATE DEV_CM
959
960 maketype="distributed"
961 if [[ -z "$MAKE" ]]; then
962 MAKE=dmake
963 elif [[ ! -x "$MAKE" ]]; then
964 echo "\$MAKE is set to garbage in the environment"
965 exit 1
966 fi
967 # get the dmake version string alone
968 DMAKE_VERSION=$( $MAKE -v )
969 DMAKE_VERSION=${DMAKE_VERSION#*: }
970 # focus in on just the dotted version number alone
971 DMAKE_MAJOR=$( echo $DMAKE_VERSION | \
972 sed -e 's/.*\<\([^.]*\.[^ ]*\).*$/\1/' )
973 # extract the second (or final) integer
974 DMAKE_MINOR=${DMAKE_MAJOR#*.}
975 DMAKE_MINOR=${DMAKE_MINOR%%.*}
976 # extract the first integer
977 DMAKE_MAJOR=${DMAKE_MAJOR%%.*}
978 CHECK_DMAKE=${CHECK_DMAKE:-y}
979 # x86 was built on the 12th, sparc on the 13th.
980 if [ "$CHECK_DMAKE" = "y" -a \
981 "$DMAKE_VERSION" != "Sun Distributed Make 7.3 2003/03/12" -a \
982 "$DMAKE_VERSION" != "Sun Distributed Make 7.3 2003/03/13" -a \( \
983 "$DMAKE_MAJOR" -lt 7 -o \
984 "$DMAKE_MAJOR" -eq 7 -a "$DMAKE_MINOR" -lt 4 \) ]; then
985 if [ -z "$DMAKE_VERSION" ]; then
986 echo "$MAKE is missing."
987 exit 1
988 fi
989 echo `whence $MAKE`" version is:"
990 echo " ${DMAKE_VERSION}"
991 cat <<EOF
992
993 This version may not be safe for use, if you really want to use this version
994 anyway add the following to your environment to disable this check:
995
996 CHECK_DMAKE=n
997 EOF
998 exit 1
999 fi
1000 export PATH
1001 export MAKE
1002
1003 if [ "${SUNWSPRO}" != "" ]; then
1004 PATH="${SUNWSPRO}/bin:$PATH"
1005 export PATH
1006 fi
1007
1008 hostname=$(uname -n)
1009 if [[ $DMAKE_MAX_JOBS != +([0-9]) || $DMAKE_MAX_JOBS -eq 0 ]]
1010 then
1011 maxjobs=
1012 if [[ -f $HOME/.make.machines ]]
1013 then
1014 # Note: there is a hard tab and space character in the []s
1015 # below.
1016 egrep -i "^[ ]*$hostname[ \.]" \
1017 $HOME/.make.machines | read host jobs
1018 maxjobs=${jobs##*=}
1019 fi
|
947 # have we set RELEASE_DATE in our env file?
948 if [ -z "$RELEASE_DATE" ]; then
949 RELEASE_DATE=$(LC_ALL=C date +"%B %Y")
950 fi
951 BUILD_DATE=$(LC_ALL=C date +%Y-%b-%d)
952 BASEWSDIR=$(basename $CODEMGR_WS)
953 DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\""
954
955 # we export POUND_SIGN, RELEASE_DATE and DEV_CM to speed up the build process
956 # by avoiding repeated shell invocations to evaluate Makefile.master
957 # definitions.
958 export POUND_SIGN RELEASE_DATE DEV_CM
959
960 maketype="distributed"
961 if [[ -z "$MAKE" ]]; then
962 MAKE=dmake
963 elif [[ ! -x "$MAKE" ]]; then
964 echo "\$MAKE is set to garbage in the environment"
965 exit 1
966 fi
967 export PATH
968 export MAKE
969
970 if [ "${SUNWSPRO}" != "" ]; then
971 PATH="${SUNWSPRO}/bin:$PATH"
972 export PATH
973 fi
974
975 hostname=$(uname -n)
976 if [[ $DMAKE_MAX_JOBS != +([0-9]) || $DMAKE_MAX_JOBS -eq 0 ]]
977 then
978 maxjobs=
979 if [[ -f $HOME/.make.machines ]]
980 then
981 # Note: there is a hard tab and space character in the []s
982 # below.
983 egrep -i "^[ ]*$hostname[ \.]" \
984 $HOME/.make.machines | read host jobs
985 maxjobs=${jobs##*=}
986 fi
|