From 16b29a9bd05b4bd6de23861ffb424012d8e5633e Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 10 Jan 2015 23:18:34 +0000 Subject: [PATCH] wrmdep: Add -a/-all/all option to removed for all platforms rather than just the current platform. --- wmake/wrmdep | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/wmake/wrmdep b/wmake/wrmdep index e77fa9d0b..dd647082f 100755 --- a/wmake/wrmdep +++ b/wmake/wrmdep @@ -23,12 +23,13 @@ # along with OpenFOAM. If not, see . # # Script -# wrmdep [file] +# wrmdep [-a | -all | all] [file] # # Description # Remove all .dep files from the object directory tree corresponding to the # current source derectory or remove only the .dep files referring to the -# optionally specified [file]. +# optionally specified [file]. With the -a/-all/all option the dep files +# are removed for all platforms rather than just the current platform. # #------------------------------------------------------------------------------ Script=${0##*/} @@ -40,9 +41,11 @@ usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< +With the -a/-all/all option the dep files are removed for all platform +rather than just the current platform. USAGE exit 1 @@ -53,12 +56,21 @@ USAGE # Parse arguments and options #------------------------------------------------------------------------------ +# Default to processing only the current platform +all= + while [ "$#" -gt 0 ] do case "$1" in + # Print help -h | -help) usage ;; + # Non-stop compilation, ignoring errors + -a | -all | all) + all="all" + shift + ;; -*) usage "unknown option: '$*'" ;; @@ -78,6 +90,12 @@ checkEnv findObjectDir . +# With the -a/-all option replace the current platform with a wildcard +if [ "$all" = "all" ] +then + objectsDir=$(echo $objectsDir | sed s%$WM_OPTIONS%*% ) +fi + if [ "$#" -eq 0 ] then echo "removing all .dep files ..."