ianlancetaylor / libbacktrace

A C library that may be linked into a C/C++ program to produce symbolic backtraces
Other
971 stars 228 forks source link

Clean target removes source file allocfail.sh #81

Closed wookey closed 2 years ago

wookey commented 2 years ago

allocfail.sh gets added to $(TESTS) and the clean target removes everything in $(TESTS). The other tests are compiled, but this one is part of the original source tree so should not be cleaned. The practical effect of this is that a repeat build fails one of the tests.

This patch fixes it:

Index: libbacktrace-1.0/Makefile.am
===================================================================
--- libbacktrace-1.0.orig/Makefile.am
+++ libbacktrace-1.0/Makefile.am
@@ -540,7 +540,7 @@ check_PROGRAMS += $(BUILDTESTS)
 TESTS += $(BUILDTESTS)

 CLEANFILES = \
-       $(TESTS) *.debug elf_for_test.c edtest2_build.c gen_edtest2_build \
+       $(filter-out allocfail.sh,$(TESTS)) *.debug elf_for_test.c edtest2_build.c gen_edtest2_build \
        *.dsyms *.fsyms *.keepsyms *.dbg *.mdbg *.mdbg.xz *.strip

 clean-local:
ianlancetaylor commented 2 years ago

Thanks for the report. Fixed.