Skip to content
Snippets Groups Projects

Improvements, adjustments for build scripts and infrastructure

Merged Mark OLESEN requested to merge build into develop

cleanup of wmake, wclean for various improvements. Eg, more reliable clean behaviour, separate build/ directory for intermediate objects. FYI: @andy

Merge request reports

Approval is optional

Merged by (Apr 17, 2025 12:25pm UTC)

Merge details

  • Changes merged into develop with c7bc2246.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Mark OLESEN added ~30 ~31 ~22 labels

    added ~30 ~31 ~22 labels

  • Mark OLESEN changed target branch from master to develop

    changed target branch from master to develop

  • Mark OLESEN changed milestone to %Version v1706

    changed milestone to %Version v1706

  • assigned to @Sergio

  • It seems to be a problem when compiling the following list:

    wmake utilities wmake mesh wmake preProcessing wmake postProcessing wmake thermophysical wmake doc wmake miscellaneous wmake parallelProcessing wmake surface wmake adiabaticFlameT wmake graphics wmake lagrangian wmake advanced wmake foamDictionary wmake dataConversion wmake decomposePar wmake miscellaneous wmake applyBoundaryLayer wmake surfaceAdd wmake particleTracks wmake ensightFoamReader wmake collapseEdges wmake foamDataToFluent wmake engineCompRatio /home/sergio/OpenFOAM/OpenFOAM-plus.build/wmake/makefiles/apps:39: recipe for target 'collapseEdges' failed /home/sergio/OpenFOAM/OpenFOAM-plus.build/wmake/makefiles/apps:39: recipe for target 'ensightFoamReader' failed /home/sergio/OpenFOAM/OpenFOAM-plus.build/wmake/makefiles/apps:39: recipe for target 'advanced' failed /home/sergio/OpenFOAM/OpenFOAM-plus.build/wmake/makefiles/apps:39: recipe for target 'graphics' failed /home/sergio/OpenFOAM/OpenFOAM-plus.build/wmake/makefiles/apps:39: recipe for target 'mesh' failed

    I think we need to review the utilities/ folder. The rest built fine.log

  • Mark OLESEN added 6 commits

    added 6 commits

    • 557ef6e3 - BUG: missing chdir in Allwclean for wallFunctionTable
    • a22a20f0 - STYLE: minor cleanup of foamEtcFile
    • 407c0027 - STYLE: eliminate most use of _foamSource outside of the etc/ hierarchy
    • 1c7030cb - ENH: add options for foamEtcFile and shell evaluation
    • 3e071386 - ENH: use new foamEtcFile options to simplify syntax when sourcing files
    • a71c1c1e - STYLE: resolve COMP_FLAGS, COMPILE_FLAGS mismash in favour of COMP_FLAGS

    Compare with previous version

    Toggle commit list
  • Author Maintainer

    builds ok for me. I've added a few more adjustments. See if this works now.

  • Now, the building seems to work fine. I'll test the cleaning.

  • This is not new but I though it could be useful: when I source etc, I've got this:

    source etc/bashrc bash: cd: etc/bashrc: Not a directory This seems to be the first line on the bash. This happened to me in the past. I actually commented out cd ${BASH_SOURCE%///*} && \pwd -P) to avoid this warning

    [ $BASH_SOURCE ] && FOAM_INST_DIR=$(\cd ${BASH_SOURCE%///*} && \pwd -P) ||
    FOAM_INST_DIR=

    HOME/HOME/
    WM_PROJECT

  • After compilation I've got: platforms/linux64GccDPInt32Opt/lib: 117 platforms/linux64GccDPInt32Opt/bin: 230 Just to check this is the complete installation. Some libs might be lacking depending on the ThirdParty

  • @Sergio see issue #383 (closed) :( (edit: for the comment before last)

    By Bruno Santos on 2017-02-23T21:39:20 (imported from GitLab project)

    Edited by Admin
  • Thanks for the comments, Bruno.

  • I am testing some of the options for wclean, check that this behavior is what you intended

    1. wclean libso src/combustionModels/ This deletes build/linux64Gcc..../src/combustionModels/ (.o and ,dep) and /src/combustionModels/lnInclude It does not delete libcombustionModels.so in platform/

    2. wclean all src/combustionModels Has the same behavior as before.

    3. wclean all at the top dir. Clears all .dep. and .o in the build/ but does not clean the bin or lib in the platforms/ i.e wclean foamyQuadMesh does not seem to clean the application binaries. I think we should have a complete clean option, including libs and bins.

  • Author Maintainer

    There are several items that qualify for cleaning, similar to the usual "clean", "distclean", "realclean" that many makefiles have:

    • clean intermediate build targets (.o, .dep, lnInclude) to force a clean rebuild. This is what wclean does.
    • clean libraries and applications. This is what wcleanPlatform does, but only for all apps, libs.

    If we wanted a wclean operation that also cleans the final target (exe or lib), it could use the the (EXE|LIB)= entry in Make/files for its information. This is something to consider, but I'm not convinced of its usefulness.

    With everything being built out-of-source and with the build/ directory, it should be easier to compile for modules installation.

    The normal case for producing an installation (eg, for modules):

    • Allwmake
    • copy everything except the build/ directory (eg, rsync -a --exclude build ...)

    For a special stripped down installation (run-time only, no dynamic code):

    • Allwmake
    • copy only bin/, etc/, platforms/ directories

    Now added wcleanBuild (similar to wcleanPlatform) as well.

    Edited by Mark OLESEN
  • Mark OLESEN added 1 commit

    added 1 commit

    • b6d20603 - ENH: provide wcleanBuild and improve wcleanPlatform

    Compare with previous version

  • Sergio Ferraris mentioned in commit c7bc22467d6679efc32e3181d1e18b85252fdbe8

    mentioned in commit c7bc22467d6679efc32e3181d1e18b85252fdbe8

Please register or sign in to reply