script/gen_fuzz.py: don’t include test/fuzz/*fuzz.cpp files on “make dist”
Before this change, when GEN_FUZZ=1 ./bootstrap has filled
Makefile-fuzz-generated.am, the aforementioned files were genetared, and
included on “make dist”.
Likewise, test/fuzz/main-sapi.cpp was sometimes considered by “make dist” and
test/fuzz/tcti/tss2_tcti_fuzzing.h was always forgotten.
Signed-Off-By: Дилян Палаузов <git-dpa@aegee.org>
diff --git a/Makefile-fuzz.am b/Makefile-fuzz.am
index 32dc8bf..e389ef4 100644
--- a/Makefile-fuzz.am
+++ b/Makefile-fuzz.am
@@ -7,6 +7,7 @@
INCLUDE_DIRS += -I$(srcdir)/test/fuzz/tcti
TESTS_LIBADD = $(lib_LTLIBRARIES) $(libtss2_mu) $(libtss2_sys) $(libutil)
+EXTRA_DIST += test/fuzz/main-sapi.cpp
# tcti library used for fuzzing
if ENABLE_TCTI_FUZZING
libtss2_tcti_fuzzing = test/fuzz/tcti/libtss2-tcti-fuzzing.la
@@ -15,7 +16,8 @@
test_fuzz_tcti_libtss2_tcti_fuzzing_la_LIBADD = $(TESTS_LIBADD)
test_fuzz_tcti_libtss2_tcti_fuzzing_la_SOURCES = \
src/tss2-tcti/tcti-common.c src/tss2-tcti/tcti-common.h \
- test/fuzz/tcti/tcti-fuzzing.c test/fuzz/tcti/tcti-fuzzing.h
+ test/fuzz/tcti/tcti-fuzzing.c test/fuzz/tcti/tcti-fuzzing.h \
+ test/fuzz/tcti/tss2_tcti_fuzzing.h
endif # ENABLE_TCTI_FUZZING
if ENABLE_FUZZING
diff --git a/script/gen_fuzz.py b/script/gen_fuzz.py
index 4ee68c1..8fa80ad 100755
--- a/script/gen_fuzz.py
+++ b/script/gen_fuzz.py
@@ -19,7 +19,7 @@
noinst_PROGRAMS += test/fuzz/%s.fuzz
test_fuzz_%s_fuzz_CPPFLAGS = $(FUZZ_CPPFLAGS)
test_fuzz_%s_fuzz_LDADD = $(FUZZ_LDADD)
-test_fuzz_%s_fuzz_SOURCES = test/fuzz/main-sapi.cpp \\
+nodist_test_fuzz_%s_fuzz_SOURCES = test/fuzz/main-sapi.cpp \\
test/fuzz/%s.fuzz.cpp
DISTCLEANFILES += test/fuzz/%s.fuzz.cpp'''