automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: more cross refs around _DEPENDENCIES


From: Alexandre Duret-Lutz
Subject: FYI: more cross refs around _DEPENDENCIES
Date: Fri, 06 Jan 2006 01:45:11 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

2006-01-06  Alexandre Duret-Lutz  <address@hidden>

        * doc/automake.texi (Linking, Program and Library Variables):
        Mention the file extensions that usually appear in _DEPENDENCIES,
        and point to BUILT_SOURCES and example of _DEPENDENCIES uses.  A
        couple of people have been listing sources files in _DEPENDENCIES
        lately.

Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.124
diff -u -r1.124 automake.texi
--- doc/automake.texi   5 Jan 2006 23:47:36 -0000       1.124
+++ doc/automake.texi   6 Jan 2006 00:44:11 -0000
@@ -3214,9 +3214,18 @@
 @vindex maude_DEPENDENCIES
 It is also occasionally useful to have a program depend on some other
 target that is not actually part of that program.  This can be done
-using the @address@hidden variable.  Each program depends
-on the contents of such a variable, but no further interpretation is
-done.
+using the @address@hidden variable.  Each program
+depends on the contents of such a variable, but no further
+interpretation is done.
+
+Since these dependencies are associated to the link rule used to
+create the programs they should normally list files used by the link
+command.  That is @file{*.$(OBJEXT)}, @file{*.a}, or @file{*.la}
+files.  In rare cases you may need to add other kinds of files such as
+linker scripts, but @emph{listing a source file in
address@hidden is wrong}.  If some source file needs to be built
+before all the components of a program are built, consider using the
address@hidden variable instead (@pxref{Sources}).
 
 If @address@hidden is not supplied, it is computed by
 Automake.  The automatically-assigned value is the contents of
@@ -3227,6 +3236,9 @@
 cause an invalid value for @address@hidden to be
 generated.
 
address@hidden Sources} shows a situation where @code{_DEPENDENCIES}
+is useful.
+
 @cindex @code{LDADD} and @option{-l}
 @cindex @option{-l} and @code{LDADD}
 We recommend that you avoid using @option{-l} options in @code{LDADD}
@@ -4085,10 +4097,22 @@
 the compiler or linker flags).  @xref{Libtool Flags}.
 
 @item maude_DEPENDENCIES
-It is also occasionally useful to have a program depend on some other
-target that is not actually part of that program.  This can be done
-using the @code{_DEPENDENCIES} variable.  Each program depends on the
-contents of such a variable, but no further interpretation is done.
+It is also occasionally useful to have a target (program or library)
+depend on some other file that is not actually part of that target.
+This can be done using the @code{_DEPENDENCIES} variable.  Each
+targets depends on the contents of such a variable, but no further
+interpretation is done.
+
+Since these dependencies are associated to the link rule used to
+create the programs they should normally list files used by the link
+command.  That is @file{*.$(OBJEXT)}, @file{*.a}, or @file{*.la} files
+for programs; @file{*.lo} and @file{*.la} files for Libtool libraries;
+and @file{*.$(OBJEXT)} files for static libraries.  In rare cases you
+may need to add other kinds of files such as linker scripts, but
address@hidden a source file in @code{_DEPENDENCIES} is wrong}.  If
+some source file needs to be built before all the components of a
+program are built, consider using the @code{BUILT_SOURCES} variable
+(@pxref{Sources}).
 
 If @code{_DEPENDENCIES} is not supplied, it is computed by Automake.
 The automatically-assigned value is the contents of @code{_LDADD} or
@@ -4098,6 +4122,11 @@
 @samp{$(ALLOCA)}; these are left because it is known that they will not
 cause an invalid value for @code{_DEPENDENCIES} to be generated.
 
address@hidden is more likely used to perform conditional
+compilation using an @code{AC_SUBST} variable that contains a list of
+objects.  @xref{Conditional Sources}, and @ref{Conditional Libtool
+Sources}.
+
 @item maude_LINK
 You can override the linker on a per-program basis.  By default the
 linker is chosen according to the languages used by the program.  For

-- 
Alexandre Duret-Lutz

Shared books are happy books.     http://www.bookcrossing.com/friend/gadl





reply via email to

[Prev in Thread] Current Thread [Next in Thread]