From f074c30f63df7f787cbea1e1438357f1140cde09 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 27 Jul 2005 19:05:43 +0000 Subject: * doc/automake.texi (Linking, Program and Library Variables): Suggest reserving -l for third-party libraries. --- ChangeLog | 5 +++++ doc/automake.texi | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index f5210b884..f82fb6c42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-07-27 Alexandre Duret-Lutz + + * doc/automake.texi (Linking, Program and Library Variables): + Suggest reserving -l for third-party libraries. + 2005-07-27 Stepan Kasal * doc/automake.texi (Auxiliary Programs): Fix a typo. diff --git a/doc/automake.texi b/doc/automake.texi index af6e97d07..3ccacdcab 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -2858,6 +2858,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 @@ -3659,6 +3669,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. -- cgit v1.2.1