wct-configure-for-ups.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 
4 usage () {
5  cat <<EOF
6 Configure WCT source for building against a UPS products.
7 
8  wct-configure-for-ups.sh install_directory
9 
10 This assumes the UPS environment for the dependent products is
11 already "setup".
12 
13 If install_directory is outside of UPS control then you can stop
14 reading now.
15 
16 If the install_directory is the string "ups" then the source will be
17 configured to install into $WIRECELL_FQ_DIR.
18 
19 That may point to a pre-existing "wirecell" UPS product. If it does,
20 reusing it will install files on top of any pre-exising ones without
21 check so be careful.
22 
23 To make a fresh "wirecell" UPS produce area one can "declare" it like:
24 
25  $ ups declare wirecell <version> \
26  -f \$(ups flavor) \
27  -q e14:prof \
28  -r wirecell/<version> \
29  -z /path/to/install/products \
30  -U ups \
31  -m wirecell.table
32 
33 You'll have to provide the wirecell.table yourself, likely by copying
34 it from an existing "wirecell" UPS product.
35 
36 Then, the calling environment can be munged like:
37 
38  $ setup wirecell <version> -q e14:prof
39 
40 UPS is such a great and simple system! /s
41 
42 EOF
43  exit
44 }
45 
46 install_dir="$1" ; shift
47 if [ "$install_dir" = "ups" ] ; then
48  install_dir="$WIRECELL_FQ_DIR"
49 fi
50 
51 # force to pick up GCC from PATH
52 wct_cc=${CC:-gcc}
53 wct_cxx=${CXX:-g++}
54 wct_fort=${FORT:-gfortran}
55 env CC=$wct_cc CXX=$wct_cxx FC=wct_fort \
56  ./wcb configure \
57  --with-tbb=no \
58  --with-jsoncpp="$JSONCPP_FQ_DIR" \
59  --with-jsonnet="$JSONNET_FQ_DIR" \
60  --with-eigen-include="$EIGEN_DIR/include/eigen3" \
61  --with-root="$ROOT_FQ_DIR" \
62  --with-fftw="$FFTW_FQ_DIR" \
63  --with-fftw-include="$FFTW_INC" \
64  --with-fftw-lib="$FFTW_LIBRARY" \
65  --boost-includes="$BOOST_INC" \
66  --boost-libs="$BOOST_LIB" \
67  --boost-mt \
68  --prefix="$install_dir"
69