Commit Graph

3465 Commits

Author SHA1 Message Date
Hans Ulrich Niedermann
dd9e4d2cf2 m4 quote macro args and set variable defaults
This m4 quotes many more macro arguments and deals with the
setting of variables.

  * Set variable default values to avoid accidental use of
    env var values from the caller of the configure script
  * rewrap some longer lines
  * Remove AC_SUBST([FOO], [$FOO]) type no-ops. AC_SUBST([FOO])
    does the same.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
cc94578803 Call it AVRDUDE_FULL_VERSION everywhere
Calling AVRDUDE_FULL_VERSION just VERSION in parts of the build
process, and AVRDUDE_FULL_VERSION in others, is unnecessarily confusing.

So call it AVRDUDE_FULL_VERSION everywhere.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
29695afebb gitignore: dist tarballs and distdir/ itself 2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
dc88ff42ad Add AM_PROG_AR before LT_INIT, removing AC_PROG_AR etc
Use AM_PROG_AR before LT_INIT to prevent occasional warnings.

AM_PROG_AR was introduced in the 1.11 to 1.12 timeframe,
and we require at least Automake 1.14.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
3ef9f7194a Move AM_SILENT_RULES directly after AM_INIT_AUTOMAKE 2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
6f11b88bcd Stop checking for AM_SILENT_RULES macro
There is no need to check for AM_SILENT_RULES.

AM_SILENT_RULES was introduced in automake 1.11, and we
require at least automake-1.14 now.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
8d73b0521d Remove unused TIME_WITH_SYS_TIME macro definition
The TIME_WITH_SYS_TIME C preprocessor macro is not found
anywhere in the source tree, so we do not need to define
it after all and can get rid of the obsoletion warning.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
f8bb5619b8 Use committer date for commit date and year
Quoting CMakeLists.txt: "[...] of latest commit"

"Latest commit" is better served by using the committer date %cd
instead of the author date %ad: The author date could be some time
last year with committer date being today.

Note this affects both autotools and cmake buildsystems to keep
the generated version message dates and year in sync.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
bccad9dfe6 Fix libreadline summary output
AC_CHECK_LIB([readline], [readline]) without an ACTION-IF-FOUND
results in the definition of the HAVE_LIBREADLINE C preprocessor
macro and the addition of -lreadline to LIBS, not a configure
script environment variable have_readline.

So this repeats what the default ACTION-IF-FOUND does (add
-lreadline to LIBS, AC_DEFINE the HAVE_LIBREADLINE macro),
and in addition defines the have_libreadline variable as
yes for later use inside configure.ac.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
d0a36e03b7 Fix accidentally inconsequential typo in variable name 2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
c076aa7f3b Consistently use x and quotes in test(1) calls 2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
5cbbf31852 Expand AC_PROG_AWK because we are using $(AWK) 2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
9b4a667fc2 Use newer AC_PROG_LEX invocation
As our src/config.c defines a "yywrap" function, there
is no need for AC_PROG_LEX to look for for a "yywrap"
function in LEXLIBS.

Therefore we add the "noyywrap" option to follow the more
modern AC_PROG_LEX invocation.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
84b649849c Require a certain baseline of tool versions
Require a certain baseline of tool versions, in this case
from around 2013 (autoconf 2.69 and automake 1.14).

This is a significant advancement over the old requirement
of autoconf 2.60 (from 2006) and no requirement on automake
which gives us features without needing a very recent system.

The exact versions to require might be up to debate.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
b6a47dddec Line wraps to improve human readability
Wrap some lines in src/configure.ac to improve readability.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
9b576c4c01 Raw result of running "autoupdate"
This is just the raw result of running "autoupdate" to update
the src/configure.ac file to a more recent standard.

Manual fixes to the autoupdate output will happen over the next
few commits.

This fixes some of the autoreconf time warnings, e.g. about AC_TRY_*
being used instead of AC_*_IFELSE.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
ed2bb82652 Pass bootstrap CLI arguments to autoreconf
For my convenience, pass all bootstrap CLI arguments on to autoreconf.

