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. 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
