* lib/am/distdir.am (dist-xz): Do not hard-code xz's -9: that made it impossible to override. Instead, use its XZ_OPT envvar, defaulting to -9 if not defined. Thus no change in behavior when XZ_OPT is not set, and now, this rule honors the setting of that envvar when it is set. Suggested by Lasse Collin. ---
Lasse Collin raised this issue and suggested the fix. This is especially useful when you run "make dist" or "make distcheck" and just want it to complete quickly -- i.e., you don't require maximum compression because you're not about to distribute the resulting tarball, so the extra cycles to shave off 5-10% would be wasted. Personally, I will make the default for my projects be -7 or so, while for release, I automatically use -9ev already, by specifying XZ_OPT=-9ev in the rule that invokes "make dist". Let me know if you'd like a NEWS entry, or any other change. lib/am/distdir.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/am/distdir.am b/lib/am/distdir.am index a11d3a4..0cd07e0 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -363,7 +363,8 @@ dist-lzma: distdir ?XZ?DIST_ARCHIVES += $(distdir).tar.xz .PHONY: dist-xz dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -9 -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) \ + | XZ_OPT=$${XZ_OPT--9} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z -- 1.7.3.1.45.g9855b