This is useful when testing with e.g. -Wall and -Werror arguments.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
b4402bd334 Have bootstrap script work only in its own directory
When called from a working directory different from the directory
where the bootstrap script is located, make the bootstrap script
only work on its own directory and not whatever the current working
directory just happens to be.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
2a6f415166 Have autoreconf deal with initializing GNU build system
Let the autoreconf tool handle the sequencing of tool calls.

The autoreconf tool has been dealing with calling tools like
aclocal, libtoolize, etc. quite well for about the last 20 years.

This keeps the "bootstrap" script around to keep the old way
of calling bootstrap working, i.e. maintain compatibility with the
existing workflows.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
c96032a57b Move all autotools helper scripts to auto-aux/
Move all autotools helper scripts and auxiliary files installed
automatically by the autotools to auto-aux/ (e.g. config.guess,
depcomp, install-sh, texinfo.tex, etc.).

Moving AC_CANONICAL_TARGET after AC_CONFIG_AUX_DIR works
around a silent bug in Autoconf 2.69 where the generated
configure script would not find the install-sh file which
has been placed in that given aux directory.

Moved AM_INIT_AUTOMAKE which must also happen after
AC_CONFIG_AUX_DIR.
2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
1b5f3935b6 Add example build script for autotools build tests 2024-02-19 06:10:33 +01:00
Hans Ulrich Niedermann
610330f0d9 Remove unused unnecessary commented build code
Remove unused unnecessary commented out build code from
"src/configure.ac".

I accidentally left those comments in commit d15c561a.
2024-02-18 16:21:25 +01:00
Hans Ulrich Niedermann
8fb73a1458 Add basic CI checks using the autotools build
This add some basic CI checks which exercise the autotools build:

  * make targets "all" "install" testing compilation and installation
  * run the same dry-run test-avrdude check as the cmake builds
  * make target "distcheck" testing that dist tarball contains all
    the necessary files
2024-02-18 16:21:19 +01:00
stefanrueger
5c1649dcee Update NEWS 2024-02-15 11:41:52 +13:00
Stefan Rueger
14d1560e52 Merge pull request #1680 from ndim/fix-Wcalloc-transposed-args
Fix -Wcalloc-transposed-args warning
2024-02-15 11:40:20 +13:00
Stefan Rueger
64f2a3ed22 Merge pull request #1686 from stefanrueger/avrintel.h
Make avrintel.h an internal header file for libavrdude
2024-02-15 11:39:27 +13:00
stefanrueger
a82679229a Update NEWS 2024-02-14 21:54:30 +13:00
Stefan Rueger
cdfc88dfc4 Merge pull request #1687 from mcuee/remove_msys2_32bit_build
Remove 32bit MSYS2 mingw32 and clang32 build
2024-02-14 21:53:28 +13:00
mcuee
2357f833e1 Remove 32bit MSYS2 mingw32 and clang32 build
MSYS2 has dropped 32bit binary packages for libusb, libusb-compat-git and libftdi.
2024-02-14 13:36:21 +08:00
stefanrueger
e2a10db193 Make avrintel.h an internal header file for libavrdude 2024-02-14 17:15:21 +13:00
Hans Ulrich Niedermann
e0188195a3 Fix -Wcalloc-transposed-args warning
The calloc(3) function has two arguments: the number of members,
and the size of one member.

sizeof(...) makes more sense as member size, and 1 as number
of members. At least that is what the gcc warning wants.

