From patchwork Fri Dec 12 12:35:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Zak X-Patchwork-Id: 5482071 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6660DBEEA8 for ; Fri, 12 Dec 2014 12:36:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3C47201BB for ; Fri, 12 Dec 2014 12:36:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DE7920172 for ; Fri, 12 Dec 2014 12:36:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967792AbaLLMgP (ORCPT ); Fri, 12 Dec 2014 07:36:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58041 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967780AbaLLMgL (ORCPT ); Fri, 12 Dec 2014 07:36:11 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBCCaBQU014223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 12 Dec 2014 07:36:11 -0500 Received: from x2.net.home (ovpn-113-55.phx2.redhat.com [10.3.113.55]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBCCaAuj030685; Fri, 12 Dec 2014 07:36:11 -0500 From: Karel Zak To: linux-btrfs@vger.kernel.org Cc: Karel Zak Subject: [PATCH 08/10] btrfs-progs: clean generated files, make version.h stuff more robust Date: Fri, 12 Dec 2014 13:35:22 +0100 Message-Id: <1418387724-20188-9-git-send-email-kzak@redhat.com> In-Reply-To: <1418387724-20188-1-git-send-email-kzak@redhat.com> References: <1418387724-20188-1-git-send-email-kzak@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP - add rule to generated version.h when any relevant stuff changed - add rule to clean generated files on "make clean-all" Signed-off-by: Karel Zak --- Makefile.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 58200ca..df752d3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -164,6 +164,10 @@ test: # static: $(progs_static) +version.h: version.sh version.h.in configure.ac + @echo " [SH] $@" + $(Q)bash ./config.status --silent $@ + $(libs_shared): $(libbtrfs_objects) $(lib_links) send.h @echo " [LD] $@" $(Q)$(CC) $(CFLAGS) $(libbtrfs_objects) $(LDFLAGS) $(LIBBTRFS_LIBS) \ @@ -271,14 +275,15 @@ test-build: manpages: $(Q)$(MAKE) $(MAKEOPTS) -C Documentation -clean-all: clean-doc clean + +clean-all: clean clean-doc clean-gen clean: $(CLEANDIRS) @echo "Cleaning" $(Q)rm -f $(progs) cscope.out *.o *.o.d \ dir-test ioctl-test quick-test send-test library-test library-test-static \ btrfs.static mkfs.btrfs.static \ - version.h $(check_defs) \ + $(check_defs) \ $(libs) $(lib_links) \ $(progs_static) $(progs_extra) @@ -286,6 +291,11 @@ clean-doc: @echo "Cleaning Documentation" $(Q)$(MAKE) $(MAKEOPTS) -C Documentation clean +clean-gen: + @echo "Cleaning Generated Files" + $(Q)rm -f version.h config.status config.cache connfig.log \ + configure.lineno config.status.lineno Makefile + $(CLEANDIRS): @echo "Cleaning $(patsubst clean-%,%,$@)" $(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst clean-%,%,$@) clean