bug-automake
[Top][All Lists]
Advanced

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

bug#14126: dist_EXTRA_SCRIPTS


From: Stefano Lattarini
Subject: bug#14126: dist_EXTRA_SCRIPTS
Date: Sat, 20 Apr 2013 14:43:27 +0200

severity 14126 minor
stop

Hi Nick, Дилян, sorry for the delay.

On 04/02/2013 11:50 PM, Nick Bowler wrote:
> On 2013-04-02 21:32 +0200, Дилян Палаузов wrote:
>> As of Automake 1.13.1, in the documentaion, in node The Uniform Naming 
>> Scheme, last paragraph:
>>
>>       Some primaries also allow additional prefixes that control other
>>    aspects of `automake''s behavior.  The currently defined prefixes are
>>    `dist_', `nodist_', `nobase_', and `notrans_'.  These prefixes are
>>    explained later (*note Program and Library Variables::) (*note Man
>>    Pages::).
>>
>> is not written, which primaries allow additional prefixes, and which do 
>> not allow.
>>
>> Moreover, I got confused by EXTRA_ , dist_ and _SCRIPTS.  "EXTRA_SCRIPTS 
>> = file" is legal, as is "dist_EXTRA_SCRIPTS = file" .  According to my 
>> expectations, the last shall mean, that on "make dist" the latter 
>> implies, that "file" is included in the tarball, but it isn't. 
>> Eventually, I had to use dist_noinst_SCRIPTS.
> 
> Disclaimer: I did not look closely at what Automake actually does.
> 
> I suspect the reason is that EXTRA_SCRIPTS doesn't really make a lot
> of sense, so nobody has ever tried it before.
>
More precisely, it has no usefulness whatsoever.  The 'EXTRA_' prefix [1]
is actually only needed to list objects, programs or libraries that may or
may not be built, depending on what configure decides; its use is required
because Automake must *statically* know (at Automake runtime) the entire
list of objects that may be built in order to generate a Makefile.in that
will work in all cases.  In all other cases, the use of 'EXTRA_' is
pointless.

  [1] With the exclusion of its use in the very ad-hoc variable EXTRA_DIST

> That would mean "the
> following scripts are not distributed, not installed, not built by
> default, and outside of the scope of any built-in Automake rules".
> In other words, it is saying that Automake doesn't have to do anything,
> so the expected behaviour is the same as if you did not write anything
> at all.
>
Exactly.  Perhaps Automake should catch this no-op constructs, and warn
against them?  WDYT?

> By that token, dist_EXTRA_SCRIPTS means "the only thing you need to do
> with these files is include them in the tarball".  There is already a
> variable for that: EXTRA_DIST.
>
While this is true, the use of the 'SCRIPTS' primary can also serve for
documentation purpose (sorta), explicitly stating that the listed files
are scripts.  While Automake might not care about that presently, the
idiom might help making the Makefile.am clearer to human readers.  That
said, the correct way to express the concept that "these files are scripts,
but you should not install them, only distribute them" is with the 'noinst_'
prefix, not the 'EXTRA_' prefix; so something like:

   dist_noinst_SCRIPTS = foo.sh


> I think Automake probably just ignores both versions (i.e., it treats
> them like ordinary make variables).
> 
>> Do I misread the documentation, that dist_EXTRA_SCRIPTS is wrong, or is 
>> it not written?
> 
> There is probably an improvement to be made (either to Automake or to
> the manual), since the documentation does say that there is an EXTRA
> version "for each primary" (which would include SCRIPTS) in §3.3:
> 
>   https://www.gnu.org/software/automake/manual/automake.html#Uniform
>
Still, the manual also says that:

  This variable is used to list objects that may or may not be built,
  depending on what configure decides. This variable is required because
  Automake must statically know the entire list of objects that may be
  built in order to generate a Makefile.in that will work in all cases.

Maybe we should find a way to stress the point that any use of 'EXTRA_'
that does not cater to this situation is pointless?

Regards,
  Stefano





reply via email to

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