This was the only compiler warning I could get on my Fedora 40
test build (gcc 14) with CFLAGS="-Wall -Wextra -Werror".
2024-02-07 15:26:18 +01:00
stefanrueger
0179026e09 Add NEWS template for next version 2024-02-08 00:19:33 +13:00
stefanrueger
e599214c9d Update version info for 7.3 v7.3 2024-02-07 23:54:45 +13:00
stefanrueger
fff25530e1 Update NEWS 2024-02-07 23:46:33 +13:00
Stefan Rueger
72500a1018 Merge pull request #1668 from ndim/test-string-equality-operator-typo-fix
The test(1) string comparison uses =, not ==
2024-02-07 23:42:07 +13:00
Hans
b23830c448 Add more programmer descriptions (#1667) 2024-02-07 23:40:43 +13:00
Stefan Rueger
4f1e3871b0 Merge pull request #1663 from ndim/autoconf-package-version
Automatically determine Autoconf package version from cmake package version
2024-02-07 23:34:11 +13:00
Hans Ulrich Niedermann
a97e71a321 The test(1) string comparison uses =, not ==
The test(1) command string comparison operator is a single
equals sign, not a double equals sign.

Pointed out by @mcuee at https://github.com/avrdudes/avrdude/pull/1663?#issuecomment-1931024192
2024-02-07 01:44:01 +01:00
Hans Ulrich Niedermann
d15c561a7a Get AC_INIT version number from CMakeLists.txt
Generate the version number used in the Autotools builds
via a script from the top-level CMakeLists.txt and git
information instead of manual editing.

This script mimics what the avrdude top-level CMakeLists.txt
does for composing AVRDUDE_FULL_VERSION.

Consequently, maintainers do not need to edit the version numbers
in the "src/configure.ac" file's "AC_INIT(...)" line any more.

However, unlike the cmake based builds, this does not print the
commit hash in the "avrdude --help" message or in the "avrdude.conf"
file's "avrdude_conf_version = " line. That will come later.

These are the six build types supported and what avrdude
versions cmake and the autoconf builds actually produce:

                               cmake          autoconf
    git clone     release      7.2            7.2
    git clone     non-release  7.2-DATE+HASH  7.2-DATE
    git archive   release      7.2            7.2
    git archive   non-release  7.2            7.2
    dist tarball  release      N/A            7.2
    dist tarball  non-release  N/A            7.2-DATE
2024-02-07 00:47:35 +01:00
Hans Ulrich Niedermann
e58b344414 Use Github issues page for AC_INIT bug reports 2024-02-07 00:47:34 +01:00
Hans Ulrich Niedermann
acb7ba4d88 Multi line AC_INIT for improved overview 2024-02-07 00:47:34 +01:00
Hans Ulrich Niedermann
962cb030b2 gitignore tarballs generated by "make dist" 2024-02-07 00:47:34 +01:00
Hans Ulrich Niedermann
ce1bc3e34f Allow repeated doc builds without errors (Autotools)
Sometimes when building with the Autoconf buildsystem,
the avrdude-html/ subdir already exists and therefore
renaming the newly built avrdude/ subdir to avrdude-html/
cannot succeed.

Removing the old avrdude-html/ subdir first fixes that.
2024-02-07 00:47:34 +01:00
stefanrueger
1a64d3831b Update NEWS 2024-02-06 22:17:02 +13:00
Stefan Rueger
d68034c5c6 Merge pull request #1662 from stefanrueger/jtagmkii-updi
Read the signature on -c jtag2updi exit if last op was write/erase
PR is based on a draft sketch by @askn37
2024-02-06 22:14:25 +13:00
stefanrueger
83571e3310 Remove -l $logfile when echoing a failed avrdude command 2024-02-06 12:32:22 +13:00
stefanrueger
8fb650d148 Update NEWS 2024-02-06 10:36:03 +13:00
Stefan Rueger
c464ef1441 Merge pull request #1659 from dbuchwald/issue_1655
Enable writing of 512-byte pages for USERROW
2024-02-06 10:31:53 +13:00
Stefan Rueger
38781c8afd Merge pull request #1658 from stefanrueger/update-test-script
Update test script
2024-02-06 10:30:46 +13:00
stefanrueger
60f04f05fb Read the signature on -c jtag2updi exit if last op was write/erase 2024-02-06 10:24:10 +13:00