[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: `make distcheck' non-interactive again
From: |
Pavel Roskin |
Subject: |
Re: FYI: `make distcheck' non-interactive again |
Date: |
Wed, 7 Mar 2001 13:19:21 -0500 (EST) |
Hello, Tom!
> Pavel> `make distcheck' is working again. No more questions from `rm'.
>
> Thanks.
> BTW this is the sort of thing that we can check for in
> `maintainer-check'. That way we can easily find out if we've
> accidentally written a new test that will break.
I don't know if `maintainer-check' can rely on egrep being GNU egrep. If
yes, here's the patch.
Ideally, maintainer-check should be another test in tests/ written
entirely in Perl.
ChangeLog:
* Makefile.am (maintainer-check): Scan all *.am files and tests
for invocations of `rm' without `-f'.
* tests/mclean.test: Adjusted to prevent being caught by the
above test.
________________________
--- Makefile.am
+++ Makefile.am
@@ -79,6 +79,13 @@
echo "Found too many uses of '\$${' in the lines above." 1>&2; \
exit 1; \
else :; fi
+## Make sure `rm' is called with `-f'.
+ @if egrep '\<rm ([^-]|\-[^f ]*\>)' \
+ $(srcdir)/[a-z]*.am $(srcdir)/tests/*.test | \
+ fgrep -v '##'; then \
+ echo "Suspicious 'rm' invocation." 1>&2; \
+ exit 1; \
+ else :; fi
## Make sure all invocations of mkinstalldirs are correct.
@if fgrep -n 'mkinstalldirs' $(srcdir)/[a-z]*.am | \
fgrep -v '$$(mkinstalldirs)'; then \
--- tests/mclean.test
+++ tests/mclean.test
@@ -13,4 +13,4 @@
$AUTOMAKE || exit 1
-grep 'rm .*MAINTAINERCLEANFILES' Makefile.in
+grep 'rm -f .*MAINTAINERCLEANFILES' Makefile.in
________________________
Regards,
Pavel Roskin