[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Autoconf source repository branch, master, updated. v2.68-88-g
From: |
Stefano Lattarini |
Subject: |
[SCM] GNU Autoconf source repository branch, master, updated. v2.68-88-g19951ff |
Date: |
Fri, 16 Sep 2011 12:12:01 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".
http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=19951ff75b438115dceeb02ab85564028745c45e
The branch, master has been updated
via 19951ff75b438115dceeb02ab85564028745c45e (commit)
from 7b4918700354b546ae6dd50d0e21eb41f7ad1c96 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 19951ff75b438115dceeb02ab85564028745c45e
Author: Stefano Lattarini <address@hidden>
Date: Tue Aug 16 17:03:11 2011 +0200
docs: more details about make VPATH rewriting woes
* doc/autoconf.texi (Automatic Rule Rewriting): Solaris make
VPATH rewriting applies to any whitespace-separated word in a
rule, so it might apply also to shell variables, functions
and keywords (and automake has already tripped on this once);
document this, with an example. Since we are at it, do some
minor reformatting of existing text.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 ++++++++++
doc/autoconf.texi | 39 +++++++++++++++++++++++++++++++--------
2 files changed, 41 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5ff3e92..01df9ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-09-14 Stefano Lattarini <address@hidden>
+
+ docs: more details about make VPATH rewriting woes
+ * doc/autoconf.texi (Automatic Rule Rewriting): Solaris make
+ VPATH rewriting applies to any whitespace-separated word in a
+ rule, so it might apply also to shell variables, functions
+ and keywords (and automake has already tripped on this once);
+ document this, with an example. Since we are at it, do some
+ minor reformatting of existing text.
+
2011-09-13 Stefano Lattarini <address@hidden>
docs: document Solaris 10 /bin/ksh and XPG4 sh 'unset' bug
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 90ab4b9..3d99012 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -20256,14 +20256,37 @@ However, this rule leads to real problems in
practice. For example, if
the source directory contains an ordinary file named @file{test} that is
used in a dependency, Solaris @command{make} rewrites commands like
@samp{if test -r foo; @dots{}} to @samp{if ../pkg/src/test -r foo;
address@hidden, which is typically undesirable. To avoid this problem,
-portable makefiles should never mention a source file whose name is that
-of a shell keyword like @file{until} or a shell command like
address@hidden or @command{gcc} or @command{test}.
-
-Because of these problems GNU @command{make} and many other
address@hidden implementations do not rewrite commands, so portable
-makefiles should
address@hidden, which is typically undesirable. In fact, @command{make} is
+completely unaware of shell syntax used in the rules, so the VPATH
+rewrite can potentially apply to @emph{any} whitespace-separated word
+in a rule, including shell variables, functions, and keywords.
+
address@hidden
+$ @kbd{mkdir build}
+$ @kbd{cd build}
+$ @kbd{cat > Makefile <<'END'}
+VPATH = ..
+all: arg func for echo
+ func () @{ for arg in "$$@@"; do echo $$arg; done; @}; \
+ func "hello world"
+END
+$ @kbd{touch ../arg ../func ../for ../echo}
+$ @kbd{make}
+../func () @{ ../for ../arg in "$@@"; do ../echo $arg; done; @}; \
+../func "hello world"
+sh: syntax error at line 1: `do' unexpected
+*** Error code 2
address@hidden example
+
address@hidden
+To avoid this problem, portable makefiles should never mention a source
+file or dependency whose name is that of a shell keyword like @file{for}
+or @file{until}, a shell command like @command{cat} or @command{gcc} or
address@hidden, or a shell function or variable used in the corresponding
address@hidden recipe.
+
+Because of these problems GNU @command{make} and many other @command{make}
+implementations do not rewrite commands, so portable makefiles should
search @code{VPATH} manually. It is tempting to write this:
@smallexample
hooks/post-receive
--
GNU Autoconf source repository
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Autoconf source repository branch, master, updated. v2.68-88-g19951ff,
Stefano Lattarini <=