diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C index 3f66a43839..0cefb5fb0e 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C @@ -523,7 +523,7 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const bool Foam::dynamicCode::wmakeLibso() const { - const Foam::string wmakeCmd("wmake libso " + this->codeRelPath()); + const Foam::string wmakeCmd("wmake -s libso " + this->codeRelPath()); Info<< "Invoking " << wmakeCmd << endl; if (Foam::system(wmakeCmd)) diff --git a/wmake/Makefile b/wmake/Makefile index 168710ce19..bd86b11ed4 100644 --- a/wmake/Makefile +++ b/wmake/Makefile @@ -1,4 +1,4 @@ -#------------------------------------------------------------------------------ +#-------------------------------*- makefile -*--------------------------------- # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | diff --git a/wmake/wclean b/wmake/wclean index 12b720fcf6..088bfda52a 100755 --- a/wmake/wclean +++ b/wmake/wclean @@ -40,6 +40,7 @@ Usage: $Script [OPTION] [dir] $Script [OPTION] target [dir [MakeDir]] options: + -s | -silent ignored - for compatibility with wmake -help print the usage Clean up the wmake control directory Make/\$WM_OPTIONS and remove the @@ -52,14 +53,28 @@ The targets correspond to a subset of the 'wmake' special targets: clean Make, any *.dep files and lnInclude directories USAGE - exit 1 + exit 1 } -# provide immediate help -if [ "$1" = "-h" -o "$1" = "-help" ] -then - usage -fi + +# parse options +while [ "$#" -gt 0 ] +do + case "$1" in + -h | -help) + usage + ;; + -s | -silent) # ignored - for compatibility with wmake + shift + ;; + -*) + usage "unknown option: '$*'" + ;; + *) + break + ;; + esac +done #------------------------------------------------------------------------------ diff --git a/wmake/wmake b/wmake/wmake index 2dc93001c1..7dea37e234 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -40,8 +40,10 @@ Usage: $Script [OPTION] [dir] $Script [OPTION] target [dir [MakeDir]] options: + -s | -silent invoke make in 'silent' mode (do not echo commands) -help print the usage + A general, easy-to-use make system for multi-platform development The 'target' is a Makefile target: @@ -59,12 +61,28 @@ USAGE exit 1 } -# provide immediate help, even if environment is not set -if [ "$1" = "-h" -o "$1" = "-help" ] -then - usage -fi +# normally use "make" +make="make" +# parse options +while [ "$#" -gt 0 ] +do + case "$1" in + -h | -help) + usage + ;; + -s | -silent) + make="$make -s" + shift + ;; + -*) + usage "unknown option: '$*'" + ;; + *) + break + ;; + esac +done # # check environment variables @@ -77,6 +95,7 @@ do } done + # when compiling anything but a standalone exe: # WM_PROJECT and WM_PROJECT_DIR must be set [ "$1" = exe -o \( "$WM_PROJECT" -a "$WM_PROJECT_DIR" \) ] || { @@ -91,8 +110,6 @@ done # Select the version of make to be used #------------------------------------------------------------------------------ -make="make" - # set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ] then @@ -113,7 +130,7 @@ then mkdir -p $lockDir fi - make="make --no-print-directory -j "$WM_NCOMPPROCS + make="$make --no-print-directory -j "$WM_NCOMPPROCS fi fi diff --git a/wmake/wmakeLnInclude b/wmake/wmakeLnInclude index 9306db8034..493091e311 100755 --- a/wmake/wmakeLnInclude +++ b/wmake/wmakeLnInclude @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -40,10 +40,16 @@ Script=${0##*/} usage() { + exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< +Usage: $Script [OPTION] dir + +options: + -f | -force force update + -s | -silent use 'silent' mode (do not echo command) + -help print the usage Link all the source files in the into /lnInclude @@ -63,7 +69,7 @@ unset findOpt # default 'ln' option lnOpt="-s" -unset forceUpdate +unset forceUpdate silentOpt # simple parse options while [ "$#" -gt 0 ] @@ -72,10 +78,14 @@ do -h | -help) # provide immediate help usage ;; - -f) - shift + -f | -force) forceUpdate=true lnOpt="-sf" + shift + ;; + -s | -silent) + silentOpt=true + shift ;; -*) usage "unknown option: '$*'" @@ -128,10 +138,12 @@ fi cd $incDir || exit 1 +#------------------------------------------------------------------------------ -# Link include files -# ~~~~~~~~~~~~~~~~~~ -echo "$Script: linking include files to $incDir" +if [ "$silentOpt" != true ] +then + echo "$Script: linking include files to $incDir" 1>&2 +fi # # remove any broken links first (this helps when file locations have moved)