ENH: support wmakeLnInclude of C++ template files (.tcc, .tpp, .txx)
- can be used to avoid confusion with source files ENH: improve handling of '--' option termination (wmake scripts)
This commit is contained in:
parent
5714a3606e
commit
90c4ee7e12
@ -6,7 +6,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -54,6 +54,9 @@ optStrip=true
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
# Print help
|
||||
(-h | -help*)
|
||||
usage
|
||||
@ -64,10 +67,6 @@ do
|
||||
(-no-strip)
|
||||
unset optStrip
|
||||
;;
|
||||
(--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
(*)
|
||||
break
|
||||
;;
|
||||
|
@ -6,13 +6,13 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2018 OpenCFD Ltd.
|
||||
# Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeDepend
|
||||
# wmake/scripts/makeDepend
|
||||
#
|
||||
# Description
|
||||
# Wrapping for cpp -M with argument/options compatible with
|
||||
|
@ -6,7 +6,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# Copyright (C) 2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -51,6 +51,9 @@ unset optRemoveFile optRemoveTmp optNoLines
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
(-h | -help*) printHelp ;;
|
||||
|
||||
(-prefix=*) prefix="${1#*=}" ;;
|
||||
|
@ -12,19 +12,19 @@
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeTargetDir
|
||||
# wmake/scripts/makeTargetDir
|
||||
#
|
||||
# Description
|
||||
# Makes a directory hierarchy for the given target file
|
||||
# Makes a directory hierarchy for the given target file(s)
|
||||
#
|
||||
# Usage: makeTargetDir <file>
|
||||
# Usage: makeTargetDir file1 [..fileN]
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
for target
|
||||
do
|
||||
dir=${target%/*}
|
||||
[ -d "$dir" ] || [ "$dir" = "$target" ] || mkdir -p "$dir"
|
||||
dir="${target%/*}"
|
||||
[ "$dir" = "$target" ] || [ -d "$dir" ] || mkdir -p "$dir"
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -6,7 +6,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
# Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -101,6 +101,9 @@ unset optCheck optDryRun optUpdate optQuery optFilter
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-h | -help*)
|
||||
printHelp
|
||||
;;
|
||||
|
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
# Copyright (C) 2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -69,16 +69,15 @@ die()
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-h | -help*)
|
||||
printHelp
|
||||
;;
|
||||
-q | -quiet | -s | -silent)
|
||||
optQuiet=true
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*)
|
||||
die "Unknown option: '$1'" "See '${0##*/} -help' for usage"
|
||||
;;
|
||||
|
@ -6,7 +6,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
# Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -53,8 +53,8 @@ unset optVersion outputDir
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;;
|
||||
--) shift; break ;;
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-h | -help*)
|
||||
printHelp
|
||||
|
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -101,6 +101,9 @@ MakeDir=Make
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-help-f*) # Full help
|
||||
printHelp -full
|
||||
;;
|
||||
|
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
# Copyright (C) 2017 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -50,6 +50,9 @@ USAGE
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-h | -help*)
|
||||
usage
|
||||
;;
|
||||
|
@ -223,8 +223,8 @@ fi
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;;
|
||||
--) shift; break ;;
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-help-f*) # Full help
|
||||
printHelp -full
|
||||
@ -416,6 +416,7 @@ MakeDir=Make
|
||||
|
||||
unset dir
|
||||
|
||||
# With -pwd, go on discovery
|
||||
if [ -n "$opt_pwd" ]
|
||||
then
|
||||
if [ $# -ge 1 ]
|
||||
|
@ -63,6 +63,9 @@ unset cleanup
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-h | -help*)
|
||||
usage
|
||||
;;
|
||||
|
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2019-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -22,8 +22,13 @@
|
||||
# Link source files in the specified dir(s) into their respective
|
||||
# lnInclude directories
|
||||
#
|
||||
# C files: .c .h
|
||||
# C++ files: .C .cc .cpp .cxx .H .hh .hpp .hxx
|
||||
# Header files (C) : .h
|
||||
# Source files (C) : .c
|
||||
# Header files (C++) : .H .hh .hpp .hxx
|
||||
# Source files (C++) : .C .cc .cpp .cxx
|
||||
# Template files (C++) : .tcc .tpp .txx
|
||||
#
|
||||
# GNU make suffixes : .c .cc .C .cpp
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
Script="${0##*/}" # Need 'Script' for wmakeFunctions messages
|
||||
@ -76,6 +81,9 @@ unset optForce optUpdate optPwd
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-h | -help*)
|
||||
printHelp
|
||||
;;
|
||||
@ -103,7 +111,7 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
[ "$optPwd" = true ] || [ "$#" -ge 1 ] || \
|
||||
[ -n "$optPwd" ] || [ "$#" -ge 1 ] || \
|
||||
die "incorrect number of arguments"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -111,7 +119,7 @@ done
|
||||
baseDir="$1"
|
||||
|
||||
# With -pwd, go on discovery
|
||||
if [ "$optPwd" = true ]
|
||||
if [ -n "$optPwd" ]
|
||||
then
|
||||
if [ -n "$baseDir" ]
|
||||
then
|
||||
@ -221,9 +229,9 @@ do
|
||||
-name '*.[CHch]' \
|
||||
-o -name '*.cc' \
|
||||
-o -name '*.hh' \
|
||||
-o -name '*.[ch]xx' \
|
||||
-o -name '*.[ch]pp' \
|
||||
-o -name '*.type' \
|
||||
-o -name '*.[cht]xx' \
|
||||
-o -name '*.[cht]pp' \
|
||||
-o -name '*.tcc' \
|
||||
\) \
|
||||
-exec ln "$optLink" {} . \;
|
||||
)
|
||||
|
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -66,19 +66,22 @@ die()
|
||||
# Parallel operation requested
|
||||
nCores=0
|
||||
|
||||
unset optForce optUpdate
|
||||
unset opt_force opt_update
|
||||
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-h | -help*)
|
||||
printHelp
|
||||
;;
|
||||
-f | -force)
|
||||
optForce=true
|
||||
opt_force='-force'
|
||||
;;
|
||||
-u | -update)
|
||||
optUpdate=true
|
||||
opt_update='-update'
|
||||
;;
|
||||
-s | -silent | -quiet)
|
||||
export WM_QUIET=true
|
||||
@ -150,7 +153,7 @@ do
|
||||
|
||||
find "$checkDir" -depth -name Make -type d -print | while read MakeDir
|
||||
do
|
||||
topDir=${MakeDir%/Make} # trim /Make from the end
|
||||
topDir="${MakeDir%/Make}" # trim /Make from the end
|
||||
if [ -d "$topDir" ]
|
||||
then
|
||||
if grep -qe '^ *LIB *=' "$MakeDir/files" 2>/dev/null
|
||||
@ -166,9 +169,9 @@ do
|
||||
wait -n
|
||||
joblist=($(jobs -p))
|
||||
done
|
||||
wmakeLnInclude ${optForce:+-force} ${optUpdate:+-update} $topDir &
|
||||
wmakeLnInclude $opt_force $opt_update -- "$topDir" &
|
||||
else
|
||||
wmakeLnInclude ${optForce:+-force} ${optUpdate:+-update} $topDir
|
||||
wmakeLnInclude $opt_force $opt_update -- "$topDir"
|
||||
fi
|
||||
elif [ -d "$topDir/lnInclude" ]
|
||||
then
|
||||
|
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -92,6 +92,9 @@ unset platform
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-h | -help*)
|
||||
usage
|
||||
;;
|
||||
|
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2015 OpenFOAM Foundation
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -55,6 +55,9 @@ unset platform
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
('') ;;
|
||||
(- | --) shift; break ;; # Stop option parsing
|
||||
|
||||
-h | -help*)
|
||||
usage
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user