Keep workaround for no-dist-built-files not being available

As no-dist-built-files was only introduced in Automake 1.16.4,
we cannot rely on that feature being present and need to continue
using our own workaround.

This hooks the dist-hook in a more robust fashion in the face
of multiple dist-hook targets (and versioninfo.mk already uses
one).
This commit is contained in:
Hans Ulrich Niedermann
2024-02-20 01:46:32 +01:00
parent 0b82a1f124
commit a74c58b32a

View File

@@ -31,15 +31,19 @@ EXTRA_DIST = \
avrdude.spec \
bootstrap
CLEANFILES = \
config_gram.c \
config_gram.h \
lexer.c
BUILT_SOURCES =
CLEANFILES =
built_sources =
built_sources += config_gram.c
built_sources += config_gram.h
built_sources += lexer.c
BUILT_SOURCES += $(built_sources)
CLEANFILES += $(built_sources)
include build-helpers/versioninfo.mk
BUILT_SOURCES = $(CLEANFILES)
#SUBDIRS = doc
#DIST_SUBDIRS = doc
@@ -77,11 +81,12 @@ lib_LTLIBRARIES = libavrdude.la
# https://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=15536
#
# for why we don't want to have them.
dist-hook:
rm -f \
$(distdir)/lexer.c \
$(distdir)/config_gram.c \
$(distdir)/config_gram.h
#
# We could avoid this dist-hook altogether if we could require
# Automake >= 1.16.4 and just use its no-dist-built-sources flag.
dist-hook: dist-hook-no-dist-built-sources-workaround
dist-hook-no-dist-built-sources-workaround:
cd "$(distdir)" && rm -f $(built_sources)
libavrdude_a_SOURCES = \
config_gram.y \