From 73b532b50d2e674bf64370ccc4ee5be7f1f77ada Mon Sep 17 00:00:00 2001 From: Matthias Schmitz Date: Sun, 4 Feb 2024 00:08:10 +0100 Subject: [PATCH] Start development for 0.4.5, let meson generate the config.h With a generated config.h we have the meson.build file as single point of truth for the version number. Signed-off-by: Matthias Schmitz --- config.h | 2 -- config.h.in | 3 +++ meson.build | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 config.h create mode 100644 config.h.in diff --git a/config.h b/config.h deleted file mode 100644 index 973ab82..0000000 --- a/config.h +++ /dev/null @@ -1,2 +0,0 @@ -#define PACKAGE_VERSION "0.4.4" -#define VERSION "0.4.4" diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..4da0f9f --- /dev/null +++ b/config.h.in @@ -0,0 +1,3 @@ +#define PACKAGE_VERSION "@version@" +#define VERSION "@version@" +#define INSTALL_PREFIX "@install_prefix@" diff --git a/meson.build b/meson.build index 936dae4..459627b 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,12 @@ project('slurm', 'c') +conf_data = configuration_data() +conf_data.set('version', '0.4.5-dev') +conf_data.set('install_prefix', get_option('prefix')) + +configure_file(input : 'config.h.in', + output : 'config.h', + configuration : conf_data) # We want ncurses but meson wraps ncurses and curses into the curses dependency # https://mesonbuild.com/Dependencies.html#curses