+2002-07-25 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * doc/autoconf.texi (Limitations of Make): Escaped newlines in
+ comments do not always work. Never trust the exit status of
+ `make -k'.
+
2002-07-23 Paul Eggert <eggert@twinsun.com>
* lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE):
Use PATH="/nonexistent;.", not PATH=".;.", as FreeBSD ksh2002
apparently treats PATH="nonexistent" as if it contained ".".
Bug reported by Stefan `Sec' Zehl.
-
+
2002-07-22 Alexandre Duret-Lutz <duret_g@epita.fr>
* doc/autoconf.texi (Limitations of Make): Mention the special
shows @code{FOO} equal to @code{one BAR = two}. Other Makes sensibly
let a backslash continue only to the immediately following line.
+@item Escaped newline in comments
+
+According to @sc{posix}, Makefile comments start with @code{#} and
+continue until an unescaped newline is reached.
+
+@example
+% @kbd{cat Makefile}
+# A = foo \
+ bar \
+ baz
+
+all:
+ @@echo ok
+% @kbd{make} # GNU make
+ok
+@end example
+
+@noindent
+However in Real World this is not always the case. Some implementations
+discards anything from @code{#} up to the end of line, ignoring any
+trailing backslash.
+
+@example
+% @kbd{pmake} # BSD make
+"Makefile", line 3: Need an operator
+Fatal errors encountered -- cannot continue
+@end example
+
+@noindent
+Therefore, if you want to comment a multi-line definition, prefix each
+line with @code{#}, not only the first.
+
+@example
+# A = foo \
+# bar \
+# baz
+@end example
+
@item @code{make macro=value} and sub-@command{make}s.
A command-line variable definition such as @code{foo=bar} overrides any
World
@end example
+@item @code{make -k}
+@cindex @code{make -k}
+
+Do not rely on the exit status of @code{make -k}. Some implementations
+reflect whether they encountered an error in their exit status; other
+implementations always succeed.
+
+@example
+% @kbd{cat Makefile}
+all:
+ false
+% @kbd{make -k; echo exit status: $?} # GNU make
+false
+make: *** [all] Error 1
+exit status: 2
+% @kbd{pmake -k; echo exit status: $?} # BSD make
+false
+*** Error code 1 (continuing)
+exit status: 0
+@end example
+
@item @code{VPATH}
@cindex @code{VPATH}