From: Ralf Wildenhues Date: Thu, 21 May 2009 12:18:39 +0000 (+0200) Subject: Document VPATH = $(variable) issue in VPATH chapter. X-Git-Tag: v2.64~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35e67f5c0d5e002ce91ffed734bb6f8db1eceb45;p=thirdparty%2Fautoconf.git Document VPATH = $(variable) issue in VPATH chapter. * doc/autoconf.texi (Variables listed in VPATH): New node. (Top, VPATH and Make): Adjust menus. (Build Directories): Refer to it. Prompted by report from Bruno Haible. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 64058cb86..73fc4834c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-05-21 Ralf Wildenhues + + Document VPATH = $(variable) issue in VPATH chapter. + * doc/autoconf.texi (Variables listed in VPATH): New node. + (Top, VPATH and Make): Adjust menus. + (Build Directories): Refer to it. + Prompted by report from Bruno Haible. + 2009-05-19 Eric Blake Update uses of all-permissive license. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 7f0440800..a26b1b75e 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -519,6 +519,7 @@ Portable Make Programming @code{VPATH} and Make +* Variables listed in VPATH:: @code{VPATH} must be literal on ancient hosts * VPATH and Double-colon:: Problems with @samp{::} on ancient hosts * $< in Explicit Rules:: @code{$<} does not work in ordinary rules * Automatic Rule Rewriting:: @code{VPATH} goes wild on Solaris @@ -2953,9 +2954,8 @@ srcdir = @@srcdir@@ VPATH = @@srcdir@@ @end example -Do not set @code{VPATH} to the value of another variable, for example -@samp{VPATH = $(srcdir)}, because some versions of @command{make} do not do -variable substitutions on the value of @code{VPATH}. +Do not set @code{VPATH} to the value of another variable (@pxref{Variables +listed in VPATH}. @command{configure} substitutes the correct value for @code{srcdir} when it produces @file{Makefile}. @@ -18028,6 +18028,7 @@ Here are some known issues with some @code{VPATH} implementations. @menu +* Variables listed in VPATH:: @code{VPATH} must be literal on ancient hosts * VPATH and Double-colon:: Problems with @samp{::} on ancient hosts * $< in Explicit Rules:: @code{$<} does not work in ordinary rules * Automatic Rule Rewriting:: @code{VPATH} goes wild on Solaris @@ -18035,6 +18036,25 @@ implementations. * Make Target Lookup:: More details about @code{VPATH} lookup @end menu +@node Variables listed in VPATH +@subsection Variables listed in @code{VPATH} +@cindex @code{VPATH} and variables +@cindex variables and @code{VPATH} + +Do not set @code{VPATH} to the value of another variable, for example +@samp{VPATH = $(srcdir)}, because some ancient versions of +@command{make} do not do variable substitutions on the value of +@code{VPATH}. For example, use this + +@example +srcdir = @@srcdir@@ +VPATH = @@srcdir@@ +@end example + +@noindent +rather than @samp{VPATH = $(srcdir)}. Note that with @acronym{GNU} +Automake, there is no need to set this yourself. + @node VPATH and Double-colon @subsection @code{VPATH} and Double-colon Rules @cindex @code{VPATH} and double-colon rules