* 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 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.
# 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