On 08/21/2012 06:24 PM, Paolo Bonzini wrote: > Il 12/08/2012 23:20, Stefano Lattarini ha scritto: >> The API to specify the formats of distribution tarballs has been changed >> completely, in a BACKWARD-INCOMPATIBLE way. >> >> Instead of using the various 'dist-*' automake options, the developer is >> now expected to specify the default formats of its distribution tarballs >> with the special variable AM_DIST_FORMATS; for example, where once would >> have been: >> >> AM_INIT_AUTOMAKE([dist-bzip2 dist-zip]) >> >> now it must be: >> >> AM_DIST_FORMATS = gzip bzip2 zip >> >> and similarly, where once would have been: >> >> AUTOMAKE_OPTIONS = no-dist-gzip dist-bzip2 dist-xz >> >> now is it simply: >> >> AM_DIST_FORMATS = bzip2 xz > > Nice, but I'm not sure why this couldn't have a backwards-compatible > replacement. > Because Automake-NG is not meant to be 100% backward compatible. If the transition from the old interface to the new one is trivial or even mechanic (like in this case IMHO), the old interface will simply be dropped (and a proper explanation and example will added to the NG-NEWS file, unless I stupidly forgot). Also (as I wrote some days ago in this list, not exactly sure where anymore), I see Automake-NG also as an occasion for de-crufting and API cleanups as well as for feature enhancing and better GNU make integration.
that said, however ... > ifeq ($(origin AM_DIST_FORMATS),undefined) > AM_DIST_FORMATS := \ > $(patsubst dist-%, %, $(filter dist-%, $(AUTOMAKE_OPTIONS)) \ > $(if $(filter no-dist-gzip, $(AUTOMAKE_OPTIONS)),,gzip) > endif > ... this is small and self-contained enough that I will accept and integrate it, if wrapped in a nice patch ;-) And since we'll leave it undocumented and "use at your own risk", not need to bother with testsuite additions for once (just add a warning in a comment saying that the code fragment is untested). Oh, and if you go this route, the errors given in 'Options.pm' at the sight of 'dist-*' and 'no-dist-*' options will need to be downgraded to warnings in the 'obsolete' category ... > This requires Automake-NG to merge AM_INIT_AUTOMAKE's arguments into > the Makefile.in's AUTOMAKE_OPTIONS, which is only goodness. > This might be done in a follow-up though. A project wanting to keep the difference between its Mainline-Automake and Automake-NG build systems at a minimum can move the 'dist-*' options from AM_INIT_AUTOMAKE into AUTOMAKE_OPTIONS in a preparatory patch anyway ... Regards, Stefano
