summaryrefslogtreecommitdiffstats
path: root/Link.scm
diff options
context:
space:
mode:
authorJames LewisMoss <dres@debian.org>2000-03-12 09:04:17 -0500
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:26 -0800
commit8cfce36c6a4fc2e0a0ab6ef2db66a23cbe462693 (patch)
tree17427e4f777ca85990a449fe939fbae29770b346 /Link.scm
parenta47af30d2f0e96afcd1f14b1984575c359faa3d6 (diff)
parent3278b75942bdbe706f7a0fba87729bb1e935b68b (diff)
downloadscm-8cfce36c6a4fc2e0a0ab6ef2db66a23cbe462693.tar.gz
scm-8cfce36c6a4fc2e0a0ab6ef2db66a23cbe462693.zip
Import Debian changes 5d2-3debian/5d2-3
scm (5d2-3) unstable frozen; urgency=low * Fix libncurses4-dev -> libncurses5-dev build depend (Closes: #58435) * Fix libreadline2-dev -> libreadline4-dev build depend. * Fix license location in copyright file (lintian warning) * Add tetex-bin as a build depend (needs makeinfo) (Closes: #53197) * Add -isp option to dpkg-gencontrol (lintian error) * Move scm to section interpreters. scm (5d2-2) unstable; urgency=low * Apply patch from upstream for bug in eval.c. (Picked up from comp.lang.scheme) * Add Build-Depends on slib, librx1g-dev, libncurses4-dev, libreadlineg2-dev. * Up standards version. * Correct description: this is an R5RS implementation now * Make sure no optimizations are done on m68k. (Closes: #52434) scm (5d2-1) unstable; urgency=low * New upstream. scm (5d1-2) unstable; urgency=low * Remove TAGS on clean (cut the diff back down to reasonable size). scm (5d1-1) unstable; urgency=low * New upstream. * move stuff to /usr/share. scm (5d0-3) unstable; urgency=low * Change scmlit call to ./scmlit call (missed one) (Fixes bugs #37455 and #35545) * Change man file permissions to 644 (fixes lintian warning) scm (5d0-2) unstable; urgency=low * Removed call to add_final in init_crs. lendwin doesn't do anything and scm was crashing when quit everytime in final_scm. * Changed copyright to reflect new source. scm (5d0-1) unstable; urgency=low * New upstream. * Changed (terms) to access "/usr/doc/copyright/GPL". * Changed regex to use -lrx scm (5c3-6) unstable; urgency=low * New maintainer.
Diffstat (limited to 'Link.scm')
-rw-r--r--Link.scm80
1 files changed, 29 insertions, 51 deletions
diff --git a/Link.scm b/Link.scm
index a60fd02..c34d56e 100644
--- a/Link.scm
+++ b/Link.scm
@@ -1,18 +1,18 @@
-;; Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
-;;
+;; Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
+;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
-;;
+;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
-;;
+;;
;; You should have received a copy of the GNU General Public License
;; along with this software; see the file COPYING. If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111, USA.
;;
;; As a special exception, the Free Software Foundation gives permission
;; for additional uses of the text contained in its release of GUILE.
@@ -36,29 +36,11 @@
;;
;; If you write modifications of your own for GUILE, it is your choice
;; whether to permit this exception to apply to your modifications.
-;; If you do not wish that, delete this exception notice.
+;; If you do not wish that, delete this exception notice.
;;;; "Link.scm", Compiling and dynamic linking code for SCM.
;;; Author: Aubrey Jaffer.
-(define cc:command
- (let ((default "cc -c")) ;-O removed for HP-UX self-compile
- (case (software-type)
- ((unix) (if (memq 'sun-dl *features*)
- "gcc -g -O -fpic -c" ; If you have problems change -fpic to
- ; -fPIC (see GCC info pages).
- default))
- (else default))))
-
-(define link:command
- (case (software-type)
- (else "cc")))
-
-(define scm:object-suffix
- (case (software-type)
- ((MSDOS VMS) ".OBJ")
- (else ".o")))
-
;;; This is an unusual autoload because it should load either the
;;; source or compiled version if present.
(if (not (defined? hobbit)) ;Autoload for hobbit
@@ -74,30 +56,34 @@
(string-append "--compiler-options=-I" (implementation-vicinity))
"-c"
(begin (require 'glob)
- (replace-suffix file (scheme-file-suffix) ".c"))
+ ((filename:substitute?? (scheme-file-suffix) ".c") file))
"-hsystem"
)))
-(define (link-named-scm name . modules)
- (load (in-vicinity (implementation-vicinity) "build"))
- (let* ((iv (implementation-vicinity))
- (oss (string-append scm:object-suffix " "))
- (command
- (list "build" "--type=exe" "-cscm.c" "-hsystem"
- (string-append "--linker-options=-L" (implementation-vicinity))
- (apply string-append
- "-i"
- (map (lambda (n)
- (string-append "init_" n))
- modules))
+(define link-named-scm
+ (let ((scm:object-suffix (case (software-type)
+ ((MSDOS VMS) ".obj")
+ (else ".o"))))
+ (lambda (name . modules)
+ (load (in-vicinity (implementation-vicinity) "build"))
+ (let* ((iv (implementation-vicinity))
+ (oss (string-append scm:object-suffix " "))
+ (command
+ (append
+ (list "build" "--type=exe" "-cscm.c" "-hsystem"
+ ;; "-F" "compiled-closure" "inexact"
+ (string-append "--linker-options=-L"
+ (implementation-vicinity)))
+ (map (lambda (n) (string-append "-iinit_" n)) modules)
+ (list
(apply string-append
"-j"
(map (lambda (n)
(string-append n oss)) modules))
- "-o" name)))
- (cond ((>= (verbose) 3)
- (write command) (newline)))
- (build-from-whole-argv command)))
+ "-o" name))))
+ (cond ((>= (verbose) 3)
+ (write command) (newline)))
+ (build-from-whole-argv command)))))
;;;; Dynamic linking/loading
@@ -114,17 +100,9 @@
(define oloadpath *load-pathname*)
(let* ((sl (string-length file))
(lasl (string-length link:able-suffix))
- (*vicinity-suffix*
- (case (software-type)
- ((NOSVE) '(#\: #\.))
- ((AMIGA) '(#\: #\/))
- ((UNIX) '(#\/))
- ((VMS) '(#\: #\]))
- ((MSDOS ATARIST OS/2) '(#\\))
- ((MACOS THINKC) '(#\:))))
(fname (let loop ((i (- sl 1)))
(cond ((negative? i) file)
- ((memv (string-ref file i) *vicinity-suffix*)
+ ((vicinity:suffix? (string-ref file i))
(substring file (+ i 1) sl))
(else (loop (- i 1))))))
(nsl (string-length fname))
@@ -166,7 +144,7 @@
(define fil "")
(let loop ((i (- (string-length file) 1)))
(cond ((negative? i) (set! dir file))
- ((memv (string-ref file i) '(#\: #\]))
+ ((vicinity:suffix? (string-ref file i))
(set! dir (substring file 0 (+ i 1)))
(set! fil (substring file (+ i 1) (string-length file))))
(else (loop (- i 1)))))