bug-automake
[Top][All Lists]
Advanced

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

Re: Lack of clarity in description of directory variables


From: Ralf Wildenhues
Subject: Re: Lack of clarity in description of directory variables
Date: Wed, 10 Jan 2007 20:03:52 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Reuben,

* Reuben Thomas wrote on Thu, Dec 21, 2006 at 10:28:53AM CET:
> >From the 1.9 manual:
> 
> `datarootdir'
>      The root of the directory tree for read-only
>      architecture-independent data files.  This should normally be
>      `/usr/local/share', but write it as `$(prefix)/share'.
>      [...]
> 
> `datadir'
>      [...]
>      This should normally be `/usr/local/share', but write it as
>      `$(datarootdir)'.  (If you are using Autoconf, write it as
>      address@hidden@.)
> 
> and similar for all the other variables under "Directory Variables".

Hmm, which documentation are you looking at?  Let's see:
Automake 1.9.x never knew about datarootdir, and 1.10 doesn't have the
above wording at all.  Some Autoconf versions may have had it, but the
current (2.61) one is different.  I guess you're looking at the GNU
Coding Standards (GCS), it has similar wording.

Here's a set of links to all three of them:
<http://sources.redhat.com/automake/automake.html#Standard-Directory-Variables>
<http://www.gnu.org/software/autoconf/manual/html_node/Installation-Directory-Variables.html>
<http://www.gnu.org/prep/standards/html_node/Directory-Variables.html>

> What puzzles me is the phrases "but write it as...": why in each case
> do you have to write the variable by using some other variable?

Well.  The GCS cannot assume that you use either Autoconf nor Automake.
The Autoconf manual cannot assume that you use Automake.  Only the
Automake manual can freely assume that you use Autoconf and that there
is a good chance that you aim to follow the GCS.

A bit complicated, I know.  ;-)

(For example, when using Automake, be encouraged to write $(datadir)
rather than @datadir@ in a Makefile.am.)

> A possible clue is given under the entry for `exec_prefix', where it says 
> instead:
> 
>      The default value of `exec_prefix' should be `$(prefix)'.
> 
> In other words, you're saying how to write *the default value* of the 
> variable in each case, not *the variable itself*. Hence, I would change a 
> sentence such as
> 
>      This should normally be `/usr/local/share', but write it as
>      `$(datarootdir)'.
> 
> to
> 
>      This defaults to `$(datarootdir)' (which is normally
>      `/usr/local/share').
> 
> If this needs more work to achieve both correctness and clarity I'd be 
> happy to help.

You should keep in mind that the GCS is written as a set of requirements
imposed on the developer, rather than as a set of guarantees for the
user of a package.  That said, I agree that the current wording is
suboptimal.  If you're willing to work out a better one, consistently
for the whole node, then I bet address@hidden will be open to
suggestions/patches.

Here's a link to the source file:
<http://cvs.savannah.gnu.org/viewcvs/*checkout*/gnulib/doc/make-stds.texi>

Cheers,
Ralf




reply via email to

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