automake
[Top][All Lists]
Advanced

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

Re: should an empty "pkgdata_DATA" cause creation of $(pkgdatadir) by "m


From: Stefano Lattarini
Subject: Re: should an empty "pkgdata_DATA" cause creation of $(pkgdatadir) by "make install"?
Date: Fri, 16 Mar 2012 23:04:51 +0100

Hi Bruno, sorry for the delay, thanks for your detailed reply.

On 03/13/2012 05:47 PM, Bruno Haible wrote:
> [Dropping bug-gnulib from CC.]
>
And now adding bug-automake.

References:

  Original thread on bug-gnulib:
  <http://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00078.html>

  Follow-up on the automake list:
  <http://lists.gnu.org/archive/html/automake/2012-03/msg00014.html>

  A related issue:
  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10997>


> Stefano Lattarini wrote:
>> So we're in a sort of a tie here: some users think that the current Automake
>> behaviour is a feature (and I lean toward that position), other ones (with
>> Ralf among them, apparently) believe it's a bug.  Hmmm.
> 
> The most important question in such a situation is: Can users who wish to
> have the opposite behaviour get it?
> 
> If the answer to this question is yes, then: What are the use-cases of these
> two behaviours? Are they sound? How many users do they affect?
> 
> About the first question:
> 
>   * If Automake does not create an empty directory by default, can users
>     get it created?
> 
>     Answer: Yes, they write a rule like this:
> 
>         installdirs-local:
>                 $(mkdir_p) $(DESTDIR)$(pkgdatadir)
>
Right, with the nit s/$(mkdir_p)/$(MKDIR_P)/ (the former variable has been
long-deprecated, and will be removed in automake 1.13).

>   * If Automake does create an empty directory by default, can users avoid
>     it?
> 
>     Answer: For users who generate their Makefile.am (like gnulib-tool), yes.
>     For users who use constructs like
> 
>         pkgdata_DATA =
>         if WINDOWS
>         pkgdata_DATA += documentation.chm
>         endif
>         if MACOS
>         pkgdata_DATA += bundle.nib
>         endif
> 
>     what is the answer? Can they write
> 
>         if WINDOWS || MACOS
>
Note that automake conditionals don't support conjunction nor disjunction ...

>         pkgdata_DATA =
>         if WINDOWS
>         pkgdata_DATA += documentation.chm
>         endif
>         if MACOS
>         pkgdata_DATA += bundle.nib
>         endif
>         endif
> 
>     Does this have the effect of avoiding an empty directory?
>
... so this idiom wouldn't even work :-(

And sadly, we have a much worse bug anyway, i.e., even this:

  if FALSE
  pkgdata_DATA = foo
  endif

will end up creating $(pkgdata)!  Issue already reported as bug#10997,
and already exposed in the testsuite (see 'instdir-cond.test').

>         pkgdata_DATA =
>         if WINDOWS
>         pkgdata_DATA += documentation.chm
>         endif
>         if MACOS
>         pkgdata_DATA += bundle.nib
>         endif
>         endif

> Second question:
> 
>   * Who needs to avoid an empty installation directory?
> 
>     I think, everyone who installs files conditionally. Can be many packages.
>
Makes sense, once s/needs to/might need to/.

>   * Who needs to create an empty installation directory?
> 
>     Hmm?
>
I must admit this is not a common requirement ...  Automake did this for a brief
time (now that it requires the system acdir to be existent), but the fact that 
we
were creating an *empty* directory kept bugging me so much that I ended up 
adding
a README file into it anyway ...

> Please fill in the remaining answers; I could only come up with partial
> answers.
> 
> Bruno
> 
You have convinced me that this behaviour is more a bug than a feature.

And since we have already seen some bug fixes in maint after 1.11.3, a fix for
this issue might warrant a 1.11.4 release ...

Regards,
  Stefano



reply via email to

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