mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add 'subcommand' handling to wmake (#1693)
- initial split of wmake-related commands into "plumbing" and "porcelain" akin to how git handles things. - wmakeBuildInfo (very low-level), now relocated to the wmake/scripts and accessible for the user as "wmake -build-info". This satisfies a long-standing desire to access build information in a fashion similar to the api/patch information. CONFIG: avoid git information when building with a debian/ directory - when a 'debian/' directory exists, there is a high probability that the '.git/' directory is from debian and not from OpenFOAM (ie, useless here). This corresponds to an implicit '-no-git', which has no effect when building from pristine sources. ENH: wmakeCheckPwd becomes scripts/wmake-check-dir - accessible for the user as "wmake -check-dir" and with 1 or 2 directory names. A wmakeCheckPwd symlink left for compatibility.
This commit is contained in:
@ -43,9 +43,11 @@
|
||||
# Note
|
||||
# This script must exist in the project 'bin' directory
|
||||
#
|
||||
# The '-show-api' and '-show-patch' options implement partial logic
|
||||
# from wmake/wmakeBuildInfo.
|
||||
# Make sure that any changes there are also reflected here.
|
||||
# The '-show-api' and '-show-patch' options extract values from
|
||||
# the "META-INFO/api-info" file
|
||||
#
|
||||
# SeeAlso
|
||||
# META-INFO/README.md for other routines that also use META-INFO.
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
printHelp() {
|
||||
|
||||
@ -264,7 +264,7 @@ patch="$(git --git-dir="$gitbase/.git" show "$sha1" | sed -ne s/patch=//p)"
|
||||
|
||||
[ -n "$api" ] || die "Could resolve api value"
|
||||
|
||||
# Determine the BUILD information from git, as per wmakeBuildInfo.
|
||||
# Determine the BUILD information from git, as per `wmake -build-info`
|
||||
build="$(git --git-dir="$gitbase/.git" log -1 --date=short --format='%h=%ad' 2>/dev/null|sed 's/-//g;s/=/-/')"
|
||||
|
||||
echo "Detected api, patch, build as '$api', '$patch', '$build'" 1>&2
|
||||
|
||||
Reference in New Issue
Block a user