diff --git a/src/git-version.h.in b/src/git-version.h.in deleted file mode 100644 index a0d2080..0000000 --- a/src/git-version.h.in +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#define GIT_VERSION "@GIT_VERSION@" diff --git a/src/main.c b/src/main.c index a07ba67..1aba51b 100644 --- a/src/main.c +++ b/src/main.c @@ -22,7 +22,7 @@ #include #include #include -#include "git-version.h" +#include "version.h" #include "config.h" #include "options.h" #include "configfile.h" @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) error_enter_session_mode(); /* Print launch hints */ - tio_printf("tio %s", GIT_VERSION); + tio_printf("tio %s", VERSION); if (interactive_mode) { tio_printf("Press ctrl-%c q to quit", option.prefix_key); diff --git a/src/meson.build b/src/meson.build index 17cc691..958d4e9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,8 +1,8 @@ -# Generate git version header -git_version_h = vcs_tag(command : ['git', 'describe', '--tags', '--always', '--dirty'], - input : 'git-version.h.in', - output :'git-version.h', - replace_string:'@GIT_VERSION@') +# Generate version header +version_h = vcs_tag(command : ['git', 'describe', '--tags', '--always', '--dirty'], + input : 'version.h.in', + output :'version.h', + replace_string:'@VERSION@') config_h = configuration_data() config_h.set('BAUDRATE_CASES', baudrate_cases) @@ -27,7 +27,7 @@ tio_sources = [ 'script.c', 'fs.c', 'readline.c', - git_version_h + version_h ] diff --git a/src/options.c b/src/options.c index 04d5be6..e685690 100644 --- a/src/options.c +++ b/src/options.c @@ -25,7 +25,7 @@ #include #include #include -#include "git-version.h" +#include "version.h" #include "config.h" #include "misc.h" #include "print.h" @@ -1088,7 +1088,7 @@ void options_parse(int argc, char *argv[]) break; case 'v': - printf("tio %s\n", GIT_VERSION); + printf("tio %s\n", VERSION); exit(EXIT_SUCCESS); break; diff --git a/src/tty.c b/src/tty.c index 0021396..ef2f154 100644 --- a/src/tty.c +++ b/src/tty.c @@ -22,7 +22,7 @@ #if defined(__linux__) #include #endif -#include "git-version.h" +#include "version.h" #include "config.h" #include #include @@ -1091,7 +1091,7 @@ void handle_command_sequence(char input_char, char *output_char, bool *forward) break; case KEY_V: - tio_printf("tio %s", GIT_VERSION); + tio_printf("tio %s", VERSION); break; case KEY_X: diff --git a/src/version.h.in b/src/version.h.in new file mode 100644 index 0000000..459952d --- /dev/null +++ b/src/version.h.in @@ -0,0 +1,3 @@ +#pragma once + +#define VERSION "@VERSION@"