Menu

#1598 PATCH: new auto_revision tool for unix-like shells

Undefined
open
nobody
None
Patch
2026-05-03
2026-05-03
No

C::B uses a built-in program called auto_revision for getting some information about current sources.
This program is located under codeblocks-code\src\build_tools\autorevision and it is a .cpp source.
I noticed this can work when your build/host/target are all the same, in other words, a native build.
If you are using a cross compiler, it won't work because the target architecture is not the same of the build one.

So, I would like to suggest a different solution for bypassing this problem.
I made a script to be used when building with unix shell and autotools.
This script emulates all the functions of the corresponding existing program and it is able to extract the information from SVN or GIT trees.

I have built successfully my native port for CYGWIN and I compiled C::B for MinGW-w64 cross compilers for x86_64, i686 and Aarch64.

The patch is made by two parts:

  • the auto_revision.sh script, that must be copied inside codeblocks-code\src\build_tools\autorevision directory.
  • a patch to codeblocks-code\src\build_tools\autorevision\Makefile.am for supporting the new tool.

The new solution can coexist with the current implementation of the auto_revision tool and autorevision.cpp can be kept, if an user will want to build C::B with a different way besides autotools and an unix shell.

The new auto_revision.sh script is available here as plain text, for an immediate testing.

I hope that you will find it useful.
Sincerely.

Discussion

  • Carlo Bramini

    Carlo Bramini - 2026-05-03

    The auto_revision script:

     
  • Carlo Bramini

    Carlo Bramini - 2026-05-03

    The patch to codeblocks-code\src\build_tools\autorevision\Makefile.am:

     

Log in to post a comment.