Hello Ralf and Eric,

I like the patch provided by Ralf.
(I see I protested in June, but that was silly; sorry.)

I would change wording:
use Automake -> are using Automake

Moreover, in the example below, I would change:
datadir.h -> myprog-paths.h

I think this is closer to practice.  For example, gnumeric uses
gnumeric-paths.h for this purpose.  If there are more dirs to be
passed to the program, having separate .h files seems weird.

Together, it would form the patch attached here.

But if you decide to reject one or both of the above nits, feel free
to commit anyway.

A note:

The current form of my bad feelings of this part of documentation is:
The nodes "Defining Directories" and "Installation Directory
Variables" should be reorganized.  Perhaps the common info that make
should eval the variables should go to a separate node, referred from
both.  The node "Installation Directory Variables" looks weird: long
list, short explanation, another list of advices; it should be
splitted.
I'd say that each node should contain either a long list or an
explanation of something.  At most, and exlpanation followed by a
related list.

Anyway, I don't think I'll be able to implement the above ideas
anytime soon, so it's wise to commit what we have.  I don't mean to
block it.

Have a nice day,
        Stepan
2007-08-21  Stepan Kasal  <[EMAIL PROTECTED]>
            Ralf Wildenhues  <[EMAIL PROTECTED]>

        * doc/autoconf.texi (Defining Directories): Mention
        AM_CPPFLAGS, as the way to modify CPPFLAGS when using Automake.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1165
diff -u -r1.1165 autoconf.texi
--- doc/autoconf.texi   20 Aug 2007 21:29:36 -0000      1.1165
+++ doc/autoconf.texi   21 Aug 2007 19:20:03 -0000
@@ -19170,11 +19170,18 @@
 @end example
 
 @noindent
-or create a dedicated header file:
+If you are using Automake, you should use @code{AM_CPPFLAGS} instead:
 
 @example
-DISTCLEANFILES = datadir.h
-datadir.h: Makefile
+AM_CPPFLAGS = -DDATADIR='"$(datadir)"'
[EMAIL PROTECTED] example
+
[EMAIL PROTECTED]
+Alternatively, create a header file:
+
[EMAIL PROTECTED]
+DISTCLEANFILES = myprog-paths.h
+myprog-paths.h: Makefile
         echo '#define DATADIR "$(datadir)"' >$@@
 @end example
 

Reply via email to