automake-ng
[Top][All Lists]
Advanced

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

Re: [Automake-NG] [PATCH v2 2/2] dist: add back support for obsolete dis


From: Stefano Lattarini
Subject: Re: [Automake-NG] [PATCH v2 2/2] dist: add back support for obsolete dist-* options
Date: Wed, 22 Aug 2012 14:23:53 +0200

On 08/22/2012 02:07 PM, Paolo Bonzini wrote:
> Il 22/08/2012 14:03, Stefano Lattarini ha scritto:
>>>> I'm a bit confused as to where to draw the line between Automake and GNU
>>>> make...
>>>>
>> It depends.  A rule of thumb is that, when Automake *must* process something
>> at automake runtime (as is certainly the case with options!), and want to 
>> pass
>> it in the generated Makefiles as well (for possible further processing 
>> there),
>> it can as well "massage" it in a form that make its use in those Makefiles
>> as simple and natural as possible.
>>
>> For example, take a look at this fragment in '&generate_makefile' :
>>
>>     # Must come after invocation of handle_programs, handle_libraries and
>>     # handle_ltlibraries, so that %known_programs and %known_libraries are
>>     # up-to-date.
>>     define_variable 'am.all-progs',  INTERNAL, sort keys %known_programs;
>>     define_variable 'am.all-libs',   INTERNAL, sort keys %known_libraries;
>>     define_variable 'am.all-ltlibs', INTERNAL, sort keys %known_ltlibraries;
>>
>> Those variables could as well be defined purely at make runtime, by
>> peeking into $(.VARIABLES) and munging it properly.  But since we
>> currently *need* '%known_programs' etc. at automake runtime anyway,
>> we make life simpler and pass on that knowledge directly into the
>> generated Makefiles.
> 
> True, but in the make dist case, automake has otherwise no business in
> parsing the dist-format options.
>
But IMHO it makes sense to keep the need/ability to recognize those options
"segregated" in '_process_option_list', rather than spread throughout the
code base.  The rest of the code (whether in the automake script or in
the generated makefiles) should only be aware that "such and such dist
formats have been specified through means other than the AM_DIST_FORMATS
variable", not needing to worry about the details of such specifications
("dist-xz has been given in AM_INIT_AUTOMAKE, and no-dist-gzip has been
given in AUTOMAKE_OPTIONS").

> All it has to do is to raise a warning, it doesn't record them in a
> data structure that is specific to dist formats.
> 
> Paolo

Regards,
  Stefano



reply via email to

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