From patchwork Fri Jun 20 19:48:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nils Steinger X-Patchwork-Id: 4392251 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 6E6C8BEEAA for ; Fri, 20 Jun 2014 19:55:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE44720265 for ; Fri, 20 Jun 2014 19:55:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68FE6202EB for ; Fri, 20 Jun 2014 19:55:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753833AbaFTTzh (ORCPT ); Fri, 20 Jun 2014 15:55:37 -0400 Received: from ny.voidptr.de ([5.45.110.253]:39484 "EHLO ny.voidptr.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752240AbaFTTzg (ORCPT ); Fri, 20 Jun 2014 15:55:36 -0400 X-Greylist: delayed 435 seconds by postgrey-1.27 at vger.kernel.org; Fri, 20 Jun 2014 15:55:36 EDT Received: from beta (188-192-82-106-dynip.superkabel.de [188.192.82.106]) by ny.voidptr.de (Postfix) with ESMTPSA id 0509321E2E; Fri, 20 Jun 2014 21:48:21 +0200 (CEST) Received: (nullmailer pid 23611 invoked by uid 1000); Fri, 20 Jun 2014 19:48:21 -0000 From: Nils Steinger To: linux-btrfs@vger.kernel.org Cc: Nils Steinger Subject: [PATCH] btrfs-progs: Add uninstall targets to Makefiles. Date: Fri, 20 Jun 2014 21:48:05 +0200 Message-Id: <1403293685-23536-2-git-send-email-git@n-st.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1403293685-23536-1-git-send-email-git@n-st.de> References: <1403293685-23536-1-git-send-email-git@n-st.de> 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=ham 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 Signed-off-by: Nils Steinger --- Documentation/Makefile | 4 ++++ Makefile | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index 45299bb..5c9780b 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -76,6 +76,10 @@ install-man: man $(INSTALL) -m 644 $(GZ_MAN8) $(DESTDIR)$(man8dir) $(LNS) btrfs-check.8.gz $(DESTDIR)$(man8dir) +uninstall: + cd $(DESTDIR)$(man8dir); rm -f btrfs-check.8.gz $(GZ_MAN8) + rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(man8dir) + clean: $(RM) *.xml *.xml+ *.8 *.8.gz diff --git a/Makefile b/Makefile index 76565e8..4cafa37 100644 --- a/Makefile +++ b/Makefile @@ -257,6 +257,15 @@ $(INSTALLDIRS): @echo "Making install in $(patsubst install-%,%,$@)" $(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst install-%,%,$@) install +uninstall: + $(Q)$(MAKE) $(MAKEOPTS) -C Documentation uninstall + cd $(DESTDIR)$(incdir); rm -f $(headers) + rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(incdir) + cd $(DESTDIR)$(libdir); rm -f $(lib_links) + rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(libdir) + cd $(DESTDIR)$(bindir); rm -f btrfsck fsck.btrfs $(progs) + rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(bindir) + ifneq ($(MAKECMDGOALS),clean) -include $(objects:.o=.o.d) $(cmd-objects:.o=.o.d) $(subst .btrfs,, $(filter-out btrfsck.o.d, $(progs:=.o.d))) endif