wmakeLnInclude: Don't link to files in sub-libraries
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_MODULES)/isothermalFilm/lnInclude \
|
-I$(FOAM_MODULES)/isothermalFilm/lnInclude \
|
||||||
|
-I$(FOAM_MODULES)/isothermalFilm/filmCompressibleMomentumTransportModels/lnInclude \
|
||||||
-IfilmThermophysicalTransportModels/lnInclude \
|
-IfilmThermophysicalTransportModels/lnInclude \
|
||||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
|||||||
@ -2,6 +2,8 @@ EXE_INC = \
|
|||||||
-I$(FOAM_MODULES)/twoPhaseSolver/lnInclude \
|
-I$(FOAM_MODULES)/twoPhaseSolver/lnInclude \
|
||||||
-I$(FOAM_MODULES)/VoFSolver/lnInclude \
|
-I$(FOAM_MODULES)/VoFSolver/lnInclude \
|
||||||
-I$(FOAM_MODULES)/fluidSolver/lnInclude \
|
-I$(FOAM_MODULES)/fluidSolver/lnInclude \
|
||||||
|
-ImixtureViscosityModels/lnInclude \
|
||||||
|
-IrelativeVelocityModels/lnInclude \
|
||||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/twoPhaseModels/VoF \
|
-I$(LIB_SRC)/twoPhaseModels/VoF \
|
||||||
-I$(LIB_SRC)/twoPhaseModels/interfaceCompression/lnInclude \
|
-I$(LIB_SRC)/twoPhaseModels/interfaceCompression/lnInclude \
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_MODULES)/solid/lnInclude \
|
-I$(FOAM_MODULES)/solid/lnInclude \
|
||||||
|
-IsolidDisplacementThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration | Website: https://openfoam.org
|
# \\ / O peration | Website: https://openfoam.org
|
||||||
# \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -116,27 +116,27 @@ do
|
|||||||
baseDir="."
|
baseDir="."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
incDir=$baseDir/lnInclude
|
incDir="$baseDir"/lnInclude
|
||||||
|
|
||||||
|
|
||||||
[ -d $baseDir ] || {
|
[ -d "$baseDir" ] || {
|
||||||
echo "$Script error: base directory $baseDir does not exist" 1>&2
|
echo "$Script error: base directory $baseDir does not exist" 1>&2
|
||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -d $incDir ]
|
if [ -d "$incDir" ]
|
||||||
then
|
then
|
||||||
[ "$update" = true ] || exit 0
|
[ "$update" = true ] || exit 0
|
||||||
else
|
else
|
||||||
mkdir $incDir
|
mkdir "$incDir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -d $incDir ] || {
|
[ -d "$incDir" ] || {
|
||||||
echo "$Script error: failed to create include directory $incDir" 1>&2
|
echo "$Script error: failed to create include directory $incDir" 1>&2
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
cd $incDir || exit 1
|
cd "$incDir" || exit 1
|
||||||
|
|
||||||
if [ "$silentOpt" = true ] || [ -n "$WM_QUIET" ]
|
if [ "$silentOpt" = true ] || [ -n "$WM_QUIET" ]
|
||||||
then
|
then
|
||||||
@ -153,18 +153,34 @@ find -L . -type l -print0 | xargs -0 rm -f
|
|||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Create links, avoid recreating links unless necessary
|
# Create links. Avoid recreating links unless necessary. Files in lnInclude,
|
||||||
# things placed in the 'noLink' directory are skipped
|
# Make, config and noLink are ignored, as is anything within a sub-library.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
filter()
|
||||||
|
{
|
||||||
|
kind="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
while [ "$#" -gt 1 ]
|
||||||
|
do
|
||||||
|
echo "-$kind" && echo "$1"
|
||||||
|
shift
|
||||||
|
echo "-o"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "-$kind" && echo "$1"
|
||||||
|
shift
|
||||||
|
}
|
||||||
|
|
||||||
|
mapfile -t pruneNames < <(filter name lnInclude Make config noLink)
|
||||||
|
mapfile -t prunePaths < <(find .. -mindepth 2 -type d -name Make -printf '%h\n')
|
||||||
|
mapfile -t prunePaths < <(filter path "${prunePaths[@]}")
|
||||||
|
mapfile -t matchNames < <(filter name '*.[CHh]' '*.[ch]xx' '*.[ch]pp' '*.type')
|
||||||
|
|
||||||
find .. \
|
find .. \
|
||||||
\( -name lnInclude -o -name Make -o -name config -o -name noLink \) \
|
\( "${pruneNames[@]}" -o "${prunePaths[@]}" \) -prune \
|
||||||
-prune \
|
-o \( "${matchNames[@]}" \) \
|
||||||
-o \( \
|
|
||||||
-name '*.[CHh]' \
|
|
||||||
-o -name '*.[ch]xx' \
|
|
||||||
-o -name '*.[ch]pp' \
|
|
||||||
-o -name '*.type' \
|
|
||||||
\) \
|
|
||||||
-exec ln $lnOpt {} . \;
|
-exec ln $lnOpt {} . \;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user