On 03/13/2012 08:55 AM, Robert Boehne 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.  What now?
>>
>> Regards,
>>    Stefano
> 
> I would agree with the "feature" camp.  Users should be able to create 
> an empty $(pkgdatadir) - suppose that empty directory is populated by
> other methods.  They should also be able to not create $(pkgdatadir) as
> well as a non-empty $(pkgdatadir).

I like the idea of installing empty directories by default, as a
feature, but can also see the arguments for omitting a directory.  What
about a compromise:

By default, we create the empty directory:

pkgdata_DATA =

But with the noinst flag, a directory can be specifically marked for no
creation unless it later has contents:

noinst_pkgdata_DATA =

For the sake of conditional concatenation, we should either allow:

noinst_pkgdata_DATA =
if COND
  pkgdata_DATA += file
endif

or else make the documentation explicit that to conditionally install
contents to a directory, but to omit the directory if no contents are
present, then you must do:

noinst_pkgdata_DATA =
pkgdata_DATA =
if COND
  pkgdata_DATA += file
endif

Either way, the semantics are that if there are contents in a directory,
then the directory is created; if the conditions make it so there are no
contents in a directory, then the directory is created _unless_ the
noinst_ prefix also appeared with that directory.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to