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:
Mark Olesen
2022-11-16 10:47:11 +01:00
parent 5714a3606e
commit 90c4ee7e12
15 changed files with 74 additions and 43 deletions

View File

@ -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
;;

View File

@ -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

View File

@ -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#*=}" ;;

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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
;;

View File

@ -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"
;;

View File

@ -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