Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8fb73a1
Add basic CI checks using the autotools build
ndim Feb 6, 2024
610330f
Remove unused unnecessary commented build code
ndim Feb 8, 2024
1b5f393
Add example build script for autotools build tests
ndim Feb 8, 2024
c96032a
Move all autotools helper scripts to auto-aux/
ndim Feb 11, 2024
2a6f415
Have autoreconf deal with initializing GNU build system
ndim Feb 7, 2024
b4402bd
Have bootstrap script work only in its own directory
ndim Feb 7, 2024
ed2bb82
Pass bootstrap CLI arguments to autoreconf
ndim Feb 13, 2024
9b576c4
Raw result of running "autoupdate"
ndim Feb 7, 2024
b6a47dd
Line wraps to improve human readability
ndim Feb 7, 2024
84b6498
Require a certain baseline of tool versions
ndim Feb 7, 2024
9b4a667
Use newer AC_PROG_LEX invocation
ndim Feb 7, 2024
5cbbf31
Expand AC_PROG_AWK because we are using $(AWK)
ndim Feb 11, 2024
c076aa7
Consistently use x and quotes in test(1) calls
ndim Feb 7, 2024
d0a36e0
Fix accidentally inconsequential typo in variable name
ndim Feb 7, 2024
bccad9d
Fix libreadline summary output
ndim Feb 7, 2024
f8bb561
Use committer date for commit date and year
ndim Feb 8, 2024
8d73b05
Remove unused TIME_WITH_SYS_TIME macro definition
ndim Feb 9, 2024
6f11b88
Stop checking for AM_SILENT_RULES macro
ndim Feb 11, 2024
3ef9f71
Move AM_SILENT_RULES directly after AM_INIT_AUTOMAKE
ndim Feb 13, 2024
dc88ff4
Add AM_PROG_AR before LT_INIT, removing AC_PROG_AR etc
ndim Feb 8, 2024
29695af
gitignore: dist tarballs and distdir/ itself
ndim Feb 13, 2024
cc94578
Call it AVRDUDE_FULL_VERSION everywhere
ndim Feb 8, 2024
dd9e4d2
m4 quote macro args and set variable defaults
ndim Feb 12, 2024
a690c40
Add GIT_COMMIT_HASH to autotools AVRDUDE_FULL_VERSION
ndim Feb 8, 2024
8553d37
Move auto-added m4 files to auto-m4/ subdir
ndim Feb 19, 2024
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
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,51 @@ env:
BUILD_TYPE: RelWithDebInfo

jobs:
linux-x86_64-autotools:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install prerequisites
run: >-
sudo apt-get update

sudo apt-get install -y
build-essential
automake
libtool
gettext
flex
bison
libelf-dev
libusb-dev
libusb-1.0-0-dev
libhidapi-dev
libftdi1-dev
libreadline-dev
libserialport-dev
texinfo
texlive
texi2html
- name: Configure
run: >-
autoreconf -vis src

mkdir _ambuild && cd _ambuild

../src/configure
--enable-doc
--enable-parport
--enable-linuxgpio
--enable-linuxspi
- name: Build
run: make -C _ambuild -j$(nproc)
- name: Install
run: sudo make -C _ambuild install
- name: Dryrun_test
run: printf "\n\n" | ./tools/test-avrdude -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
- name: distcheck
run: make -C _ambuild -j$(nproc) distcheck

linux-x86_64:
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ ltmain.sh
ylwrap
tags
cscope.out
/src/avrdude-[1-9].*.tar.*
/src/avrdude-[1-9].[0-9].tar.*
/src/avrdude-[1-9].[0-9]/
/src/avrdude-[1-9].[0-9]-20[0-9][0-9][01][0-9][0-3][0-9].tar.*
/src/avrdude-[1-9].[0-9]-20[0-9][0-9][01][0-9][0-3][0-9]/
/src/GNUmakefile

*.o
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ if(Git_FOUND)
)

