unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* PATCH for guile-readline/Makefile.am
@ 2004-01-07 21:56 Richard Todd
  2004-01-10 19:41 ` Kevin Ryde
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Richard Todd @ 2004-01-07 21:56 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 998 bytes --]

Please consider the following patch for inclusion in guile.

Problem: The guile-readline/Makefile unconditionally removes and
remakes a link from ice-9/readline.scm to ../readline.scm.  There are
two problems with this:

1) When you run, say, 'sudo make install', the link is remade as root!
2) When you run a VPATH build, ../readline.scm does not exist.

You'd only notice (2) if you wanted to test (ice-9 readline) prior to
installation.  You notice (1) quite often if you want to remove your
build tree, or even if you 'sudo make install' and then 'make' as a
normal user again.

The patch fixes both these issues.  It was a bit tricky, and I could
not find a single 'ln -s' line that worked for both in-tree builds and
VPATH builds (it's harder than it sounds!).  The patch just does an
'if' on $(top_srcdir) == $(top_builddir) and issues the correct
command.

If you don't like this method and can find a better way, please do so,
because we need a change to this file!

thanks,

Richard Todd

[-- Attachment #1.1.2: rdln.patch --]
[-- Type: text/plain, Size: 1015 bytes --]

--- orig/guile-core/guile-readline/ChangeLog
+++ mod/guile-core/guile-readline/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-07  Richard Todd  <richardt@vzavenue.net>
+
+	* Makefile.am (ice-9/readline.scm): link to $srcdir, so VPATH builds 
+	work.  Make the link depend on the source file, so that it doesn't 
+	get re-made as a root link during 'sudo make install', for instance.
+
 2003-05-04  Marius Vollmer  <mvo@zagadka.de>
 
 	* configure.in: When checking whether readline clears SA_RESTART,


--- orig/guile-core/guile-readline/Makefile.am
+++ mod/guile-core/guile-readline/Makefile.am
@@ -57,11 +57,15 @@
 
 CLEANFILES = *.x
 
-ice-9/readline.scm:
+ice-9/readline.scm: readline.scm
 	-rm ice-9/readline.scm
 	-rmdir ice-9
 	mkdir ice-9
-	cd ice-9 && ln -s ../readline.scm
+	if [ "$(top_srcdir)" == "$(top_builddir)" ] ; then \
+             (cd ice-9 && $(LN_S) ../$<)  \
+        else \
+             (cd ice-9 && $(LN_S) $<) \
+        fi
 
 all-local: ice-9/readline.scm
 




[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel

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

end of thread, other threads:[~2004-01-21 21:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-07 21:56 PATCH for guile-readline/Makefile.am Richard Todd
2004-01-10 19:41 ` Kevin Ryde
2004-01-10 20:57   ` Marius Vollmer
2004-01-10 23:48 ` Marius Vollmer
2004-01-13 17:38   ` Rob Browning
2004-01-14  0:51     ` Marius Vollmer
2004-01-14  7:41       ` Rob Browning
2004-01-19 18:13       ` Rob Browning
2004-01-19 22:29         ` Kevin Ryde
2004-01-20  6:23           ` Rob Browning
2004-01-20  6:49             ` Rob Browning
2004-01-21 21:31               ` Kevin Ryde
2004-01-14 20:50 ` Kevin Ryde
2004-01-15  1:17   ` Richard Todd
2004-01-16  6:42     ` Rob Browning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).