From: Nils Steinger <nst@voidptr.de>
To: linux-btrfs@vger.kernel.org
Cc: Nils Steinger <nst@voidptr.de>, David Sterba <dsterba@suse.cz>
Subject: [PATCH v3] btrfs-progs: Add uninstall targets to Makefiles.
Date: Thu, 14 Aug 2014 21:36:48 +0200 [thread overview]
Message-ID: <1408045008-13399-2-git-send-email-nst@voidptr.de> (raw)
In-Reply-To: <1408045008-13399-1-git-send-email-nst@voidptr.de>
In-Reply-To: <20140627123201.GB1553@twin.jikos.cz>
Signed-off-by: Nils Steinger <nst@voidptr.de>
---
v2: As Satoru Takeuchi pointed out, I forgot to remove $(libs) in the main
Makefile.
v3: David Sterba suggested not to remove the $(bindir) and $(libdir), since
those might be needed by other programs, even if the btrfs uninstallation
leaves them empty.
Documentation/Makefile | 4 ++++
Makefile | 7 +++++++
2 files changed, 11 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..de5bd9e 100644
--- a/Makefile
+++ b/Makefile
@@ -257,6 +257,13 @@ $(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) $(libs)
+ cd $(DESTDIR)$(bindir); rm -f btrfsck fsck.btrfs $(progs)
+
ifneq ($(MAKECMDGOALS),clean)
-include $(objects:.o=.o.d) $(cmd-objects:.o=.o.d) $(subst .btrfs,, $(filter-out btrfsck.o.d, $(progs:=.o.d)))
endif
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-
next prev parent reply other threads:[~2014-08-14 19:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 19:48 [PATCH] btrfs-progs: Add uninstall targets to Makefiles Nils Steinger
2014-06-20 19:48 ` Nils Steinger
2014-06-23 1:57 ` Satoru Takeuchi
2014-06-23 2:23 ` [PATCH v2] " Nils Steinger
2014-06-23 2:33 ` Satoru Takeuchi
2014-06-23 15:04 ` David Sterba
2014-06-25 19:40 ` Nils Steinger
2014-06-27 12:32 ` David Sterba
2014-07-25 13:41 ` [PATCH v3] " n.st
2014-07-25 13:48 ` [PATCH v2] " Nils Steinger
2014-08-14 19:36 ` Nils Steinger [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-14 19:36 [PATCH v3] " Nils Steinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408045008-13399-2-git-send-email-nst@voidptr.de \
--to=nst@voidptr.de \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.