From 8544ce1421b75686f3cfaaf2fb655934905fa393 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Wed, 14 Feb 2024 00:35:11 +0100 Subject: [PATCH] Add buildsystem marker to AVRDUDE_FULL_VERSION Add markers in the AVRDUDE_FULL_VERSION message to note the buildsystem used. Adds "cm" for cmake builds, and "at" for autotools builds. We could also easily keep the cmake builds without such a marker, and only mark the autotools builds. --- CMakeLists.txt | 4 ++-- src/configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 071f50b27..3bc4d9001 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,7 @@ include(FindPackageMessage) include(GNUInstallDirs) set(CONFIG_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}") -set(AVRDUDE_FULL_VERSION ${CMAKE_PROJECT_VERSION}) +set(AVRDUDE_FULL_VERSION "${CMAKE_PROJECT_VERSION} cm") # ===================================== # Get Git commit info @@ -91,7 +91,7 @@ if(Git_FOUND) # If the commit is not tagged, include the date and commit hash in the full version string. if(NOT GIT_COMMIT_HASH STREQUAL GIT_TAG_HASH) - set(AVRDUDE_FULL_VERSION "${CMAKE_PROJECT_VERSION}-${GIT_COMMIT_DATE} (${GIT_COMMIT_HASH})") + set(AVRDUDE_FULL_VERSION "${CMAKE_PROJECT_VERSION}-${GIT_COMMIT_DATE} (${GIT_COMMIT_HASH}) cm") endif() endif() diff --git a/src/configure.ac b/src/configure.ac index 7100c6a5f..cc7214f04 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -79,9 +79,9 @@ dnl about it and pass it on to avrdude.conf and the "avrdude -?" dnl version message AC_MSG_CHECKING([versioninfo derived AVRDUDE_FULL_VERSION]) if test "x$GIT_COMMIT_HASH" = "x$GIT_TAG_HASH"; then - AVRDUDE_FULL_VERSION="$PACKAGE_VERSION" + AVRDUDE_FULL_VERSION="$PACKAGE_VERSION at" else - AVRDUDE_FULL_VERSION="$PACKAGE_VERSION ($GIT_COMMIT_HASH)" + AVRDUDE_FULL_VERSION="$PACKAGE_VERSION ($GIT_COMMIT_HASH) at" fi AC_MSG_RESULT([$AVRDUDE_FULL_VERSION]) AC_DEFINE_UNQUOTED([AVRDUDE_FULL_VERSION], ["$AVRDUDE_FULL_VERSION"],