From 874cbcf2353e0770d359739d91a348c9cb0f1d5d Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 27 Jul 2005 19:05:21 +0000 Subject: [PATCH] * doc/automake.texi (Linking, Program and Library Variables): Suggest reserving -l for third-party libraries. --- ChangeLog | 3 +++ doc/automake.texi | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 735b471fa..8272f1ac5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-07-27 Alexandre Duret-Lutz + * 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 diff --git a/doc/automake.texi b/doc/automake.texi index 085d76718..190c3896e 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -3226,6 +3226,16 @@ configure substitutions that are left in are only @samp{$(LIBOBJS)} and 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 @@ -4057,6 +4067,11 @@ could link your program against the X libraries like so: 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. -- 2.47.2