execute_process(
COMMAND "${GIT_EXECUTABLE}" log -1 --format=%ad --date=format:%Y%m%d
COMMAND "${GIT_EXECUTABLE}" log -1 --format=%cd --date=format:%Y%m%d
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_COMMIT_DATE
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(
COMMAND "${GIT_EXECUTABLE}" log -1 --format=%ad --date=format:%Y
COMMAND "${GIT_EXECUTABLE}" log -1 --format=%cd --date=format:%Y
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_COMMIT_YEAR
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
Expand Down
20 changes: 10 additions & 10 deletions src/GNUmakefile.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Helps update the version number automatically if using GNU make.
include Makefile
# @configure_input@

AUTORECONF ?= autoreconf
AUTORECONF_OPTS ?= -vis
include Makefile

script_version := $(shell $(top_srcdir)/build-helpers/package-version $(top_srcdir) version-stamp)
ifneq ($(PACKAGE_VERSION),$(script_version))
$(info autoconf and script versions do not match: $(PACKAGE_VERSION) vs $(script_version))
$(info Removing autom4te.cache and related files and re-running autoreconf)
dummy1 := $(shell rm -rf $(top_srcdir)/autom4te.cache)
dummy2 := $(shell $(AUTORECONF) $(AUTORECONF_OPTS) $(top_srcdir))
need_to_rerun := $(shell $(top_srcdir)/build-helpers/versioninfo.sh "$(top_srcdir)" "@VERSIONINFO_STAMPFILE@" | { @VERSIONINFO_READ@; \
if @VERSIONINFO_IS_UNCHANGED@ \
echo "no"; \
fi; } )
ifneq (no,$(need_to_rerun))
$(info Recorded and current version information do not match.)
$(info Re-running autoreconf via bootstrap.)
dummy1 := $(shell $(top_srcdir)/bootstrap)
endif

# vim: syntax=make
4 changes: 2 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CLEANFILES = \
config_gram.h \
lexer.c

include build-helpers/package-version.mk
include build-helpers/versioninfo.mk

BUILT_SOURCES = $(CLEANFILES)

Expand Down Expand Up @@ -248,4 +248,4 @@ backup-avrdude-conf:
${DESTDIR}${sysconfdir}/avrdude.conf.bak; \
fi

ACLOCAL_AMFLAGS = -I m4
ACLOCAL_AMFLAGS = -I auto-m4 -I build-helpers
2 changes: 2 additions & 0 deletions src/auto-aux/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure git creates empty directory for autotools to place files into
*
2 changes: 2 additions & 0 deletions src/auto-m4/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure creation of empty directory for autotools to place files into
*
57 changes: 57 additions & 0 deletions src/autotools-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#! /bin/sh

set -ex

cd "$(dirname "$0")"
top_srcdir="$(pwd)"

ostype="$(uname | tr A-Z a-z)"

if test "x$MAKE" = x; then
if gmake --version > /dev/null 2>&1; then
MAKE=gmake
fi
fi
make="${make-"${MAKE-make} -j$(nproc)"}"

rm -rf autom4te.cache/

prefix="$top_srcdir/build_autotools-prefix"
rm -rf "$prefix"

top_builddir="$top_srcdir/build_autotools"

# Remove remainders of failed distcheck attempts
for dir in "$top_builddir"
do
if test -d "$dir"; then
chmod -R +w "$dir"
fi
done
rm -rf "$top_builddir"

./bootstrap

mkdir "$top_builddir"
cd "$top_builddir"

configure_opts=""
configure_opts="$configure_opts --disable-silent-rules"
configure_opts="$configure_opts --enable-parport"
case "$ostype" in
*linux)
configure_opts="$configure_opts --enable-linuxgpio --enable-linuxspi"
configure_opts="$configure_opts --enable-doc"
;;
esac

$top_srcdir/configure --prefix="$prefix" ${configure_opts}

$make all
$make check
$make install
$make installcheck

printf "\n\n" | $top_srcdir/../tools/test-avrdude -e $prefix/bin/avrdude -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"

$make distcheck
10 changes: 5 additions & 5 deletions src/bootstrap
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#! /bin/sh

cd "$(dirname "$0")"

: ${AUTORECONF="autoreconf${AC_VER}"}
: ${AUTOHEADER="autoheader${AC_VER}"}
: ${AUTOCONF="autoconf${AC_VER}"}
: ${ACLOCAL="aclocal${AM_VER}"}
Expand All @@ -17,9 +20,6 @@ rm -rf autom4te.cache
# probe for that
LIBTOOLIZE=libtoolize
glibtoolize --version > /dev/null 2>&1 && LIBTOOLIZE=glibtoolize
${LIBTOOLIZE}
export LIBTOOLIZE

${ACLOCAL}
${AUTOHEADER}
${AUTOCONF}
${AUTOMAKE} -a -c
${AUTORECONF} -i "$@"
102 changes: 0 additions & 102 deletions src/build-helpers/package-version

This file was deleted.

26 changes: 0 additions & 26 deletions src/build-helpers/package-version.mk

This file was deleted.

Loading