#----------------------------------*-sh-*-------------------------------------- # License # # This file is part of a patch submitted here: # http://www.openfoam.com/mantisbt/view.php?id=256 # It's licensed under the same license of the target software, namely GPL # v3 or above (see ). # # File # wmake/scripts/AllwmakeArguments # # Description # Parses arguments (options) sent to any Allwmake scripts that source this file. # The variable "OriginalOptions" will save the original options, in case # the Allwmake script needs them. # # Usage # . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments # or # allwmakeOptions='-allow-doc doDoxygen' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments # # Valid arguments # -h or -help : shows a list of valid arguments and respective descriptions. # -helpdev : shows a list of hidden arguments and respective descriptions # relevant only to developers. # -k or -nonstop : argument used for building without stopping when errors occur. # -j or -j N : argument used for either running with all available # cores/hyperthreads or with just N cores. # -j+ : variant of the previous option, but running with all available # cores/hyperthreads + 1. # -schedoff : build without wmakeScheduler. # # Arguments for "allwmakeOptions" # -allow-doc docvarname : if "doc" is picked up later on during parsing, then # "docvarname" will be set to 1. # -allow-lib libvarname : if "lib", "libo" or "libso" are detected during parsing, # "libvarname" will be assigned that value. # -allow-inotify varname : if "USE_STAT" is detected, it will assigned to "varname". # -allow-readline varname : if "NO_READLINE" is detected, it will assigned to "varname". # #------------------------------------------------------------------------------ Script=${0##*/} OriginalOptions=$* usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done #show normal usage options cat<