Subject: Re: bug#7656: MANS primary accepts too many prefixes.

From: Stefano Lattarini <[email-masked]>
Date: Fri, 17 Dec 2010 12:19:03 +0100

On Friday 17 December 2010, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Thu, Dec 16, 2010 at 10:51:15PM CET:
> > Currently, the MANS primary accept *all* the standard automake
> > builtin prefix dirs (from lib and bin to pkglibexec and sysconf).
> > 
> > IMHO it should accept only man and man{1..9} (maybe doc? but I'd
> > rather say no).
> 
> This one is less easy than the other one, but again the question to
> be answered is: is it completely and totally impossible that a developer
> has a decent use case for something you would like to forbid?  If no,
> then why forbid it?
>
Note that we won't really forbid it, we'll just require the developer
to be more explicit/verbose about what he's doing if that's a thing
that "smells fishy" to automake; for example, automake will be required
to error out on this:
  doc_MANS = foo.1
but not on this:
  my_mandir = $(docdir) # we want manpages installed in $(docdir) because ...
  my_man_MANS = foo.1

And note that the current automake already behaves this way with other
primaries such as `PROGRAMS', so that:
  lib_PROGRAMS = foo
gives an error, but:
  foodir = $(libdir)
  foo_PROGRAMS = foo
does not.  This is by design, and it's a good design IMHO.

Regards,
   Stefano