automake
[Top][All Lists]
Advanced

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

Re: Setting environment variable for make dist


From: Nick Bowler
Subject: Re: Setting environment variable for make dist
Date: Tue, 19 May 2015 09:17:53 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

Hello,

On 2015-05-18 16:10 +0800, Bas Vodde wrote:
> On 14 May 2015, at 9:24 pm, Nick Bowler <address@hidden> wrote:
> > But I think there is a solution: we can (ab)use the fact that 'make dist'
> > internally performs a recursive make invocation.  This gives us the chance
> > to add things to the make command line, using AM_MAKEFLAGS.  So putting
> > 
> >  AM_MAKEFLAGS = COPYFILE_DISABLE='$(COPYFILE_DISABLE)'
> > 
> > into Makefile.am should work I think (not tested), because variables
> > defined on the make command line *are* exported into the environment.
>
> I thought about it a bit and guess that this would *always* define the
> COPYFILE_DISABLE=1. That is, not just in “make dist” but also in other
> targets, correct?

The flags will be passed on recursive make invocations, so it will be
defined whenever that happens.

This includes targets like 'make all', 'make clean' and 'make dist', but
does not normally include targets like 'make src/foo.o'

> I think that isn’t what I want as I don’t want to go too much against
> the filesystem defaults, to avoid potential troubles :)

Does the COPYFILE_DISABLE=1 flag affect more than just the 'tar'
behaviour?  Then yeah, there may be potential troubles.  It would be
good to characterize the effects of this flag.

> Shouldn’t this be solved inside autotools itself? I guess it is
> something valid for every Mac user who creates a distribution on Mac….
> and I guess it is exactly these kind of OS differences autotools is
> trying to resolve?

This does sound like a portability problem that Automake could solve.
There is a related bug report[1].

With recent-ish versions of Automake you could try fitzing with the TAR
environment variable instead, together with a suitable configure test.
This might be trickier to get right, however.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9822

Regards,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)



reply via email to

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