From 18587338d16e662ef1a03f2c66a6f8df71c50fee Mon Sep 17 00:00:00 2001 From: Ihor Dutchak Date: Sat, 28 Oct 2023 23:46:35 +0300 Subject: [PATCH 1/4] Add Avrdude build version into avrdude.conf --- src/CMakeLists.txt | 1 + src/avrdude.conf.in | 3 +++ src/configure.ac | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ce6131bee..02bad6894 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -120,6 +120,7 @@ add_custom_command( OUTPUT avrdude.conf COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/avrdude.conf.in" avrdude.conf.in COMMAND ${CMAKE_COMMAND} + -D "AVRDUDE_FULL_VERSION=${AVRDUDE_FULL_VERSION}" -D HAVE_PARPORT=$ -D HAVE_LINUXSPI=$ -D HAVE_LINUXGPIO=$ diff --git a/src/avrdude.conf.in b/src/avrdude.conf.in index 5d35fba17..62609329f 100644 --- a/src/avrdude.conf.in +++ b/src/avrdude.conf.in @@ -432,6 +432,9 @@ # ATmega8 0x76 # ATmega169 0x78 +# Buildtime configuration +avrdude_version = "@AVRDUDE_FULL_VERSION@"; + # # Overall avrdude defaults; suitable for ~/.config/avrdude/avrdude.rc # diff --git a/src/configure.ac b/src/configure.ac index be34c6a03..a67dac281 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -543,6 +543,9 @@ AC_CONFIG_FILES([ Makefile ]) +# Pass into avrdude.conf.in +AVRDUDE_FULL_VERSION='$(VERSION)' + # The procedure to create avrdude.conf involves two steps. First, # normal autoconf substitution will be applied, resulting in # avrdude.conf.tmp. Finally, a sed command will be applied to filter From fc14412d6ac5334b8adcc87daa49b9b6cee42e80 Mon Sep 17 00:00:00 2001 From: MCUdude Date: Sun, 29 Oct 2023 20:45:26 +0100 Subject: [PATCH 2/4] Add Avrdude build version to configure.ac --- src/configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/configure.ac b/src/configure.ac index a67dac281..9f4f0cb11 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -543,8 +543,9 @@ AC_CONFIG_FILES([ Makefile ]) -# Pass into avrdude.conf.in -AVRDUDE_FULL_VERSION='$(VERSION)' +# Pass version number into avrdude.conf +AVRDUDE_FULL_VERSION=$PACKAGE_VERSION +AC_SUBST(AVRDUDE_FULL_VERSION, $AVRDUDE_FULL_VERSION) # The procedure to create avrdude.conf involves two steps. First, # normal autoconf substitution will be applied, resulting in From 0f2ac4ed2a10e0a359f20c40ac3effb2b78704b5 Mon Sep 17 00:00:00 2001 From: MCUdude Date: Sun, 29 Oct 2023 20:45:51 +0100 Subject: [PATCH 3/4] Add Avrdude build version to top of file --- src/avrdude.conf.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/avrdude.conf.in b/src/avrdude.conf.in index 62609329f..c3d4c7a5b 100644 --- a/src/avrdude.conf.in +++ b/src/avrdude.conf.in @@ -1,6 +1,6 @@ # $Id$ -*- text -*- # -# AVRDUDE Configuration File +# AVRDUDE @AVRDUDE_FULL_VERSION@ Configuration File # # This file contains configuration data used by AVRDUDE which describes # the programming hardware pinouts and also provides part definitions. @@ -432,7 +432,7 @@ # ATmega8 0x76 # ATmega169 0x78 -# Buildtime configuration +# Avrdude build version avrdude_version = "@AVRDUDE_FULL_VERSION@"; # From eca4f074a7dcc919f54308876b282219b04d1624 Mon Sep 17 00:00:00 2001 From: MCUdude Date: Sun, 29 Oct 2023 20:51:11 +0100 Subject: [PATCH 4/4] Comment out avrdude_version --- src/avrdude.conf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/avrdude.conf.in b/src/avrdude.conf.in index c3d4c7a5b..a206b9069 100644 --- a/src/avrdude.conf.in +++ b/src/avrdude.conf.in @@ -433,7 +433,7 @@ # ATmega169 0x78 # Avrdude build version -avrdude_version = "@AVRDUDE_FULL_VERSION@"; +#avrdude_version = "@AVRDUDE_FULL_VERSION@"; # # Overall avrdude defaults; suitable for ~/.config/avrdude/avrdude.rc