2005-07-27 Alexandre Duret-Lutz <adl@gnu.org>
+ * doc/automake.texi (Linking, Program and Library Variables):
+ Suggest reserving -l for third-party libraries.
+
* lib/Automake/Variable.pm (require_variables): Mention aclocal's
search path when suggesting to add a macro in configure.ac.
People are confused when Automake suggests adding a macro (such as
cause an invalid value for @code{@var{prog}_DEPENDENCIES} to be
generated.
+@cindex @code{LDADD} and @option{-l}
+@cindex @option{-l} and @code{LDADD}
+We recommend that you avoid using @option{-l} options in @code{LDADD}
+or @code{@var{prog}_LDADD} when referring to libraries built by your
+package. Instead, write the file name of the library explicitly as in
+the above @code{cpio} example. Use @option{-l} only to list
+third-party libraries. If you follow this rule, the default value of
+@code{@var{prog}_DEPENDENCIES} will list all your local libraries and
+omit the other ones.
+
@node Conditional Sources
@subsection Conditional compilation of sources
maude_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS)
@end example
+We recommend that you use @option{-l} and @option{-L} only when
+referring to third-party libraries, and give the explicit file names
+of any library built by your package. Doing so will ensure that
+@code{maude_DEPENDENCIES} (see below) is correctly defined by default.
+
@item maude_LDFLAGS
This variable is used to pass extra flags to the link step of a program
or a shared library. It overrides the global @code{AM_LDFLAGS} variable.