[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: uninstalling relocation wrappers
From: |
Ben Pfaff |
Subject: |
Re: uninstalling relocation wrappers |
Date: |
Sun, 13 Jun 2010 15:27:29 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Ralf Wildenhues <address@hidden> writes:
> * Ben Pfaff wrote on Thu, Jun 10, 2010 at 07:06:53AM CEST:
>> +if RELOCATABLE_VIA_LD
>> + @:
>> +else
>> + if test $(RELOCATABLE) = yes; then \
>> + case '$(EXEEXT)' in \
>> + .bin*) ;; \
>> + *) $(MAKE) uninstall EXEEXT=.bin$(EXEEXT) ;; \
>
> With recursive make commands in your makefile, the overriding of EXEEXT
> on the command line here will work reliably with GNU make only. Problem
> is, `env EXEEXT=.bin$(EXEEXT) $(MAKE) -e uninstall' is dangerous, too,
> for other bits in the environment can be a problem. Might as well live
> with it and document the limitation, I guess.
Hmm. I had not noticed this limitation. I don't like it very
much.
Here's a new formulation that adds "SUBDIRS=" to the $(MAKE)
command line and instructs maintainers to include the Automake
fragment in every Makefile.am, instead of just the top-level
one. Does that approach sound reliable?
Thanks,
Ben.
--8<--------------------------cut here-------------------------->8--
>From 4400cbc2522c05b43d221746b28eedd9f966a58c Mon Sep 17 00:00:00 2001
From: Ben Pfaff <address@hidden>
Date: Sun, 13 Jun 2010 15:23:44 -0700
Subject: [PATCH] Provide means to uninstall ".bin" files installed by
relocwrapper.
* build-aux/relocwrapper.am: New file.
* doc/relocatable-maint.texi: Explain how to use relocwrapper.am.
* modules/relocatable-prog-wrapper: Add relocwrapper.am to file
list.
---
ChangeLog | 8 ++++++++
build-aux/relocwrapper.am | 19 +++++++++++++++++++
doc/relocatable-maint.texi | 8 ++++++++
modules/relocatable-prog-wrapper | 1 +
4 files changed, 36 insertions(+), 0 deletions(-)
create mode 100644 build-aux/relocwrapper.am
diff --git a/ChangeLog b/ChangeLog
index e6000b2..7496a1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-06-09 Ben Pfaff <address@hidden>
+
+ Provide means to uninstall ".bin" files installed by relocwrapper.
+ * build-aux/relocwrapper.am: New file.
+ * doc/relocatable-maint.texi: Explain how to use relocwrapper.am.
+ * modules/relocatable-prog-wrapper: Add relocwrapper.am to file
+ list.
+
2010-06-10 Ben Pfaff <address@hidden>
Properly check for strtod() when cross-compiling.
diff --git a/build-aux/relocwrapper.am b/build-aux/relocwrapper.am
new file mode 100644
index 0000000..a6c412d
--- /dev/null
+++ b/build-aux/relocwrapper.am
@@ -0,0 +1,19 @@
+## Include this file into each Makefile.am that has binary targets to ensure
+## that "make uninstall" removes ".bin" files installed by install-reloc when
+## --enable-relocatable is used on a platform that does not support relocation
+## in the dynamic linker. See doc/relocatable-maint.texi in the Gnulib source
+## tree for more information.
+
+uninstall-hook: uninstall-relocwrapper
+uninstall-relocwrapper:
+if RELOCATABLE_VIA_LD
+ @:
+else
+ if test $(RELOCATABLE) = yes; then \
+ case '$(EXEEXT)' in \
+ .bin*) ;; \
+ *) $(MAKE) uninstall EXEEXT=.bin$(EXEEXT) SUBDIRS= ;; \
+ esac; \
+ fi
+endif
+.PHONY: uninstall-relocwrapper
diff --git a/doc/relocatable-maint.texi b/doc/relocatable-maint.texi
index 58160cf..e9cf31f 100644
--- a/doc/relocatable-maint.texi
+++ b/doc/relocatable-maint.texi
@@ -145,6 +145,14 @@ foo_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)`
endif
@end example
+Also, in every such @file{Makefile.am}, add the following, replacing
address@hidden, if necessary, by the directory where
address@hidden places auxiliary build tools:
+
address@hidden
+include $(top_srcdir)/build-aux/relocwrapper.am
address@hidden example
+
@item
You may also need to add a couple of variable assignments to your
@file{configure.ac}.
diff --git a/modules/relocatable-prog-wrapper b/modules/relocatable-prog-wrapper
index de77830..8376165 100644
--- a/modules/relocatable-prog-wrapper
+++ b/modules/relocatable-prog-wrapper
@@ -4,6 +4,7 @@ that depend on shared libraries installed with the same
installation prefix.
Files:
build-aux/install-reloc
+build-aux/relocwrapper.am
lib/relocwrapper.c
lib/progname.h
lib/progname.c
--
1.7.1
--
"Then, I came to my senses, and slunk away, hoping no one overheard my
thinking."
--Steve McAndrewSmith in the Monastery