docs patches

Adriaan de Groot <adridg-FlD2LfDziEhmR6Xm/[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
this patch attempts to cover the attributes in a production command rather 
briefly. I suppose a table of targets and variables and whatnots needs to be 
added as well to the reference manual.

also, a patch to the libtool module that makes the filetype for programs with 
libtool match what the docs say.
docs.diff (text/x-diff, 4.4 KB)
Index: user-depend.sgml
===================================================================
RCS file: /cvsroot/a-a-p/Exec/doc/user-depend.sgml,v
retrieving revision 1.25
diff -u -3 -p -r1.25 user-depend.sgml
--- user-depend.sgml	5 Sep 2003 19:23:36 -0000	1.25
+++ user-depend.sgml	26 Oct 2003 19:18:06 -0000
@@ -208,6 +208,100 @@ alternative build command to build the p
   <link linkend="cmd-produce">:produce</link> command.
 </para>
 
+<bridgehead>Attributes for the Production Commands</bridgehead>
+
+<para>
+The production commands understand  wide variety of attributes.
+Let us return to the generic form
+of a production command:
+<programlisting>
+    <literal>:<replaceable>command</replaceable> <replaceable>targets</replaceable> : <replaceable>sources</replaceable></literal>
+</programlisting>
+There are four places attributes can be inserted in this
+command, as follows (we have split the command across several
+lines for clarity):
+<programlisting>
+1   <literal>:<replaceable>command</replaceable> { <replaceable>command-attributes</replaceable> }
+2       <replaceable>targets</replaceable> { <replaceable>per-target-attributes</replaceable> } : 
+3       { <replaceable>source-global-attributes</replaceable> }
+4       <replaceable>sources</replaceable> { <replaceable>per-source-attributes</replaceable> } </literal>
+</programlisting>
+</para>
+
+<para>
+There is one commonly-used command-attribute:
+<literal>installvar</literal>.
+The production commands add their targets to
+the variable named in this attribute.
+This defaults to the "normal" variable, as listed in 
+<xref linkend="installvar">.
+Assigning an empty value, through <literal>{ installvar = }</literal>,
+prevents a target from being installed at all.
+This is useful for internal helper programs and
+libraries used during the build process.
+</para>
+
+<note>
+You should use <literal>{ installvar = INSTALL_LTLIB }</literal>
+for program targets that have filetype ltprogram,
+since they need to be installed as if they are
+libtool libraries, not programs.
+</note>
+
+<warning>
+It is a bad idea (excepting ltprograms) to add targets
+to the wrong install variable, since the install
+action that gets called for it will be wrong then as well.
+</warning>
+
+
+<para>
+The attributes assigned in the per-target-attributes
+are used in the build and install actions of the target.
+Typical attributes assigned here are
+<literal>installdir<literal>
+and <literal>keepdir</literal>.
+Variables that affect the build step can be assigned
+too, such as
+<literal>var_LIBS</literal>
+and <literal>var_LDFLAGS</literal>.
+</para>
+
+
+<para>
+The attributes for sources are used for the compile steps
+of the build process, and useful attributes
+here are <literal>var_INCLUDE</literal>
+(if one source file needs special include files)
+and
+<literal>filetype</literal>.
+The attributes in the 
+source-global-attributes position apply to <emphasis>all</emphasis>
+the sources in the list, and 
+per-source-attributes apply only to the source file
+immediately preceding the attribute.
+</para>
+
+<para>
+An example that uses all of these settings is:
+<programlisting>
+1 :ltlib { installvar = } conduit_knotes.la
+2     { add_LIBS = -lkdeui } :
+3     { add_INCLUDE = -I$BDIR/knotes }
+4     knotes/KNotesIface.h { filetype=stub } { var_LTOBJSUF=_stub.lo }
+5     knotes/knotes-factory.cc
+</programlisting>
+Here we see a libtool library that is not installed (line 1),
+which must be linked with an additional library (line 2).
+All of the sources are compiled with an extra include directory (line 3).
+The first source file (line 4) has additional complications and
+uses a different compile action due to its filetype.
+The last source file (line 5) is compiled
+with normal flags extended only by the source-global-attribute
+on line 3.
+</para>
+
+
 <bridgehead>Rules And Dependencies</bridgehead>
 
 <para>
Index: user-install.sgml
===================================================================
RCS file: /cvsroot/a-a-p/Exec/doc/user-install.sgml,v
retrieving revision 1.14
diff -u -3 -p -r1.14 user-install.sgml
--- user-install.sgml	8 Sep 2003 19:28:28 -0000	1.14
+++ user-install.sgml	26 Oct 2003 19:18:08 -0000
@@ -219,7 +219,7 @@ This table shows the specific settings f
 the default install targets:
 </para>
 
-<table frame="none">
+<table frame="none" id="installvar">
   <title>Settings for the install target</title>
   <tgroup cols="7">
     <colspec colname="c1"/>
libtool.diff (text/x-diff, 945 B)
Index: libtool.aap
===================================================================
RCS file: /cvsroot/a-a-p/Exec/modules/libtool.aap,v
retrieving revision 1.5
diff -u -3 -p -r1.5 libtool.aap
--- libtool.aap	23 Oct 2003 21:18:29 -0000	1.5
+++ libtool.aap	26 Oct 2003 19:24:14 -0000
@@ -44,7 +44,7 @@ _top.INSTALL_LTLIB = ""
 # Declare a filetype to indicate that a program can be
 # built with libtool.
 :filetype
-    declare ltexe
+    declare ltprogram
 
 # Bram's version of the compile actions
 :action compile ltobject cpp
@@ -91,8 +91,8 @@ _top.INSTALL_LTLIB = ""
 
 # This rule is still here so you can use the { filetype= }
 # attribute to select to build a program with libtool or without.
-:action build ltexe default
-    :sys $LIBTOOL --silent --mode=link --tag=CXX
+:action build ltprogram default
+    :sys $LIBTOOL --mode=link --tag=CXX
                 g++ -o $target $source $LDFLAGS $?LTLIBS $?LIBS 
 
 
 # :do installtlib
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.