Customize 'make clean' to also remove test data dirs and gcov files

This commit is contained in:
Brian Cox 2017-08-31 19:51:50 -07:00
parent 7fe1e4f79a
commit 5184fe01c4
30 changed files with 79 additions and 34 deletions

View File

@ -8,3 +8,7 @@ install:
uninstall:
true
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
-rm -rf test-harness/twtest

View File

@ -519,7 +519,7 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
clean-am: clean-generic clean-local mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
@ -586,16 +586,17 @@ uninstall-am:
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic cscopelist-am ctags ctags-am \
distclean distclean-generic distclean-tags distdir dvi dvi-am \
html html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-am uninstall uninstall-am
check-am clean clean-generic clean-local cscopelist-am ctags \
ctags-am distclean distclean-generic distclean-tags distdir \
dvi dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
@ -606,6 +607,11 @@ install:
uninstall:
true
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
-rm -rf test-harness/twtest
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -35,6 +35,7 @@ libcore_a_LIBADD = @CORE_CRYPT_O@
libcore_a_DEPENDENCIES = @CORE_CRYPT_O@
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = *.gcno *.gcda
all: $(noinst_LIBRARIES)
$(AR) ru ../../lib/libtripwire.a $(libcore_a_OBJECTS) $(libcore_a_LIBADD)

View File

@ -358,6 +358,7 @@ libcore_a_HEADERS = archive.h charutil.h cmdlineparser.h codeconvert.h \
libcore_a_LIBADD = @CORE_CRYPT_O@
libcore_a_DEPENDENCIES = @CORE_CRYPT_O@
CLEANFILES = *.gcno *.gcda
all: all-am
.SUFFIXES:
@ -544,6 +545,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

View File

@ -20,7 +20,7 @@ libcryptlib_a_HEADERS = \
ztrees.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = ../../lib/libcryptlib.a
CLEANFILES = ../../lib/libcryptlib.a *.gcno *.gcda
all: $(noinst_LIBRARIES)
$(LN) -f $(noinst_LIBRARIES) ../../lib/libcryptlib.a

View File

@ -333,7 +333,7 @@ libcryptlib_a_HEADERS = \
queue.h rng.h sha.h smartptr.h words.h zbits.h zdeflate.h zinflate.h \
ztrees.h
CLEANFILES = ../../lib/libcryptlib.a
CLEANFILES = ../../lib/libcryptlib.a *.gcno *.gcda
all: all-am
.SUFFIXES:

View File

@ -13,6 +13,7 @@ libdb_a_HEADERS = \
db.h dberrors.h hierdatabase.h hierdbnode.h hierdbpath.h stddb.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = *.gcno *.gcda
all: $(noinst_LIBRARIES)
$(AR) ru ../../lib/libtripwire.a $(libdb_a_OBJECTS)

View File

@ -324,6 +324,7 @@ libdb_a_HEADERS = \
block.h blockfile.h blockrecordarray.h blockrecordfile.h \
db.h dberrors.h hierdatabase.h hierdbnode.h hierdbpath.h stddb.h
CLEANFILES = *.gcno *.gcda
all: all-am
.SUFFIXES:
@ -510,6 +511,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

View File

@ -27,6 +27,7 @@ libfco_a_HEADERS = \
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = *.gcno *.gcda
all: $(noinst_LIBRARIES)
$(AR) ru ../../lib/libtripwire.a $(libfco_a_OBJECTS)

View File

@ -345,6 +345,7 @@ libfco_a_HEADERS = \
iterproxy.h parsergenreutil.h propset.h signature.h \
stdfco.h twfactory.h
CLEANFILES = *.gcno *.gcda
all: all-am
.SUFFIXES:
@ -531,6 +532,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

View File

@ -17,6 +17,7 @@ libfs_a_HEADERS = \
fsvisitor.h stdfs.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = *.gcno *.gcda
all: $(noinst_LIBRARIES)
$(AR) ru ../../lib/libtripwire.a $(libfs_a_OBJECTS)

View File

@ -331,6 +331,7 @@ libfs_a_HEADERS = \
fspropcalc.h fspropdisplayer.h fspropset.h fsstrings.h \
fsvisitor.h stdfs.h
CLEANFILES = *.gcno *.gcda
all: all-am
.SUFFIXES:
@ -517,6 +518,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

View File

@ -16,7 +16,7 @@ siggen_HEADERS = \
siggen.h siggencmdline.h siggenstrings.h stdsiggen.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = ../../bin/siggen
CLEANFILES = ../../bin/siggen *.gcno *.gcda
all: $(sbin_PROGRAMS)
@test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin

View File

@ -318,7 +318,7 @@ siggen_SOURCES = \
siggen_HEADERS = \
siggen.h siggencmdline.h siggenstrings.h stdsiggen.h
CLEANFILES = ../../bin/siggen
CLEANFILES = ../../bin/siggen *.gcno *.gcda
all: all-am
.SUFFIXES:

View File

@ -20,7 +20,7 @@ tripwire_HEADERS = \
tripwirestrings.h tripwireutil.h twcmdline.h twcmdlineutil.h updatedb.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = ../../bin/tripwire ../../lib/libtripwire.a
CLEANFILES = ../../bin/tripwire ../../lib/libtripwire.a *.gcno *.gcda
all: $(sbin_PROGRAMS)
@test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin

View File

@ -326,7 +326,7 @@ tripwire_HEADERS = \
stdtripwire.h syslog_trip.h tripwire.h tripwireerrors.h tripwiremsg.h \
tripwirestrings.h tripwireutil.h twcmdline.h twcmdlineutil.h updatedb.h
CLEANFILES = ../../bin/tripwire ../../lib/libtripwire.a
CLEANFILES = ../../bin/tripwire ../../lib/libtripwire.a *.gcno *.gcda
all: all-am
.SUFFIXES:

