Commit e9db477d authored by Simon Braß's avatar Simon Braß
Browse files

Update help documentation

parent 98deb712
......@@ -6,48 +6,54 @@
## Author: Simon Braß <simon.brass@desy.de>
## Last modified: 25th May 2021
##
## CAUTION: We take no garantue for correct useage or indentation of this script.
## CAUTION: We take no garantue for the correct usage or indentation of this script.
## USE AT YOUR OWN RISK! → READ AND UNDERSTAND the following lines.
##
## Requirements: Bash (>5), Unix-System
## Unsupported: Mac OS - I do not care enough to provide such support.
##
## Description: Bundle all external dependencies of the Monte Carlo event generator WHIZARD.
## The bootstrap script downloads, builds and installs all external tools in a consistent way in one (discardable) user place.
## The script is not meant for global installation, i.e. directly in {/usr,/usr/local}, neither to be run as root or with superuser/sudo permissions.
## We try our best to veto those cases, but beware of the unconventional user.
## * Description
##
## External tools:
## - Autotools
## - m4
## - Make
## - Autoconf
## - Automake
## - Libtool
## - OCaml
## - Root (as mandatory dependency of Delphes)
## - HepMC2
## - HepMC3
## - LHAPDF6
## - FastJet
## - Pythia8
## - Delphes
## - Rivet (convenience for the author of this script)
## Bundle all external dependencies of the Monte Carlo event generator WHIZARD.
## The bootstrap script downloads, builds and installs all external tools in a consistent way in one (discardable) user place.
## The script is not meant for global installation, i.e. directly in {/usr,/usr/local}, neither to be run as root or with superuser/sudo permissions.
## We try our best to veto those cases, but beware of the unconventional user.
##
## We configure the external tools for *our* toolchain.
## * External tools
##
## TODO:
## - CMake
## - Compiler FLAGS (FC, CC, CXX) and CFLAGS, CXXFLAGS, FCFLAGS (at least)
## - Autotools
## - m4
## - Make
## - Autoconf
## - Automake
## - Libtool
## - OCaml
## - Root (as mandatory dependency of Delphes or HepMC3)
## - HepMC2
## - HepMC3
## - LHAPDF6
## - FastJet
## - Pythia8
## - Delphes
## - Rivet (convenience for the author of this script)
##
## We provide a configuration best suited for *our* tool setting, i.e. WHIZARD on a single computer/laptop.\
##
## * TODO
##
## - CMake (Build)
## - Compiler FLAGS (FC, CC, CXX) and CFLAGS, CXXFLAGS, FCFLAGS (at least)
##
## Environment variables:
## - FORCE [False|True] Force build of autotools, although the underlying system provides them.
## - BUILD [Path] Path to build directory, defaults to the current working directory.
## - PREFIX [Path] Path to installation directory, defaults to $HOME/local.
## - NPROC [N] Number of parallel processes, defaults to (cores - 1).
## - CMAKE_GENERATOR [Ninja|Unix Makefiles] Use Ninja per default, fallback to Unix Makefiles.
## - DEBUG [False|True] Developer option.
## * Environment variables
##
## - FORCE [False|True] :: Force build of autotools, although the underlying system provides them.
## - BUILD [Path] :: Path to build directory, defaults to the current working directory.
## - PREFIX [Path] :: Path to installation directory, defaults to $HOME/local.
## - NPROC [N] :: Number of parallel processes, defaults to (cores - 1).
## - ROOT_DIR :: Path to top-level directory of a ROOT installation.
## - CMAKE_GENERATOR [Ninja|Unix Makefiles] :: Use Ninja per default, fallback to Unix Makefiles.
## - DEBUG [False|True] :: Developer option.
##
test -z "${FORCE}" && FORCE=False
......@@ -433,9 +439,6 @@ PYTHIA8_CONFIG=(
# PYTHIA8_hepmcinterface_LIBRARY:FILEPATH=PYTHIA8_hepmcinterface_LIBRARY-NOTFOUND
# PYTHIA8_lhapdfdummy_LIBRARY:FILEPATH=PYTHIA8_lhapdfdummy_LIBRARY-NOTFOUND
## Build chain: FastJet, HepMC and LHAPDF6 → Pythia8 → ROOT → Delphes, HepMC3
##
# CMAKE_INSTALL_PREFIX PATH Path where ROOT will be installed if make install is invoked or the “INSTALL” target is built.
# CMAKE_C_FLAGS STRING Extra flags to use when compiling C source files.
# CMAKE_CXX_FLAGS STRING Extra flags to use when compiling C++ source files.
......@@ -445,12 +448,21 @@ PYTHIA8_CONFIG=(
# CMAKE_CXX_COMPILER PATH Full path to the C++ compiler. Alternatively you can specify the environment variable CXX before invoking cmake
# Use: FC, CC, CXX for Fortran, C and C++ Compiler
## We handle ROOT /just/ as a dependency of Delphes and HepMC3.
## Therefore, we do not configure ROOT with any additional external tool, i.e. Pythia8.
## We will only include mandatory dependencies, when needed.
## Note: Per default, we do not include the ROOT build.
## However, the user *must* set an exisiting =ROOT_DIR=, which we test only on the existence of =thisroot.sh= (we are really lazy) in it.
## * Root
##
## We handle ROOT /just/ as a dependency of Delphes and HepMC3.
## Therefore, we do not configure ROOT with any additional external tools, e.g. Pythia8.
## We will only include mandatory dependencies, when needed.
##
## ** Note
##
## Per default, we do not include the ROOT build.
## However, the user *must* set an exisiting =ROOT_DIR= which points towards the top-level directory of an ROOT installation.
## We /only/ check the existence of the top-level directory and assess that =ROOTConfig.cmake= exists.
##
## ** Example
##
## ROOT_DIR=/usr/lib/cmake/ROOT/ROOTConfig.cmake
##
ROOT_CONFIG=(
-DCMAKE_INSTALL_PREFIX="${PREFIX}"
......@@ -490,6 +502,23 @@ RIVET_CONFIG=(
FASTJETPATH="\"${PREFIX}\""
)
## * Allowed modes
##
## - autotools
## - ocaml
## - hepmc2
## - lhapdf
## - fastjet
## - openloops
## - root
## - hepmc3
## - delphes
## - pythia8
## - rivet
## - whizard
##
## Build chain: FastJet, HepMC2 and LHAPDF6 → Pythia8 → ROOT → Delphes, HepMC3
##
function main() {
mkdir -p "${LOG}"
mkdir -p "${BUILD}"
......@@ -499,6 +528,9 @@ function main() {
else
local modes=("${@}")
fi
# Build chain: FastJet, HepMC and LHAPDF6 → Pythia8 → ROOT → Delphes, HepMC3
for mode in "${modes[@]}"; do
case $mode in
autotools)
......@@ -586,18 +618,19 @@ function main() {
done
}
FORCE_ROOT=false
FORCE_ROOT=False
## Command-line options:
## -h : print help message (or when none argument is presented)
## -r : force build of ROOT
## * Command-line options:
##
## -h : print help message (or when none argument is presented)
## -r : force build of ROOT
while getopts ":hr" opt; do
case "${opt}" in
h)
help
;;
r)
FORCE_ROOT=true
FORCE_ROOT=True
;;
\?)
echo "Invalid option: -${OPTARG}" >&2
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment