All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: Add uninstall targets to Makefiles
@ 2014-06-20 19:48 Nils Steinger
  2014-06-20 19:48 ` Nils Steinger
  0 siblings, 1 reply; 12+ messages in thread
From: Nils Steinger @ 2014-06-20 19:48 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nils Steinger

I compiled and installed the btrfs-progs from the git repo on several systems,
but later decided to switch back to the version from Debian's package
repository.
The Makefile did not contain an 'uninstall' target to complement 'install', so
I created one that reverses all changes made by 'install' (both in the main and
Documentation Makefiles).

Nils Steinger (1):
  btrfs-progs: Add uninstall targets to Makefiles.

 Documentation/Makefile | 4 ++++
 Makefile               | 9 +++++++++
 2 files changed, 13 insertions(+)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] btrfs-progs: Add uninstall targets to Makefiles.
  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
  0 siblings, 1 reply; 12+ messages in thread
From: Nils Steinger @ 2014-06-20 19:48 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nils Steinger

Signed-off-by: Nils Steinger <git@n-st.de>
---
 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
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] btrfs-progs: Add uninstall targets to Makefiles.
  2014-06-20 19:48 ` Nils Steinger
@ 2014-06-23  1:57   ` Satoru Takeuchi
  2014-06-23  2:23     ` [PATCH v2] " Nils Steinger
  0 siblings, 1 reply; 12+ messages in thread
From: Satoru Takeuchi @ 2014-06-23  1:57 UTC (permalink / raw)
  To: Nils Steinger, linux-btrfs

Hi Nils,

(2014/06/21 4:48), Nils Steinger wrote:
> Signed-off-by: Nils Steinger <git@n-st.de>
> ---
>   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)
> +

This code snippet looks good.

>   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)

You forgot to remove $(libs) here.

Thanks,
Satoru

> +	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
>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] btrfs-progs: Add uninstall targets to Makefiles.
  2014-06-23  1:57   ` Satoru Takeuchi
@ 2014-06-23  2:23     ` Nils Steinger
  2014-06-23  2:33       ` Satoru Takeuchi
  2014-06-23 15:04       ` David Sterba
  0 siblings, 2 replies; 12+ messages in thread
From: Nils Steinger @ 2014-06-23  2:23 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nils Steinger

Signed-off-by: Nils Steinger <git@n-st.de>
---

v2: As Satoru Takeuchi pointed out, I forgot to remove $(libs) in the main
Makefile.

 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..fe6a2f8 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) $(libs)
+	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
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] btrfs-progs: Add uninstall targets to Makefiles.
  2014-06-23  2:23     ` [PATCH v2] " Nils Steinger
@ 2014-06-23  2:33       ` Satoru Takeuchi
  2014-06-23 15:04       ` David Sterba
  1 sibling, 0 replies; 12+ messages in thread
From: Satoru Takeuchi @ 2014-06-23  2:33 UTC (permalink / raw)
  To: Nils Steinger, linux-btrfs

(2014/06/23 11:23), Nils Steinger wrote:
> Signed-off-by: Nils Steinger <git@n-st.de>

Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

> ---
> 
> v2: As Satoru Takeuchi pointed out, I forgot to remove $(libs) in the main
> Makefile.
> 
>   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..fe6a2f8 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) $(libs)
> +	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
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] btrfs-progs: Add uninstall targets to Makefiles.
  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
  1 sibling, 1 reply; 12+ messages in thread
From: David Sterba @ 2014-06-23 15:04 UTC (permalink / raw)
  To: Nils Steinger; +Cc: linux-btrfs

On Mon, Jun 23, 2014 at 04:23:48AM +0200, Nils Steinger wrote:
> +	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(man8dir)

> +	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(libdir)

> +	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(bindir)

I don't think it's right to remove the systemwide directories: bindir,
libdir and man8dir. There rest are btrfs subdirs (eg. incdir), that's
fine.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] btrfs-progs: Add uninstall targets to Makefiles.
  2014-06-23 15:04       ` David Sterba
@ 2014-06-25 19:40         ` Nils Steinger
  2014-06-27 12:32           ` David Sterba
  0 siblings, 1 reply; 12+ messages in thread
From: Nils Steinger @ 2014-06-25 19:40 UTC (permalink / raw)
  To: David Sterba; +Cc: linux-btrfs

On Mon, Jun 23, 2014 at 05:04:42PM +0200, David Sterba wrote:
> On Mon, Jun 23, 2014 at 04:23:48AM +0200, Nils Steinger wrote:
> > +	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(man8dir)
> 
> > +	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(libdir)
> 
> > +	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(bindir)
> 
> I don't think it's right to remove the systemwide directories: bindir,
> libdir and man8dir. There rest are btrfs subdirs (eg. incdir), that's
> fine.

