Skip to content

Commit

Permalink
Add buildsystem marker to AVRDUDE_FULL_VERSION
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ndim committed Feb 18, 2024
1 parent 0324906 commit 94e1966
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit 94e1966

Please sign in to comment.