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..a206b9069 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,6 +432,9 @@ # ATmega8 0x76 # ATmega169 0x78 +# Avrdude build version +#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..9f4f0cb11 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -543,6 +543,10 @@ AC_CONFIG_FILES([ Makefile ]) +# 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 # avrdude.conf.tmp. Finally, a sed command will be applied to filter