]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Clean up the rule to create "expr".
authorJim Meyering <meyering@redhat.com>
Tue, 13 Nov 2007 08:34:52 +0000 (09:34 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 13 Nov 2007 08:37:43 +0000 (09:37 +0100)
* tests/Makefile.am (expr): Don't redirect directly to target.
Redirect just once, not for each echo statement.
Use $@, not literal "expr".

ChangeLog
tests/Makefile.am

index 79c6cc196e4c3a412ff79cb2044123324020acec..86cccd23addf9eec0a0398ed9479e91bed312884 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-13  Jim Meyering  <meyering@redhat.com>
+
+       Clean up the rule to create "expr".
+       * tests/Makefile.am (expr): Don't redirect directly to target.
+       Redirect just once, not for each echo statement.
+       Use $@, not literal "expr".
+
 2007-11-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        Don't worry about preprocessor when testing long long.
index 4cf7fd10bc21b9c3fa0d868014bde6cd532290ec..fd15563fa82ce8126fc16f18239a71eae3b8a582 100644 (file)
@@ -195,14 +195,17 @@ maintainer-check: maintainer-check-posix maintainer-check-c++
 # The hairy heredoc is more robust than using echo.
 CLEANFILES += expr
 expr:
-       echo '#! $(SHELL)'            >expr
-       echo 'result=`$(EXPR) "$$@"`'>>expr
-       echo 'estatus=$$?'           >>expr
-       echo 'cat <<EOF'             >>expr
-       echo '$${result:-0}'         >>expr
-       echo 'EOF'                   >>expr
-       echo 'exit $$estatus'        >>expr
-       chmod +x expr
+       :;{                                     \
+         echo '#! $(SHELL)';                   \
+         echo 'result=`$(EXPR) "$$@"`';        \
+         echo 'estatus=$$?';                   \
+         echo 'cat <<EOF';                     \
+         echo '$${result:-0}';                 \
+         echo 'EOF';                           \
+         echo 'exit $$estatus';                \
+       } > $@-t
+       chmod +x $@-t
+       mv $@-t $@
 
 # Try the test suite with more severe environments.
 maintainer-check-posix: expr