On my system, man8dir didn't exist prior to the installation, so I
thought it would be reasonable to have the uninstallation routine remove
it. bindir and libdir will exist by default on most systems, so that's a
different case…
So, should we really keep the directories around, even if they were
created by the installation and are now empty (if they aren't, they
won't be removed anyway)?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] btrfs-progs: Add uninstall targets to Makefiles.
  2014-06-25 19:40         ` Nils Steinger
@ 2014-06-27 12:32           ` David Sterba
  2014-07-25 13:41             ` [PATCH v3] " n.st
                               ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: David Sterba @ 2014-06-27 12:32 UTC (permalink / raw)
  To: Nils Steinger; +Cc: David Sterba, linux-btrfs

On Wed, Jun 25, 2014 at 09:40:40PM +0200, Nils Steinger wrote:
> On Mon, Jun 23, 2014 at 05:04:42PM +0200, David Sterba wrote:
> > On Mon, Jun 23, 2014 at 04:23:48AM +0200, Nils Steinger wrote:
> > > +	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(man8dir)
> > 
> > > +	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(libdir)
> > 
> > > +	rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(bindir)
> > 
> > I don't think it's right to remove the systemwide directories: bindir,
> > libdir and man8dir. There rest are btrfs subdirs (eg. incdir), that's
> > fine.
> 
> On my system, man8dir didn't exist prior to the installation, so I
> thought it would be reasonable to have the uninstallation routine remove
> it.

According to the FHS [1] the manX directories do not have to exsit, so
this part shall stay.

> bindir and libdir will exist by default on most systems, so that's a
> different case…
> So, should we really keep the directories around, even if they were
> created by the installation and are now empty (if they aren't, they
> won't be removed anyway)?

But we don't track if the directories were created by the installation
or not.  Normally the directories would exist anyway (/usr or /usr/local
as prefix) and are expected to exist at the locations. Installation to
arbitraty directory works, but managing the directories is IMO up to the
user.

So are you ok with keeping bindir and libdir only (ie. removing only
man8dir)?

Thanks.

[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#USRSHAREMANMANUALPAGES
and then note #32

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v3] btrfs-progs: Add uninstall targets to Makefiles.
  2014-06-27 12:32           ` David Sterba
@ 2014-07-25 13:41             ` n.st
  2014-07-25 13:48             ` [PATCH v2] " Nils Steinger
  2014-08-14 19:36             ` [PATCH v3] " Nils Steinger
  2 siblings, 0 replies; 12+ messages in thread
From: n.st @ 2014-07-25 13:41 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nils Steinger, David Sterba

From: Nils Steinger <git@n-st.de>

Signed-off-by: Nils Steinger <git@n-st.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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] btrfs-progs: Add uninstall targets to Makefiles.
  2014-06-27 12:32           ` David Sterba
  2014-07-25 13:41             ` [PATCH v3] " n.st
@ 2014-07-25 13:48             ` Nils Steinger
  2014-08-14 19:36             ` [PATCH v3] " Nils Steinger
  2 siblings, 0 replies; 12+ messages in thread
From: Nils Steinger @ 2014-07-25 13:48 UTC (permalink / raw)
  To: linux-btrfs, David Sterba

I apologize for the long hiatus.

On Fri, Jun 27, 2014 at 02:32:01PM +0200, David Sterba wrote:
> On Wed, Jun 25, 2014 at 09:40:40PM +0200, Nils Steinger wrote:
> > On my system, man8dir didn't exist prior to the installation, so I
> > thought it would be reasonable to have the uninstallation routine remove
> > it.
> 
> According to the FHS [1] the manX directories do not have to exsit, so
> this part shall stay.
> 
> [1] http://www.pathname.com/fhs/pub/fhs-2.3.html#USRSHAREMANMANUALPAGES
> and then note #32
> 
> > bindir and libdir will exist by default on most systems, so that's a
> > different case…
> > So, should we really keep the directories around, even if they were
> > created by the installation and are now empty (if they aren't, they
> > won't be removed anyway)?
> 
> But we don't track if the directories were created by the installation
> or not.  Normally the directories would exist anyway (/usr or /usr/local
> as prefix) and are expected to exist at the locations. Installation to
> arbitraty directory works, but managing the directories is IMO up to the
> user.
> 
> So are you ok with keeping bindir and libdir only (ie. removing only
> man8dir)?

Yes, that should be sensible. I've updated my patch accordingly and
resubmitted it few minutes ago.

Regards,
Nils

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v3] btrfs-progs: Add uninstall targets to Makefiles.
@ 2014-08-14 19:36 Nils Steinger
  0 siblings, 0 replies; 12+ messages in thread
From: Nils Steinger @ 2014-08-14 19:36 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nils Steinger, David Sterba

I finally got around to applying David Sterba's suggestions about a
month ago, but when I sent my updated patch to the mailing list,
vger.kernel.org accepted and then silently dropped my mail, so I shelved
the patch for a while.
My new `filesystem df` patch just got through, so here's another try for
the Makefile patch.

Nils Steinger (1):
  btrfs-progs: Add uninstall targets to Makefiles.

 Documentation/Makefile | 4 ++++
 Makefile               | 7 +++++++
 2 files changed, 11 insertions(+)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v3] btrfs-progs: Add uninstall targets to Makefiles.
  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
  2 siblings, 0 replies; 12+ messages in thread
From: Nils Steinger @ 2014-08-14 19:36 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nils Steinger, David Sterba

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-

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-08-14 19:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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             ` [PATCH v3] " Nils Steinger
2014-08-14 19:36 Nils Steinger

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.