2009-10-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Improve description of the various *LINK variables.
+ * doc/automake.texi (Program and Library Variables): _LINK also
+ receives libraries to link against. _LINK may be generated.
+ (Program Variables): Document reasons when per-target _LINK is
+ used instead of LINK.
+ (How the Linker is Chosen): Document how a per-target _LINK
+ variable and per-target link flags override linker selection.
+ * THANKS: Update.
+ Report by Dave Korn against gcc/libstdc++-v3.
+
Allow variable override of, rather than by, silent variables.
When overriding variables, check the VAR_SILENT status of the
old condition, not the new one: we allow non-silent overrides
Daniel Kahn Gillmor dkg@fifthhorseman.net
Daniel Richard G. danielg@teragram.com
Dave Brolley brolley@redhat.com
+Dave Korn dave.korn.cygwin@googlemail.com
Dave Morrison dave@bnl.gov
David A. Swierczek swiercze@mr.med.ge.com
David Byron dbyron@dbyron.com
linker is chosen according to the languages used by the program. For
instance, a program that includes C++ source code would use the C++
compiler to link. The @code{_LINK} variable must hold the name of a
-command that can be passed all the @file{.o} file names as arguments.
-Note that the name of the underlying program is @emph{not} passed to
-@code{_LINK}; typically one uses @samp{$@@}:
+command that can be passed all the @file{.o} file names and libraries
+to link against as arguments. Note that the name of the underlying
+program is @emph{not} passed to @code{_LINK}; typically one uses
+@samp{$@@}:
@example
maude_LINK = $(CCLD) -magic -o $@@
@end example
+If a @code{_LINK} variable is not supplied, it may still be generated
+and used by Automake due to the use of per-target link flags such as
+@code{_CFLAGS}, @code{_LDFLAGS} or @code{_LIBTOOLFLAGS}, in cases where
+they apply.
+
@item maude_CCASFLAGS
@itemx maude_CFLAGS
@itemx maude_CPPFLAGS
This is the command used to actually link a C program. It already
includes @samp{-o $@@} and the usual variable references (for instance,
@code{CFLAGS}); it takes as ``arguments'' the names of the object files
-and libraries to link in.
+and libraries to link in. This variable is not used when the linker is
+overridden with a per-target @code{_LINK} variable or per-target flags
+cause Automake to define such a @code{_LINK} variable.
@end vtable
more appropriately. @xref{Libtool Convenience Libraries}, for a
trick with @code{nodist_EXTRA_@dots{}_SOURCES}.
+A per-target @code{_LINK} variable will override the above selection.
+Per-target link flags will cause Automake to write a per-target
+@code{_LINK} variable according to the language chosen as above.
+
@node Fortran 9x Support
@comment node-name, next, previous, up