Skip to content

Commit

Permalink
Merge pull request avrdudes#1542 from Youw/main
Browse files Browse the repository at this point in the history
Add Avrdude build version into avrdude.conf
  • Loading branch information
mcuee authored Oct 29, 2023
2 parents e999912 + 7cf7c73 commit 9dfb616
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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=$<BOOL:${HAVE_PARPORT}>
-D HAVE_LINUXSPI=$<BOOL:${HAVE_LINUXSPI}>
-D HAVE_LINUXGPIO=$<BOOL:${HAVE_LINUXGPIO}>
Expand Down
3 changes: 3 additions & 0 deletions src/avrdude.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@
# ATmega8 0x76
# ATmega169 0x78

# Buildtime configuration
avrdude_version = "@AVRDUDE_FULL_VERSION@";

#
# Overall avrdude defaults; suitable for ~/.config/avrdude/avrdude.rc
#
Expand Down
3 changes: 3 additions & 0 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9dfb616

Please sign in to comment.