From patchwork Thu Jan 12 17:14:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 9513933 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1CF1360476 for ; Thu, 12 Jan 2017 18:42:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12A83286A7 for ; Thu, 12 Jan 2017 18:42:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05D282870A; Thu, 12 Jan 2017 18:42:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F41D286A7 for ; Thu, 12 Jan 2017 18:42:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751026AbdALRPj (ORCPT ); Thu, 12 Jan 2017 12:15:39 -0500 Received: from sandeen.net ([63.231.237.45]:33862 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881AbdALROx (ORCPT ); Thu, 12 Jan 2017 12:14:53 -0500 Received: from [10.0.0.4] (liberator [10.0.0.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id 1437E5CCE4A for ; Thu, 12 Jan 2017 11:14:07 -0600 (CST) Subject: [PATCH 2/3] build: add .tar.xz target To: linux-xfs References: <056383cb-cf7e-3880-aecf-d97d5516a60f@sandeen.net> From: Eric Sandeen Message-ID: Date: Thu, 12 Jan 2017 11:14:52 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <056383cb-cf7e-3880-aecf-d97d5516a60f@sandeen.net> Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kup generates .xz files, and Fedora RPMs now use that. It'd be nice to have a handy target to generate .xz files locally, so hack that in. Signed-off-by: Eric Sandeen Reviewed-by: Bill O'Donnell --- I imagine there's a prettier way with wildcards or templates or whatnot, but my Make is rusty. Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 84dc62c..6e45733 100644 --- a/Makefile +++ b/Makefile @@ -26,18 +26,19 @@ endif SRCDIR = $(PKG_NAME)-$(PKG_VERSION) SRCTAR = $(PKG_NAME)-$(PKG_VERSION).tar.gz +SRCTARXZ = $(PKG_NAME)-$(PKG_VERSION).tar.xz CONFIGURE = aclocal.m4 configure config.guess config.sub install-sh ltmain.sh LSRCFILES = configure.ac release.sh README VERSION $(CONFIGURE) SRCTARINC = m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 \ m4/ltversion.m4 po/xfsprogs.pot .gitcensus $(CONFIGURE) LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \ - conftest* built .census install.* install-dev.* *.gz \ + conftest* built .census install.* install-dev.* *.gz *.xz \ autom4te.cache/* libtool include/builddefs include/platform_defs.h ifeq ($(HAVE_BUILDDEFS), yes) LDIRDIRT = $(SRCDIR) -LDIRT += $(SRCTAR) +LDIRT += $(SRCTAR) $(SRCTARXZ) endif # header install rules to populate include/xfs correctly @@ -165,6 +166,11 @@ $(SRCTAR) : default $(SRCTARINC) .gitcensus `cat .gitcensus` $(SRCTARINC) echo Wrote: $@ +$(SRCTARXZ) : default $(SRCTARINC) .gitcensus + $(Q)$(TAR) --transform "s,^,$(SRCDIR)/," -Jcf $(SRCDIR).tar.xz \ + `cat .gitcensus` $(SRCTARINC) + echo Wrote: $@ + .gitcensus: $(_FORCE) $(Q)if test -d .git; then \ git ls-files > .gitcensus && echo "new .gitcensus"; \