[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT
From: |
Jim Meyering |
Subject: |
[PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT |
Date: |
Sun, 03 Oct 2010 12:35:57 +0200 |
* 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
- [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT,
Jim Meyering <=
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Ralf Wildenhues, 2010/10/03
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Jim Meyering, 2010/10/03
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Ralf Wildenhues, 2010/10/03
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Jim Meyering, 2010/10/04
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Stefano Lattarini, 2010/10/04
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Jim Meyering, 2010/10/04
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Stefano Lattarini, 2010/10/04
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Jim Meyering, 2010/10/04
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Stefano Lattarini, 2010/10/05
- Re: [PATCH] dist-xz: don't hard-code -9: honor setting of XZ_OPT, Ralf Wildenhues, 2010/10/05