View File

@ -20,6 +20,7 @@ libtw_a_HEADERS = \
tw.h twerrors.h twinit.h twstrings.h twutil.h
DEFS = @DEFS@ -DCONFIG_DIR=\"$(sysconfdir)\"
CLEANFILES = *.gcno *.gcda
all: $(noinst_LIBRARIES)
$(AR) ru ../../lib/libtripwire.a $(libtw_a_OBJECTS)

View File

@ -337,6 +337,7 @@ libtw_a_HEADERS = \
stdtw.h systeminfo.h textdbviewer.h textreportviewer.h \
tw.h twerrors.h twinit.h twstrings.h twutil.h
CLEANFILES = *.gcno *.gcda
all: all-am
.SUFFIXES:
@ -523,6 +524,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

View File

@ -17,7 +17,7 @@ twadmin_HEADERS = \
twadmincl.h twadminerrors.h twadminstrings.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = ../../bin/twadmin
CLEANFILES = ../../bin/twadmin *.gcno *.gcda
all: $(sbin_PROGRAMS)
@test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin

View File

@ -319,7 +319,7 @@ twadmin_HEADERS = \
keygeneration.h resource.h stdtwadmin.h twadmin.h \
twadmincl.h twadminerrors.h twadminstrings.h
CLEANFILES = ../../bin/twadmin
CLEANFILES = ../../bin/twadmin *.gcno *.gcda
all: all-am
.SUFFIXES:

View File

@ -13,6 +13,7 @@ libtwcrypto_a_HEADERS = \
stdtwcrypto.h twcrypto.h twcryptoerrors.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = *.gcno *.gcda
all: $(noinst_LIBRARIES)
$(AR) ru ../../lib/libtripwire.a $(libtwcrypto_a_OBJECTS)

View File

@ -325,6 +325,7 @@ libtwcrypto_a_HEADERS = \
bytequeue.h crypto.h cryptoarchive.h keyfile.h \
stdtwcrypto.h twcrypto.h twcryptoerrors.h
CLEANFILES = *.gcno *.gcda
all: all-am
.SUFFIXES:
@ -511,6 +512,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

View File

@ -15,6 +15,7 @@ libtwparser_a_HEADERS = \
yylex.h yyparse.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = *.gcno *.gcda
all: $(noinst_LIBRARIES)
$(AR) ru ../../lib/libtripwire.a $(libtwparser_a_OBJECTS)

View File

@ -328,6 +328,7 @@ libtwparser_a_HEADERS = \
stdtwparser.h twparser.h twparsererrors.h twparserstrings.h \
yylex.h yyparse.h
CLEANFILES = *.gcno *.gcda
all: all-am
.SUFFIXES:
@ -514,6 +515,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

View File

@ -17,7 +17,7 @@ twprint_HEADERS = \
twprinterrors.h twprintstrings.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = ../../bin/twprint
CLEANFILES = ../../bin/twprint *.gcno *.gcda
all: $(sbin_PROGRAMS)
@test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin

View File

@ -319,7 +319,7 @@ twprint_HEADERS = \
resource.h stdtwprint.h twprint.h twprintcmdline.h \
twprinterrors.h twprintstrings.h
CLEANFILES = ../../bin/twprint
CLEANFILES = ../../bin/twprint *.gcno *.gcda
all: all-am
.SUFFIXES:

View File

@ -81,7 +81,13 @@ wchar16_t.cpp
twtest_HEADERS = stdtest.h stringutil_t.h test.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = ../../bin/twtest
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
-rm -rf ../../bin/TWTestData
-rm -f ../../bin/twtest
-rm -f *.gcno *.gcda
all: $(sbin_PROGRAMS)
@test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin

View File

@ -420,7 +420,6 @@ usernotifystdout_t.cpp \
wchar16_t.cpp
twtest_HEADERS = stdtest.h stringutil_t.h test.h
CLEANFILES = ../../bin/twtest
all: all-am
.SUFFIXES:
@ -645,7 +644,6 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@ -656,7 +654,7 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
clean-am: clean-generic clean-local clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -f Makefile
@ -724,15 +722,15 @@ uninstall-am: uninstall-sbinPROGRAMS uninstall-twtestHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
install-strip install-twtestHEADERS installcheck \
installcheck-am installdirs maintainer-clean \
clean-local clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
distclean distclean-compile distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-sbinPROGRAMS install-strip install-twtestHEADERS \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-sbinPROGRAMS uninstall-twtestHEADERS
@ -740,6 +738,13 @@ uninstall-am: uninstall-sbinPROGRAMS uninstall-twtestHEADERS
.PRECIOUS: Makefile
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
-rm -rf ../../bin/TWTestData
-rm -f ../../bin/twtest
-rm -f *.gcno *.gcda
all: $(sbin_PROGRAMS)
@test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin

View File

@ -12,6 +12,7 @@ libutil_a_HEADERS = fileutil.h miscutil.h stdutil.h \
stringencoder.h util.h utilerrors.h utilstrings.h
DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit
CLEANFILES = *.gcno *.gcda
all: $(noinst_LIBRARIES)
$(AR) ru ../../lib/libtripwire.a $(libutil_a_OBJECTS)

View File

@ -323,6 +323,7 @@ libutil_a_SOURCES = \
libutil_a_HEADERS = fileutil.h miscutil.h stdutil.h \
stringencoder.h util.h utilerrors.h utilstrings.h
CLEANFILES = *.gcno *.gcda
all: all-am
.SUFFIXES:
@ -509,6 +510,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)