Skip to content

Commit

Permalink
XXX 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 "am" for automake builds.
  • Loading branch information
ndim committed Feb 8, 2024
1 parent 23a9780 commit 271bbca
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 @@ -610,9 +610,9 @@ AC_CONFIG_FILES([

# Pass version number into avrdude.conf
AS_VAR_IF([GIT_COMMIT_HASH], [], [dnl
AVRDUDE_FULL_VERSION="$PACKAGE_VERSION"
AVRDUDE_FULL_VERSION="$PACKAGE_VERSION am"
], [dnl
AVRDUDE_FULL_VERSION="$PACKAGE_VERSION ($GIT_COMMIT_HASH)"
AVRDUDE_FULL_VERSION="$PACKAGE_VERSION ($GIT_COMMIT_HASH) am"
])
AC_DEFINE_UNQUOTED([AVRDUDE_FULL_VERSION], ["$AVRDUDE_FULL_VERSION"],
[The full avrdude version as displayed in -? and avrdude.conf])
Expand Down

0 comments on commit 271bbca

Please sign in to comment.