2 #------------------------------------------------------------------------------
4 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
6 # \\ / A nd | Copyright held by original author
8 #------------------------------------------------------------------------------
10 # This file is part of OpenFOAM.
12 # OpenFOAM is free software; you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by the
14 # Free Software Foundation; either version 2 of the License, or (at your
15 # option) any later version.
17 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
18 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 # You should have received a copy of the GNU General Public License
23 # along with OpenFOAM; if not, write to the Free Software Foundation,
24 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 # Find directories with a 'Make/files' that contains a 'LIB =' directive
31 # and execute 'wmakeLnInclude -f' for each one
33 #------------------------------------------------------------------------------
35 while [ "$#" -ge 1 ]; do echo "$1"; shift; done
38 usage: ${0##*/} [dir1 .. dirN]
40 Find directories with a 'Make/files' that contains a 'LIB =' directive
41 and execute 'wmakeLnInclude -f' for each one
47 #------------------------------------------------------------------------------
50 # simple parse options
54 -h |
-help) # provide immediate help
58 usage
"unknown option: '$*'"
67 # default to searching from pwd
68 [ "$#" -gt 0 ] ||
set -- .
74 echo "searching: $checkDir for 'Make' directories"
77 echo "skipping non-dir: $checkDir"
78 echo "----------------"
82 find $checkDir -depth -type d
-name Make
-print |
while read makeDir
84 topDir
=${makeDir%/Make} # trim /Make from the end
87 if grep -e '^ *LIB *=' "$makeDir/files" >/dev
/null
2>&1
89 wmakeLnInclude
-f $topDir
90 elif [ -d "$topDir/lnInclude" ]
92 echo "removing spurious $topDir/lnInclude"
93 rm -rf "$topDir/lnInclude"
99 #------------------------------------------------------------------------------