diff options
| author | James Youngman <jay@gnu.org> | 2013-03-24 14:09:14 +0000 |
|---|---|---|
| committer | James Youngman <jay@gnu.org> | 2013-03-24 14:09:14 +0000 |
| commit | a917eb988fab87e47455c73731941d6fbfd1cf69 (patch) | |
| tree | 31c388370002c76ccaea169c4d6f5211f030e15a | |
| parent | 36b4a73e6367d7929b9d9919d497e05c68a390f6 (diff) | |
| download | findutils-a917eb988fab87e47455c73731941d6fbfd1cf69.tar.gz | |
Bugfix to "make clean": do not delete header files.
* lib/Makefile.am (coverage-clean): Remove output files left
behind by gcc -fprofile-arcs -ftest-coverage by using $(RM) with a
glob pattern rather than a $(libfindtools_a_SOURCES.c=.gcno)
Makefile substitution, because the latter caused us to delete
header files entirely (their names do not end in .c). This had
meant that it was impossible to compile findutils after "make
clean". Bug report by David Gilbert.
* find/Makefile.am (coverage-clean): Likewise.
* xargs/Makefile.am (coverage-clean): Likewise.
* locate/Makefile.am (coverage-clean): Likewise.
* Makefile.am (coverage-clean): Likewise, but also do this in the
subdirectories whose Makefile.am files are generated by
gnulib-tool.
| -rw-r--r-- | ChangeLog | 15 | ||||
| -rw-r--r-- | Makefile.am | 11 | ||||
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | find/Makefile.am | 12 | ||||
| -rw-r--r-- | lib/Makefile.am | 15 | ||||
| -rw-r--r-- | locate/Makefile.am | 18 | ||||
| -rw-r--r-- | xargs/Makefile.am | 9 |
7 files changed, 55 insertions, 27 deletions
@@ -1,5 +1,20 @@ 2013-03-24 James Youngman <jay@gnu.org> + Bugfix to "make clean": do not delete header files. + * lib/Makefile.am (coverage-clean): Remove output files left + behind by gcc -fprofile-arcs -ftest-coverage by using $(RM) with a + glob pattern rather than a $(libfindtools_a_SOURCES.c=.gcno) + Makefile substitution, because the latter caused us to delete + header files entirely (their names do not end in .c). This had + meant that it was impossible to compile findutils after "make + clean". Bug report by David Gilbert. + * find/Makefile.am (coverage-clean): Likewise. + * xargs/Makefile.am (coverage-clean): Likewise. + * locate/Makefile.am (coverage-clean): Likewise. + * Makefile.am (coverage-clean): Likewise, but also do this in the + subdirectories whose Makefile.am files are generated by + gnulib-tool. + Move on from 4.5.11, to 4.5.12-git * NEWS: Add a new section for 4.5.12-git. Mention the bugfix to find/testsuite/sv-bug-32043.sh. diff --git a/Makefile.am b/Makefile.am index 9cc4522..4f178c3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,3 +55,14 @@ findutils-check-smells: \! \( -name '*~' -o -name '*.xo' -o -name '*.xi' \) \ -print0 | \ xargs -0 python $(AUXDIR)/src-sniff.py + +# Clean coverage files generated by running binaries built with gcc +# -fprofile-arcs -ftest-coverage. We touch subdirectories here +# because the relecvant Makefile.am files (which we would otherwise +# edit to add an $(RM) command in their own coverage-clean rule) are +# generated by gnulib-tool and therefore we cannot add the rule to +# those files. +coverage-clean: + for dir in . gl/lib gl/lib/glthread gl/lib/uniwidth tests tests/uniwidth; do $(RM) $${dir}/*.gcno $${dir}/*.gcda $${dir}/*.gcov $${dir}/*.lcov; done + +clean-local: coverage-clean @@ -9,6 +9,8 @@ database, though they are in the ChangeLog: *** Use of [[ ... ]] in find/testsuite/sv-bug-32043.sh +*** Don't delete header files in "lib/" for "make clean". + * Major changes in release 4.5.11, 2013-02-02 diff --git a/find/Makefile.am b/find/Makefile.am index f1068bf..30eba1d 100644 --- a/find/Makefile.am +++ b/find/Makefile.am @@ -6,9 +6,6 @@ localedir = $(datadir)/locale noinst_LIBRARIES = libfindtools.a libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c exec.c tree.c util.c sharefile.c print.c -libfindtools_coverage_files = \ - $(libfindtools_a_SOURCES:.c=.gcno) \ - $(libfindtools_a_SOURCES:.c=.gcda) # We always build two versions of find, one with fts, one without. # Their names depend on whether the user specified --with-fts. @@ -21,15 +18,11 @@ if WITH_FTS bin_PROGRAMS = find oldfind find_SOURCES = ftsfind.c oldfind_SOURCES = find.c -find_coverage_files = $(oldfind_SOURCES:.c=.gcno) $(find_SOURCES:.c=.gcno) \ - $(oldfind_SOURCES:.c=.gcda) $(find_SOURCES:.c=.gcda) man_MANS = find.1 oldfind.1 else bin_PROGRAMS = find ftsfind find_SOURCES = find.c ftsfind_SOURCES = ftsfind.c -find_coverage_files = $(ftsfind_SOURCES:.c=.gcno) $(find_SOURCES:.c=.gcno) \ - $(ftsfind_SOURCES:.c=.gcda) $(find_SOURCES:.c=.gcda) man_MANS = find.1 ftsfind.1 endif @@ -53,7 +46,10 @@ dist-hook: findutils-check-manpages # Clean coverage files generated by running binaries built with # gcc -fprofile-arcs -ftest-coverage -CLEANFILES = $(libfindtools_coverage_files) $(find_coverage_files) +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean findutils-check-manpages: $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) diff --git a/lib/Makefile.am b/lib/Makefile.am index eba43d2..5bfa8ca 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -37,13 +37,14 @@ libfind_a_SOURCES += listfile.c extendbuf.c buildcmd.c \ forcefindlib.c qmark.c printquoted.c regextype.c dircallback.c fdleak.c \ safe-atoi.c splitstring.c -CLEANFILES = check-regexprops \ - $(regexprops_SOURCES:.c=.gcno) \ - $(regexprops_SOURCES:.c=.gcda) \ - $(libfind_a_SOURCES:.c=.gcno) \ - $(libfind_a_SOURCES:.c=.gcda) \ - $(test_splitstring_SOURCES:.c=.gcno) \ - $(test_splitstring_SOURCES:.c=.gcda) +CLEANFILES = check-regexprops + +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean EXTRA_DIST += waitpid.c forcefindlib.c TESTS_ENVIRONMENT = REGEXPROPS=regexprops$(EXEEXT) diff --git a/locate/Makefile.am b/locate/Makefile.am index 4792b8c..d57b5d8 100644 --- a/locate/Makefile.am +++ b/locate/Makefile.am @@ -14,16 +14,7 @@ bin_SCRIPTS = updatedb man_MANS = locate.1 updatedb.1 locatedb.5 BUILT_SOURCES = dblocation.texi EXTRA_DIST = dblocation.texi locatedb.h updatedb.sh $(man_MANS) -CLEANFILES = \ - updatedb \ - $(bigram_SOURCES:.c=.gcno) \ - $(bigram_SOURCES:.c=.gcda) \ - $(code_SOURCES:.c=.gcno) \ - $(code_SOURCES:.c=.gcda) \ - $(frcode_SOURCES:.c=.gcno) \ - $(frcode_SOURCES:.c=.gcda) \ - $(locate_SOURCES:.c=.gcno) \ - $(locate_SOURCES:.c=.gcda) +CLEANFILES = updatedb DISTCLEANFILES = dblocation.texi locate_SOURCES = locate.c word_io.c @@ -78,3 +69,10 @@ dist-hook: findutils-check-manpages findutils-check-manpages: $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) + +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean diff --git a/xargs/Makefile.am b/xargs/Makefile.am index 1cfe3e4..e002334 100644 --- a/xargs/Makefile.am +++ b/xargs/Makefile.am @@ -8,11 +8,16 @@ LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) EXTRA_DIST = $(man_MANS) SUBDIRS = . testsuite -CLEANFILES = $(xargs_SOURCES:.c=.gcno) $(xargs_SOURCES:.c=.gcda) - $(PROGRAMS): ../lib/libfind.a ../gl/lib/libgnulib.a dist-hook: findutils-check-manpages findutils-check-manpages: $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) + +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean |
