3 # build "third party" products
8 Usage: $(basename ${0}) [-
h]
9 $(basename ${0}) <
version> <qual_set> <build_type>
10 env WORKSPACE=<workspace> LARVER=<larsoft
version>
QUAL=<qualifier> BUILDTYPE=<
debug|
prof> $(basename ${0})
20 for label
in "${labels[@]}";
do
21 for wanted in
"$@";
do
22 [[
"${label}" ==
"${wanted}" ]] &&
return 0
40 shift `expr $OPTIND - 1`
43 working_dir=
"${WORKSPACE:-$(pwd)}"
45 qual_set=
"${2:-${QUAL}}"
47 build_type=
"${3:-${BUILDTYPE}}"
50 for onequal
in "${quals[@]}";
do
51 if [[
"${onequal}" =~ ^([ec])([0-9]+)$ ]]; then
53 elif [[
"${onequal}" =~ ^(
s)([1-9][0-9]+)$ ]]; then
68 # create copyBack so artifact
copy does not fail on early
exit
69 rm -rf
"${working_dir}/copyBack"
72 # Find platform flavor.
74 if [
"${OS}" =
"Linux" ]
77 if [
"${id}" =
"Ubuntu" ]
79 flvr=u`lsb_release -
r | sed -
e 's/[[:space:]]//g' | cut -f2 -d
":" | cut -f1 -d
"."`
81 flvr=slf`lsb_release -
r | sed -
e 's/[[:space:]]//g' | cut -f2 -d
":" | cut -f1 -d
"."`
83 elif [
"${OS}" =
"Darwin" ]
85 flvr=d`uname -
r | cut -f1 -d
"."`
95 echo
"ERROR: unrecognized operating system ${OS}"
99 # Check supported builds.
100 if [[ `uname -
s` ==
Darwin ]]; then
101 OSnum=`uname -
r | cut -f1 -d
"."`
102 xver=`xcodebuild -
version | grep Xcode | cut -f2 -d
" " | cut -f1 -d
"."`
103 xcver=`xcodebuild -
version | grep Xcode`
104 if { [[ ${basequal} =~ ^
e(9$|[1-9][0-9]) ]] && \
105 [[ ${xver} < 7 ]] && \
106 [[ ${OSnum} > 13 ]]; }; then
107 # XCode too old on this platform.
108 echo
"${basequal} build not supported on `uname -s`${OSnum} with ${xcver}"
109 echo
"${basequal} build not supported on `uname -s`${OSnum} with ${xcver}" > \
110 "${working_dir}/copyBack/skipping_build"
112 elif { [[
"$basequal" ==
e* ]] || \
113 { [[
"$basequal" == c* ]] && (( $OSnum < 15 )); }; }; then
114 if want_unsupported; then
115 echo
"Building unsupported ${basequal} on `uname -s`${OSnum} due to \$CET_BUILD_UNSUPPORTED=${CET_BUILD_UNSUPPORTED}"
117 # Don't normally support GCC builds on MacOS.
118 msg=
"${basequal} build not supported on `uname -s`${OSnum} -- export CET_BUILD_UNSUPPORTED=1 to override."
120 echo
"$msg" >
"${working_dir}/copyBack/skipping_build"
125 msg=
"We are not building for Python2 on Darwin."
127 echo
"${msg}" >
"${working_dir}/copyBack/skipping_build"
130 elif [[
"${flvr}" == slf6 ]]; then
132 echo
"Building for supported Python2 on SLF6"
134 msg=
"Python3 builds not supported on SLF6."
136 echo
"${msg}" >
"${working_dir}/copyBack/skipping_build"
141 dotver=`echo ${
version} | sed -
e 's/_/./g' | sed -
e 's/^v//'`
143 echo
"building the larsoft product stack for ${version} ${dotver} ${qual_set} ${build_type}"
144 echo
"build flavor is ${flvr}"
147 qualdir=`echo ${qual_set} | sed -
e 's%:%-%'`
151 blddir=${working_dir}/build
152 srcdir=${working_dir}/
source
153 # start with clean directories
156 # now make the dfirectories
160 buildFW=
"${working_dir}/artutilscripts/tools/buildFW"
164 if [ -
z "${buildFW}" ]; then
165 curl --fail --silent --location --insecure -
O http:
167 buildFW=
"${blddir}/buildFW"
174 (( ${#
labels[@]} > 0 )) && lopt=-l
176 ${lopt} $(
IFS=:; printf
'%s' "${labels[*]}") \
177 ${blddir} ${build_type} lar_product_stack-${
version} || \
process_name opflash particleana ie ie ie z
*usage exit esac done shift expr $OPTIND OPTIND
process_name opflash particleana ie x
then cvmfs grid cern ch util cvmfs uptodate cvmfs uboone opensciencegrid org products fi source cvmfs uboone opensciencegrid org products setup_uboone sh exit else echo No setup file found exit fi if!uname grep q Darwin
then source cvmfs dune opensciencegrid org products dune setup_dune sh exit elif[-f/grid/fermiapp/products/dune/setup_dune_fermiapp.sh]
do case in h help echo Usage
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
then echo File list $list not found else cat $list while read file do echo $file sed s
s7[0-9] s8[0-9] s9[0-9] squal