- provide edit for adjusting the ThirdParty and fallback site variables.
This is useful when packaging into a single directory, and possibly
without any ThirdParty dependencies.
- support '-prefix' (similar to auotconfig) as an alternative to
'-foamInstall'. Use this prefix to set the prefix directly.
Bypasses and disables the bash sourcing magic.
- generalize output text wrapping, use for usage notes
- add -help-man option for generating manpage content for any OpenFOAM
application or solver.
bin/tools/foamCreateManpage as helper
- The changes in foamCleanPath introduced for issues (#1007, #1008)
include quoted output of the cleaned environment variable.
When used in foamCreateModuleInclude, the quotes make their way
into the final environment. Avoid this by using the -sh-env
eval format instead.
- add environment extraction of MANPATH changes
- With argList::noFunctionObjects() we use the logic added in
4b93333292 (issue #352)
By removing the '-noFunctionObjects' option, we automatically
suppress the creation of function-objects via Time (with argList
as a parameter).
There is generally no need in these cases for an additional
runTime.functionObjects().off() statement
Use the argList::noFunctionObjects() for more direct configuration
and reduce unnecessary clutter in the -help information.
In previous versions, the -noFunctionObjects would have been redundant
anyhow, so we can also just ignore it now instead.
- since 1612, FOAM_INST_DIR and foamInstDir longer have any
special meanings when sourcing the bashrc or cshrc files.
Thus no need for special treatment in any of the dispatch wrappers.
Retained FOAM_INST_DIR as (unexported) variable in etc/bashrc,
just in case people are using patched versions of etc/bashrc
as part of their installation.
ENH: relax prefix restrictions on foamCreateVideo (issue #904)
- shift the implicit '.' to be part of the default prefix. This allows
things like "-image myimages_00" to work as might be expected.
- Don't remove the constant/polyMesh directory if it contains a
blockMeshDict or blockMeshDict.m4 file. Offer a reminder that
system/ is the normal place for it.
- add additional control via a Foam::infoDetailLevel flag, which is
supported by a 'DetailLevel' macro. Eg,
DetailLevel << "some information" << nl
- When infoDetailLevel is zero, the stdout for all Foam::system() calls
are also redirected to stderr to prevent child output from
appearing on the parent.
- close stdin before exec in system call.
- The additional output generated by #calc directives in the
controlDict or decomposeParDict causes issues for the RunFunctions
extraction of 'application' and 'numberOfSubdomains'.
Avoid by using -disableFunctionEntries, which also has the side-effect
of disabling '#include'.
- now report as "min = XX max = YY average = ZZ"
instead of as "min/max/average = XX, YY, ZZ"
this makes it easier to parse any particular value
(eg, with foamLog)
- generalize some of the library extensions (.so vs .dylib).
Provide as wmake 'sysFunctions'
- added note about unsupported/incomplete system support
- centralize detection of ThirdParty packages into wmake/ subdirectory
by providing a series of scripts in the spirit of GNU autoconfig.
For example,
have_boost, have_readline, have_scotch, ...
Each of the `have_<package>` scripts will generally provide the
following type of functions:
have_<package> # detection
no_<package> # reset
echo_<package> # echoing
and the following type of variables:
HAVE_<package> # unset or 'true'
<package>_ARCH_PATH # root for <package>
<package>_INC_DIR # include directory for <package>
<package>_LIB_DIR # library directory for <package>
This simplifies the calling scripts:
if have_metis
then
wmake metisDecomp
fi
As well as reducing clutter in the corresponding Make/options:
EXE_INC = \
-I$(METIS_INC_DIR) \
-I../decompositionMethods/lnInclude
LIB_LIBS = \
-L$(METIS_LIB_DIR) -lmetis
Any additional modifications (platform-specific or for an external build
system) can now be made centrally.
- export library path for gmp/mpfr from CGAL config files.
This is required when non-system gmp/mpfr libraries are being
used, but not using a ThirdParty compiler installation.
- automatically handle lib/ vs lib64/ (eg, for central installations)
for packages such as boost, CGAL, etc. While the ThirdParty
compilation of these will normally land in lib64/, this may not be
the case when they are supplied by another means.
- reworked the handling of foamEtcFile and foamCleanPath for less
clutter in the configuration files.
Added the bin/tools/lib-dir script to handle logic that is
too complex to easily manage in csh.
- unknown options or missing option values now emit a shorter message
without the entire usage. This makes it easier to identify the errors
and is better aligned with the behaviour of GNU system tools.
====
$ simpleFoam -case
Using: OpenFOAM-plus (see www.OpenFOAM.com)
Build: plus-01234
Error: option '-case' requires an argument
See 'simpleFoam -help' for usage
====
- provide for reduced (-help) and full (-help-full) usage information.
In many cases the reduced usage provided sufficient and easier
to find the information.
- make -srcDoc an alias for -doc-source
- no warnings about option aliases for future dates.
- this reduces the number of functions and allows lazy loading of
completion options, which makes it easy to quickly add any other
OpenFOAM application in completion.
The generic '_of_complete_' function handles (bash) completion for
any OpenFOAM application. On the first call for any particular
application, it retrieves the available options from the application
help output and adds this information to its environmental cache for
subsequent use.
- Tcsh completion uses the same function via a bash wrapper.
But since its wrapper is transient, the on-the-fly generation would
be less efficient. For this case, a pre-generated completion_cache
can be used, which is generated with
bin/tools/foamCreateCompletionCache
- handles the case where we are currently completing something that
does not appear to be an option. For example,
foamDictionary -expanded someD[TAB]
should complete the filename, not present more options.
- use complete -o filenames, dropped -o nospace to make it more responsive.
- restructure completion code to use a unified backend, which makes it easier
understand, maintain and re-use.
- foamCreateBashCompletions now simply outputs to a stdout, and allows
quick generation of completion of single applications.
- add -fileHandler completion in anticipation of future changes there.
- relocated as etc/config.s/bash_completion to prevent inadvertently
having two versions (.com, .org) installed at the same time.
- allows configuration without an environment variable.
For compatibility still respect FOAM_SIGFPE and FOAM_SETNAN
env-variables
- The env-variables are now treated as true/false switch values.
Previously there was just a check for env exists or not, but this
can be fairly fragile for a user's environment.
- disable automatically upgrading copyrights in files since changes to
not automatically imply a change in copyright. Eg, fixing a typo in
comments, or changing a variable from 'loopI' to 'loopi' etc.
- can be useful with compiling additional OpenFOAM programs
that use FOAM_USER_APPBIN, FOAM_USER_LIBBIN for their build,
to avoid conflicts with the normal user bin/lib files.
- or to force relocation of FOAM_SITE_APPBIN, FOAM_SITE_LIBBIN
during packaging of OpenFOAM
- handle sourcing bashrc with a relative path (issue #383)
- handle sourcing from bash and zsh.
Still need manual intervention when sourcing dash, sh, or ksh.
- replace grep in etc/cshrc with sed only
- logical instead of physical path for WM_PROJECT_DIR (issue #431).
Doesn't seem to be possible for csh/tcsh.
* Continue using physical locations when comparing directories,
but not for the top-level FOAM_INST_DIR, WM_PROJECT_DIR.
- relocate WM_CC, WM_CXX overrides from etc/config.*/compiler
to etc/config.*/settings to ensure that they are left untouched
when etc/config.sh/compiler is sourced while making third-party
packages (eg, gcc, llvm, CGAL).
- provide fallback FOAM_TUTORIALS setting in RunFunctions
STYLE: remove "~OpenFOAM" fallback as being too rare, non-obvious