CONFIG: adjust make scripts for darwin

- handling of dead links (find -L -delete unsupported)

- remove ignore case flag on 's/../../i' used in have_scotch script.
  It is unneeded and not tolerated by Darwin's sed.

- avoid embedded comments in EXE_INC (Make/options files), which do
  not work well with the OSX LLVM cpp.
  It strips out the comments but also removes the continuation char.

STYLE: adjust notes about paraview library locations
This commit is contained in:
Mark Olesen
2018-04-24 21:20:06 +02:00
parent 0dfda5f796
commit 76cb38fbc7
12 changed files with 63 additions and 46 deletions

View File

@ -118,7 +118,7 @@ have_scotch()
# Ensure consistent sizes between OpenFOAM and scotch header
# extract 'typedef int64_t SCOTCH_Num' or equivalent
label=$(sed -ne \
's/^.*typedef *\([^ ]*\) *SCOTCH_Num.*/\1/ip' \
's/^.*typedef *\([^ ]*\) *SCOTCH_Num.*/\1/p' \
"$header")
: ${label:=unknown} # Failsafe value

View File

@ -67,10 +67,7 @@ USAGE
# Parse arguments and options
#------------------------------------------------------------------------------
# Default 'find' option
unset findOpt
# Default 'ln' option
# Option for 'ln'
lnOpt="-s"
unset update silentOpt
@ -149,23 +146,31 @@ fi
#------------------------------------------------------------------------------
# Remove any broken links first (this helps when file locations have moved)
#------------------------------------------------------------------------------
find -L . -type l -delete
case "$WM_ARCH" in
darwin*)
find -L . -type l -exec rm -- {} \+
;;
*)
find -L . -type l -delete
;;
esac
#------------------------------------------------------------------------------
# Create links, avoid recreating links unless necessary
# things placed in the 'noLink' directory are skipped
#------------------------------------------------------------------------------
find .. $findOpt \
\( -name lnInclude -o -name Make -o -name config -o -name noLink \) \
-prune \
-o \( \
-name '*.[CHh]' \
-o -name '*.[ch]xx' \
-o -name '*.[ch]pp' \
-o -name '*.type' \
\) \
-exec ln $lnOpt {} . \;
find .. \
\( -name lnInclude -o -name Make -o -name config -o -name noLink \) \
-prune \
-o \( \
-name '*.[CHh]' \
-o -name '*.[ch]xx' \
-o -name '*.[ch]pp' \
-o -name '*.type' \
\) \
-exec ln $lnOpt {} . \;
exit 0 # clean exit