@@ -18,6 +18,7 @@ alias root='root -l'
1818# Command "recompile O2Physics" will invoke "ninja install" for the "master" branch of O2Physics.
1919# Command "recompile O2Physics my-branch" will invoke "ninja install" for the "my-branch" branch of O2Physics.
2020# Command "recompile O2Physics my-branch Common" will invoke "ninja Common/install" for the "my-branch" branch of O2Physics.
21+ # Command "recompile O2Physics my-branch Common -j 1" will invoke "ninja Common/install -j 1" for the "my-branch" branch of O2Physics.
2122recompile () {
2223 # set -o xtrace # to print out each command
2324 [ " $1 " ] || { echo " Provide a package name" ; return 1; }
@@ -27,6 +28,9 @@ recompile() {
2728 target=" "
2829 target_name=" all"
2930 [ " $3 " ] && { target=" $3 /" ; target_name=" $3 " ; }
31+ shift
32+ shift
33+ shift
3034 dir_pwd=$( pwd)
3135 dir_build=" $ALIBUILD_WORK_DIR /BUILD/${package} -latest-${branch} /${package} "
3236 log=" $( dirname " $dir_build " ) /log"
@@ -35,8 +39,11 @@ recompile() {
3539 direnv allow || { echo " Failed to allow direnv" ; return 1; }
3640 eval " $( direnv export " $SHELL " ) "
3741 echo " Recompiling ${package} _${branch} _${target_name} ..."
42+ if [[ -n " $* " ]]; then
43+ echo " Additional options:" " $@ "
44+ fi
3845 start=$( date +%s)
39- ninja " ${target} install" > " $log " 2>&1
46+ ninja " ${target} install" " $@ " > " $log " 2>&1
4047 ec=$?
4148 end=$( date +%s)
4249 echo " Compilation exited with: $ec "
@@ -52,9 +59,9 @@ recompile() {
5259}
5360
5461# Recompile O2 with ninja.
55- recompile-o2 () { recompile " O2" " $1 " " $2 " ; }
62+ recompile-o2 () { recompile " O2" " $@ " ; }
5663# Recompile O2Physics with ninja.
57- recompile-o2p () { recompile " O2Physics" " $1 " " $2 " ; }
64+ recompile-o2p () { recompile " O2Physics" " $@ " ; }
5865
5966# Find the workflow that produces a given table.
6067# Limited functionality. Use find_dependencies.py for a full search.
@@ -82,5 +89,5 @@ debug-o2-compile() {
8289# Find runtime error messages in an execution log.
8390debug-o2-run () {
8491 [ " $1 " ] || { echo " Provide a log file" ; return 1; }
85- grep -n -e " \\ [ERROR\\ ]" -e " \\ [FATAL\\ ]" -e " segmentation" -e " Segmentation" -e " SEGMENTATION" -e " command not found" -e " Program crashed" -e " Error:" -e " Error in " -e " \\ [WARN\\ ]" -e " Warning in " " $1 "
92+ grep -n -e " \\ [ERROR\\ ]" -e " \\ [FATAL\\ ]" -e " \\ [CRITICAL \\ ] " -e " segmentation" -e " Segmentation" -e " SEGMENTATION" -e " command not found" -e " Program crashed" -e " Error:" -e " Error in " -e " \\ [WARN\\ ]" -e " Warning in " " $1 "
8693}
0 commit comments