Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let the configure (rather than build) system handle the compiler's version #10658

Merged
merged 14 commits into from
Oct 12, 2021

Commits on Oct 8, 2021

  1. Define OCaml's version in build-aux/ocaml_version.m4

    Before this commit, the version of OCaml was defined on the first line
    of the VERSION file present at the top-level of the source tree.
    
    This commit defines the version of OCaml in build-aux/ocaml_version.m4
    as a series of macros defining each component of the version and
    then putting all these components together in the right way to
    obtain the main version string and the other variants used here and there.
    
    With this commit, the VERSION file becomes a by-product of running autoocnf,
    which is usually done by running tools/autogen.
    
    However, this commit takes special care of generating the very same
    VERSION file than the one used before the commit. The modifications
    in the comments will be introduced in subsequent commits, for the
    sake of clarity and to make it possible and eaiser to verify that
    nothing has been broken or altered.
    
    With this commit all the components of the version number become available
    to the configure script which will thus be available to propagate them
    to the whole build system.
    shindere committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    ce97e67 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b9ec967 View commit details
    Browse the repository at this point in the history
  3. Transform runtime/caml/version.h into a configured header

    This means that, before this commit, runtime/caml/version.h was
    generated during the build process by a recipe found in runtime/Makefile.
    
    After this commit, runtime/caml/version.h is generated by the configure
    script from runtime/caml/version.h.in
    
    This commit makes an effort to guarantee that the version.h file
    generated by configure is as similar as possible to the one produced
    by the make recipe before, that's why runtime/caml/version.h.in
    contains no copyright notice at this stage.
    It will be added in the following commit.
    
    At this stage, the only difference between the two versions of version.h
    (the one generated by make before and the one generated by configure now)
    is the coment line produced by configure as the first line of version.h, namely:
    
    /* runtime/caml/version.h.  Generated from version.h.in by configure.  */
    
    but this cannot be avoided and is harmless.
    shindere committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    c71428e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    74ad8eb View commit details
    Browse the repository at this point in the history
  5. Introduce the OCAML_VERSION_EXTRA C preprocessor macro

    This is a shorter alias for OCAML_VERSION_ADDITIONAL
    shindere committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    20924c9 View commit details
    Browse the repository at this point in the history
  6. ocamlyacc: rely on runtime/caml/version.h

    Before this commit a dedicated version.h file was generated.
    shindere committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    86b9930 View commit details
    Browse the repository at this point in the history
  7. Remove the reference to the VERSION file from tools/pre-commit-githook

    More precisely, before this commit the AUTOCONF_FILES variable was listing
    the VERSION file, which is no longer necessary. Nothing needs to be added because
    the build-aux/* also matches build-aux/ocaml_version.m4 where the
    version of OCaml is now defined.
    
    This commit also increases the HOOK_VERSION variable from 5 to 6.
    shindere committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    89b1c6e View commit details
    Browse the repository at this point in the history
  8. Update comment in utils/config.mlp

    Make it po point to the right place where the version of OCaml is
    actually defined.
    shindere committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    c6a3496 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2021

  1. Let configure rather than make generate manual/src/version.tex

    This also required a modification of the root makefile so that its
    clean and distclean targets also call the corresponding ones in
    the manual.
    shindere committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    47e7dc8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    38449ab View commit details
    Browse the repository at this point in the history
  3. Move version check from tools/check-parser-uptodate-or-warn.sh to Mak…

    …efile
    
    This commit introduces the different components of an OCaml version
    as build variables.
    
    It thus becomes possible to test from within the build system whether
    the currently built version of OCaml is a development version or not.
    
    This ability is used to move the development version test from the
    beginning of tools/check-parser-uptodate-or-warn.sh to the root Makefile,
    which will make that test portable even to non-Posix systems and
    no matter how the locales are configured.
    shindere committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    05f1d2e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1acc501 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0239407 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    41cac4b View commit details
    Browse the repository at this point in the history