Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Avrdude version number to avrdude.conf using autoconf #1545

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 4 additions & 1 deletion src/avrdude.conf.in
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
#
Expand Down
4 changes: 4 additions & 0 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down