43 print -u2 "${progname}: ERROR: $*" |
43 print -u2 "${progname}: ERROR: $*" |
44 exit 1 |
44 exit 1 |
45 } |
45 } |
46 |
46 |
47 MAKE_PKGS=0 |
47 MAKE_PKGS=0 |
|
48 MAKE_SRC_RELEASE=0 # generate sources for Solaris FOSS release process |
48 VERBOSE_FLAGS="" # verbosity flag passed to xmake/make_release_packages |
49 VERBOSE_FLAGS="" # verbosity flag passed to xmake/make_release_packages |
49 PUBLISHER_FLAGS="" |
50 PUBLISHER_FLAGS="" |
50 |
51 |
51 while getopts pP:v i; do |
52 while getopts pP:sv i; do |
52 case $i in |
53 case $i in |
53 p) MAKE_PKGS=1 ;; |
54 p) MAKE_PKGS=1 ;; |
|
55 s) MAKE_SRC_RELEASE=1 ;; |
54 v) VERBOSE_FLAGS="-v" ;; |
56 v) VERBOSE_FLAGS="-v" ;; |
55 P) PUBLISHER_FLAGS="-p $OPTARG" ;; |
57 P) PUBLISHER_FLAGS="-p $OPTARG" ;; |
56 ?) print -u2 "USAGE: $0 [-p [-P publisher]] [-v]"; exit 2 ;; |
58 ?) print -u2 "USAGE: $0 [-p [-P publisher]] [-s] [-v]"; exit 2 ;; |
57 esac |
59 esac |
58 done |
60 done |
59 |
61 |
60 shift $(($OPTIND-1)) |
62 shift $(($OPTIND-1)) |
61 |
63 |
107 for tool in parfait ${GCC} gmake autoconf automake libtool ; do |
109 for tool in parfait ${GCC} gmake autoconf automake libtool ; do |
108 printf "%-22s\t" "$(whence ${tool}):" |
110 printf "%-22s\t" "$(whence ${tool}):" |
109 ${tool} --version | head -1 |
111 ${tool} --version | head -1 |
110 done |
112 done |
111 |
113 |
112 # Exported to stop Sun compilers from reporting home on each usage |
114 # Exported to stop Studio compilers from reporting home on each usage |
113 export SUNW_NO_UPDATE_NOTIFY='true' |
115 export SUNW_NO_UPDATE_NOTIFY='true' |
114 export UT_NO_USAGE_TRACKING='1' |
116 export UT_NO_USAGE_TRACKING='1' |
115 |
117 |
116 print "Using these environment variables: " |
118 print "Using these environment variables: " |
117 env |
119 env |
121 |
123 |
122 # Clean new proto areas for this architecture |
124 # Clean new proto areas for this architecture |
123 /bin/rm -rf "proto/root_${MACH}" "proto/metadata_${MACH}" \ |
125 /bin/rm -rf "proto/root_${MACH}" "proto/metadata_${MACH}" \ |
124 "proto/pkg_${MACH}" "proto/tools_${MACH}" |
126 "proto/pkg_${MACH}" "proto/tools_${MACH}" |
125 |
127 |
|
128 ${XMAKE} clobber |
|
129 |
|
130 # Generate source release while tree is in clean state, but ensure we have all |
|
131 # the required tarballs for both platforms, (and no extras/old ones) first. |
|
132 if [ "${MAKE_SRC_RELEASE}" = 1 ] ; then |
|
133 rm -rf open-src/tarballs |
|
134 mkdir -p open-src/tarballs |
|
135 for darch in i386 sparc ; do |
|
136 (cd open-src ; \ |
|
137 ${XMAKE} download MACH="${darch}" ADD_PASSDOWN_VARS="MACH=${darch}") |
|
138 done |
|
139 rm -f proto/x.zip BUILD_INSTRUCTIONS.txt pkglist.txt |
|
140 ${XMAKE} proto/x.zip |
|
141 fi |
|
142 |
126 cd open-src |
143 cd open-src |
127 # Run as two steps to avoid race between cleaning & rebuilding when |
|
128 # using parallel make |
|
129 ${XMAKE} clobber |
|
130 ${XMAKE} install |
144 ${XMAKE} install |
131 ${XMAKE} check_rtime > ../log/check-rtime 2>&1 & |
145 ${XMAKE} check_rtime > ../log/check-rtime 2>&1 & |
132 cd .. |
146 cd .. |
133 |
147 |
134 get_make_var USE_PARFAIT |
148 get_make_var USE_PARFAIT |
135 if [[ "${USE_PARFAIT}" == "yes" ]] ; then |
149 if [[ "${USE_PARFAIT}" == "yes" ]] ; then |
136 get_make_var DMAKE_MAX_JOBS |
150 get_make_var DMAKE_MAX_JOBS |
137 /bin/rm -rf log/parfait |
151 /bin/rm -rf log/parfait |
138 parfait -e all -c open-src/common/X-parfait.conf -z "$(pwd)" \ |
152 parfait -e all -c open-src/common/X-parfait.conf -z "$(pwd)" \ |
139 -j "${DMAKE_MAX_JOBS:-100%}" -r "${XBUILD_HG_ID}" \ |
153 -j "${DMAKE_MAX_JOBS:-100%}" -r "${XBUILD_HG_ID}" \ |
140 -o log/parfait.txt -g log/parfait open-src > log/parfait.out 2>&1 & |
154 -o log/parfait.txt -g log/parfait ${X_ADD_PARFAIT_FLAGS} \ |
|
155 open-src > log/parfait.out 2>&1 & |
141 fi |
156 fi |
142 |
157 |
143 # Set DISTRO_NAME based on open-src/common/Makefile.options |
158 # Set DISTRO_NAME based on open-src/common/Makefile.options |
144 get_make_var DISTRO_NAME |
159 get_make_var DISTRO_NAME |
145 |
160 |