2009-04-13 Eric Blake <ebb9@byu.net>
+ Improve documentation about if exit status.
+ * doc/autoconf.texi (Limitations of Builtins) <if>: Mention that
+ exit status bugs don't affect modern targets.
+ Reported by Andreas Schwab.
+
Add cross-reference to new macros.
* doc/autoconf.texi (Text processing Macros) <m4_normalize>
<m4_strip>: Reference the new m4_ifblank.
This is especially useful in other M4 macros, where the @dfn{then} and
@dfn{else} branches might be macro arguments.
-There are shells that do not reset the exit status from an @command{if}:
+Some very old shells did not reset the exit status from an @command{if}
+with no @command{else}:
@example
$ @kbd{if (exit 42); then true; fi; echo $?}
@end example
@noindent
-whereas a proper shell should have printed @samp{0}. This is especially
-bad in makefiles since it produces false failures. This is why properly
-written makefiles, such as Automake's, have such hairy constructs:
+whereas a proper shell should have printed @samp{0}. But this is no
+longer a portability problem; any shell that supports functions gets it
+correct. However, it explains why some makefiles have lengthy
+constructs:
@example
if test -f "$file"; then