[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hobbit-1.4.1 patch to allow runtime libtool selection
From: |
Thien-Thi Nguyen |
Subject: |
hobbit-1.4.1 patch to allow runtime libtool selection |
Date: |
Mon, 11 Aug 2003 16:49:33 +0200 |
guile-1.4.1.93 includes a libtool snapshot so the following
patch makes hobbit able to use that. for example:
$ cd ~/build/thud
$ HOBBIT_LIBTOOL="guile-tools guile-libtool" make
thud's configure.in will end up handling this automagically; this
example is manual for demonstration purposes only. for your own
hobbit-using projects, you can of course use your own local libtool.
thi
__________________________________________________
2003-08-11 Thien-Thi Nguyen <address@hidden>
* hob.in (libtool): New proc to consult env var
HOBBIT_LIBTOOL to override simple "libtool".
(cree-object, cree-exec, cree-dump): Use new proc
instead of hard-coding "libtool".
_____________________________________________________
cd ~/local/src/.ttn/build/guile-hobbit-1.4.1/
diff -bwu hob.in.ORIG hob.in
--- hob.in.ORIG Mon Aug 11 16:27:31 2003
+++ hob.in Mon Aug 11 16:28:22 2003
@@ -82,6 +82,10 @@
(system str))
(system (string-append str " >/dev/null")))))
+(define (libtool)
+ (or (getenv "HOBBIT_LIBTOOL")
+ "libtool"))
+
(define (cree-object exec static output-dir executable dump biblio
executable-file library main-name c-name h-name
hobbit-home)
@@ -95,29 +99,34 @@
(LIBS-env (getenv "LIBS"))
(LIBS (if LIBS-env LIBS-env "")))
(and (= 0 (sys (string-append
- "libtool --mode=compile "
+ (libtool)
+ " --mode=compile "
CC " " CFLAGS
" -c -I" hobbit-home ;;; for guilehob.h during installation
" @GUILE_CFLAGS@ address@hidden@/share/@PACKAGE@ "
c-name)))
biblio
(= 0 (sys (string-append
- "libtool --mode=link "
+ (libtool)
+ " --mode=link "
CC " " CFLAGS " " static " -o "
la-name " -rpath " output-dir " " lo-name)))
(= 0 (sys (string-append
- "libtool --mode=install cp "
+ (libtool)
+ " --mode=install cp "
la-name " " output-dir "/" la-name " || :")))
(if executable (cree-exec exec library main-name static output-dir
CC CFLAGS LIBS executable-file la-name))
(if dump (cree-dump exec library main-name static dump
CC CFLAGS LIBS executable-file la-name))
(and (= 0 (sys (string-append
- "libtool --mode=uninstall "
+ (libtool)
+ " --mode=uninstall "
"rm -rf " lo-name)))
(if (not (string=? output-dir (getcwd)))
(= 0 (sys (string-append
- "libtool --mode=uninstall "
+ (libtool)
+ " --mode=uninstall "
"rm -rf " la-name)))))
)))
@@ -145,25 +154,29 @@
"{ gh_enter(argc,argv,your_main); }\n"))
(close-output-port port)
(and (= 0 (sys (string-append
- "libtool --mode=compile "
+ (libtool)
+ " --mode=compile "
CC " " CFLAGS
" -c @GUILE_CFLAGS@ address@hidden@/share/@PACKAGE@ "
wrapper-c)))
(= 0 (sys (string-append
- "libtool --mode=link "
+ (libtool)
+ " --mode=link "
CC " " static " -o "
(basename executable-file)
" " wrapper-lo " "
la-name " @GUILE_LDFLAGS@")))
(= 0 (sys (string-append
- "libtool --mode=install cp "
+ (libtool)
+ " --mode=install cp "
(basename executable-file)
" " (absolute
(string-append
output-dir "/"
executable-file)) " || :")))
(= 0 (sys (string-append
- "libtool --mode=uninstall "
+ (libtool)
+ " --mode=uninstall "
"rm -rf " wrapper-c " " wrapper-lo)))
)))
@@ -226,13 +239,15 @@
"/tguile-core.c "
wrapper-c))))
(= 0 (sys (string-append
- "libtool --mode=compile "
+ (libtool)
+ " --mode=compile "
CC " " CFLAGS " -DDUMP_INIT=\"" func
"\" -DDUMP_DECL=\"" decl "\""
" -c @GUILE_CFLAGS@ address@hidden@/share/@PACKAGE@ "
wrapper-c)))
(let ((chaine (string-append
- "libtool --mode=link "
+ (libtool)
+ " --mode=link "
CC " @TFLAGS@ " static " -o "
(basename executable-file)
" " wrapper-lo " "
@@ -261,14 +276,16 @@
" @prefix@/share/@PACKAGE@/libunexec.a "
LIBS " " libdir "/libguile.a @GUILE_LDFLAGS@")))))
(= 0 (sys (string-append
- "libtool --mode=install cp "
+ (libtool)
+ " --mode=install cp "
(basename executable-file)
" " (absolute
(string-append
"t"
executable-file)) " || :")))
(= 0 (sys (string-append
- "libtool --mode=uninstall "
+ (libtool)
+ " --mode=uninstall "
"rm -rf " wrapper-c " " wrapper-lo)))
(= 0 (sys (string-append
(absolute
Compilation exited abnormally with code 1 at Mon Aug 11 16:45:55
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- hobbit-1.4.1 patch to allow runtime libtool selection,
Thien-Thi Nguyen <=