bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: libexecdir/datadir used incorrectly


From: Alexandre Duret-Lutz
Subject: Re: libexecdir/datadir used incorrectly
Date: Mon, 07 Feb 2005 20:50:57 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

>>> "Karl" == Karl Berry <address@hidden> writes:
[...]
 >    make datadir=FOO
 > should the data files go into FOO or into FOO/awk?  With your

 Karl> FOO.  If you said make datarootdir=FOO, they'd go into FOO/awk.

I respectfully disagree.  For several reasons.

1. The two commands
    ./configure; make datadir=FOO install
  and
    ./configure --datadir=FOO; make install
  should install the files in the same place.

2. It is wrong to override the value of datadir in a Makefile.am.
   a) it breaks the above
   b) the GCS explicitly states how this Makefile variable should be defined:
      ``If you are using Autoconf, write it as address@hidden@''
      so don't define it as @datadir@/awk

3. The meaning of datadir has not been changed with the introduction of
   datarootdir.  Or more precisely, datarootdir was introduced so that
   the meaning of datadir would not change!

If memory serves, the story of the last point is as follows
(someone can dig it out of the gnuprogdiscuss archives if necessary,
there was a long debate about the name of datarootdir):

* $(datadir) used to map to $(prefix)/share/, and packages were writing there
  files in $(datadir)/package/.  (Actually Automake defines $(pkgdatadir)
  for exactly this purpose.)   
 
  On a FHS-compliant system, you would install a package with --prefix=/usr,
  unless it was a game, in which case you'd need 
  --prefix=/usr --datadir=/usr/share/games (because game data are expected
  there).

* $(infodir) and $(mandir) were previously defined as $(prefix)/info and
  $(mandir)/man, and some people suggested these be redefined as
  $(datadir)/info and $(datadir)/man.  That didn't work, because it would
  have left no possibility to relocate only the data directory as in the
  ideosyncratic data files as in the past.

* Hence the introduction of $(datarootdir): to hold $(infodir), $(mandir),
  $(datadir), etc., leaving $(datadir) intact.


Thus IMHO 

  1. Alfred's patch was correct.
     (modulo the gawk->awk renaming -- which prevent the use
     of $(pkgdatadir))
     (you could also omit entirely the redefinition of datadir
     and libexecdir, Automake already defines them correctly)

  2. Maybe the GCS need to state more clearly that packages
     should not install data directly in $(datadir), but rather
     do so in a subdirectory, because the definition of
     $(datadir) is the same for all projects.     

  3. For the files we consider (those installed in $(datadir)),
     overriding datarootdir or datadir from the command line
     should have the same effect (because datadir =
     $(datarootdir) by definition).
-- 
Alexandre Duret-Lutz





reply via email to

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