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:
Mark Olesen
2020-05-11 10:55:23 +02:00
parent 8bd9f41efd
commit 9e3d06853e
17 changed files with 282 additions and 207 deletions

View File

@ -1,59 +1,60 @@
# META-INFO
Meta-information is for OpenFOAM internal use only.
Do not rely on any files or any file contents in this directory,
or even the existence of this directory.
Meta-information is generally for OpenFOAM internal use only.
The format, content and meaning may be changed at anytime without
notice.
notice. If any of these are changed, these are some of places that
will need to be updated accordingly:
The information is provided here for internal documentation purposes.
- bin/foamEtcFile
- bin/tools/foamConfigurePaths
- bin/tools/foamPackRelease
- etc/openfoam
- wmake/scripts/wmake-build-info
## api-info
This file and its contents are to be tracked by git.
- File content (api) generated by wmakeBuildInfo from OPENFOAM define
in `wmake/rules/General/general`
- File content (api) generated by `wmake -build-info` from the
`OPENFOAM` define in `wmake/rules/General/general`
- File content (patch) is manually generated content.
## build-info
This file is *never* to be tracked by git, but may be present in shipped
source archives.
This file is ***never*** to be tracked by git, but may be present in
shipped source archives.
- File content (branch, build) generated by wmakeBuildInfo from git
information and cached from previous wmake (api)
- File content (branch, build) generated by `wmake -build-info` from
git information and cached from previous wmake (api)
## Content types
### api
Format: `date +%y%m`
- 4-digit year-month (YYMM) integer corresponding to the major
release or in unusual cases an intermediate release.
- Format is year-month, as per `date +%y%m`.
Eg, `1712` for the Dec-2017 release.
Example, `1712` for the Dec-2017 release.
### patch
Format: `date +%y%m%d`
- 6-digit year-month-day (YYMMDD) integer corresponding to a patch-level
for the given **released** API.
- Format is year-month-day, as per `date +%y%m%d`.
- The first release can have a patch value of `0` (unpatched = just
released) or a patch value corresponding to the release date.
- The first release can have a patch value of `0` or `1` which
indicates that it is unpatched or just released. Alternatively
it can have a patch value corresponding to the release date.
The patch value is only meaningful together with the api value.
However, for *development* branches, the patch level should not be
ascribed much meaning -- it can be `0` or have a value corresponding
to the last merge with a *maintenance* (*eg*, `master`) branch.
ascribed too much meaning, but will often correspond to the last
merge with a *maintenance* (*eg*, `master`) branch.
## Flow of information
@ -70,9 +71,9 @@ distributions to have a record of the same information.
| build | git | build-info |
The command `wmakeBuildInfo -check` is used to determine if
The command `wmake -build-info -check` is used to determine if
the saved information needs synchronization. The command
`wmakeBuildInfo -update` preforms the synchronitzation.
`wmake -build-info -update` performs the synchronization.
## Notes
@ -82,4 +83,4 @@ contains more permanent information, whereas the `build-info` is more
transient in nature.
----
2019-01-23
2020-05-05