aboutsummaryrefslogtreecommitdiffstats
path: root/build.scm
diff options
context:
space:
mode:
Diffstat (limited to 'build.scm')
-rw-r--r--build.scm101
1 files changed, 48 insertions, 53 deletions
diff --git a/build.scm b/build.scm
index 1405d5a..f45d994 100644
--- a/build.scm
+++ b/build.scm
@@ -1,19 +1,19 @@
;; "build.scm" Build database and program -*-scheme-*-
-;; Copyright (C) 1994-2004 Aubrey Jaffer.
+;; Copyright (C) 1994-2006 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 of the License, or (at
-;; your option) any later version.
+;; 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.
+;; 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 program; if not, write to the Free Software
-;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+;; along with this software; see the file COPYING. If not, write to
+;; the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111, USA.
(require 'parameters)
(require 'databases)
@@ -124,6 +124,7 @@
("split.scm" Scheme test "example use of crs.c. Input, output, and diagnostic output directed to separate windows.")
("edline.c" c-source linkable "Gnu readline input editing (get ftp.sys.toronto.edu:/pub/rc/editline.shar).")
("Iedline.scm" Scheme optional "Gnu readline input editing.")
+ ("bytenumb.c" c-source linkable "Byte-number conversions.")
("differ.c" c-source linkable "Linear-space O(PN) sequence comparison.")
("Idiffer.scm" Scheme optional "Linear-space O(PN) sequence comparison.")
("record.c" c-source linkable "proposed `Record' user definable datatypes.")
@@ -375,6 +376,11 @@
'differ
'((c-file "differ.c") (compiled-init "init_differ")))
+#;Byte/number conversions
+(define-build-feature
+ 'byte-number
+ '((c-file "bytenumb.c") (compiled-init "init_bytenumb")))
+
#;Microsoft Windows executable.
(define-build-feature
'windows
@@ -425,10 +431,10 @@
#;WB database with relational wrapper.
(define-build-feature
'wb
- '((c-file "../wb/blink.c" "../wb/blkio.c" "../wb/del.c" "../wb/ent.c"
- "../wb/handle.c" "../wb/prev.c" "../wb/scan.c" "../wb/stats.c"
- "../wb/wbsys.c" "../wb/db.c")
- (scm-srcdir "../scm/")
+ '((c-file "../wb/blink.c" "../wb/blkio.c" "../wb/del.c" "../wb/ents.c"
+ "../wb/handle.c" "../wb/prev.c" "../wb/scan.c" "../wb/segs.c"
+ "../wb/stats.c" "../wb/wbsys.c" "../wb/db.c")
+ (scm-srcdir "../scm")
(compiled-init "init_db")))
;;;; The rest is about building on specific platforms.
@@ -478,17 +484,17 @@
(amiga-dice-c m68000 amiga dcc ) ;dcc
(amiga-gcc m68000 amiga gcc ) ;gcc
(amiga-sas m68000 amiga lc ) ;link
- (atari-st-gcc m68000 atari.st gcc ) ;gcc
- (atari-st-turbo-c m68000 atari.st tcc ) ;tlink
+ (atari-st-gcc m68000 atari-st gcc ) ;gcc
+ (atari-st-turbo-c m68000 atari-st tcc ) ;tlink
(borland-c i8086 ms-dos bcc ) ;bcc
(gnu-win32 i386 unix gcc ) ;gcc
(djgpp i386 ms-dos gcc ) ;gcc
- (freebsd i386 unix cc ) ;cc
+ (freebsd *unknown* unix cc ) ;cc
(gcc *unknown* unix gcc ) ;gcc
(highc i386 ms-dos hc386 ) ;bind386
(hp-ux hp-risc hp-ux cc ) ;cc
(irix mips irix gcc ) ;gcc
- (linux i386 linux gcc ) ;gcc
+ (linux *unknown* linux gcc ) ;gcc
(linux-aout i386 linux gcc ) ;gcc
(linux-ia64 ia64 linux gcc ) ;gcc
(darwin powerpc unix cc ) ;gcc
@@ -535,14 +541,13 @@
(mysql *unknown* "-I/usr/include/mysql" "-L/usr/lib/mysql -lmysqlclient"
"/usr/lib/mysql/libmysqlclient.a" () ())
- (m gnu-win32 "" "" "" () ())
- (c gnu-win32 "" "" "" () ())
+ (m gnu-win32 "" "" #f () ())
+ (c gnu-win32 "" "" #f () ())
(dlll gnu-win32 "-DSCM_WIN_DLL" "" #f () ("posix.c" "unix.c" "socket.c"))
(m linux-aout "" "-lm" "/usr/lib/libm.sa" () ())
(c linux-aout "" "-lc" "/usr/lib/libc.sa" () ())
(dlll linux-aout "-DDLD -DDLD_DYNCM" "-ldld" #f () ("findexec.c"))
- (regex linux-aout "" "" "" () ())
(curses linux-aout "-I/usr/include/ncurses" "-lncurses"
"/usr/lib/libncurses.a" () ())
(nostart linux-aout "" "-nostartfiles" #f ("pre-crt0.c") ())
@@ -551,7 +556,7 @@
(m linux "" "-lm" "/lib/libm.so" () ())
(c linux "" "-lc" "/lib/libc.so" () ())
(dlll linux "-DSUN_DL" "-ldl" #f () ())
- (regex linux "" "" "" () ())
+ (regex linux "" "" #f () ())
(graphics linux "-I/usr/include/X11 -DX11" "-L/usr/X11R6/lib -lX11"
"/usr/X11R6/lib/libX11.so" () ())
(curses linux "" "-lcurses" "/lib/libncurses.so" () ())
@@ -561,7 +566,7 @@
(m linux-ia64 "" "-lm" "/lib/libm.so" () ())
(c linux-ia64 "" "-lc" "/lib/libc.so" () ())
(dlll linux-ia64 "-DSUN_DL" "-ldl" #f () ())
- (regex linux-ia64 "" "" "" () ())
+ (regex linux-ia64 "" "" #f () ())
(graphics linux-ia64 "-I/usr/include/X11 -DX11" "-L/usr/X11R6/lib -lX11"
"/usr/X11R6/lib/libX11.so" () ())
(curses linux-ia64 "" "-lcurses" "/lib/libncurses.so" () ())
@@ -1002,15 +1007,6 @@
; (batch:rebuild-catalog parms)
; (string-append oname ".sl"))))
-(defcommand compile-c-files linux-aout
- (lambda (files parms)
- (and (batch:try-chopped-command parms
- "gcc" "-c"
- (include-spec "-I" parms)
- (c-includes parms)
- (c-flags parms)
- files)
- (truncate-up-to (map c->o files) #\/))))
(defcommand compile-dll-c-files linux-aout
(lambda (files parms)
(and (batch:try-chopped-command
@@ -1028,21 +1024,21 @@
(defcommand compile-c-files linux
(lambda (files parms)
- (and (batch:try-chopped-command
- parms
- "gcc"
- ;;(if (member "-g" (c-includes parms)) "" "-O2")
- "-c" (c-includes parms)
- (include-spec "-I" parms)
- (c-flags parms)
- files)
+ (and (batch:try-chopped-command parms
+ "gcc" "-c"
+ (include-spec "-I" parms)
+ (c-includes parms)
+ (c-flags parms)
+ files)
(truncate-up-to (map c->o files) #\/))))
(defcommand compile-dll-c-files linux
(lambda (files parms)
(and
- (batch:try-chopped-command
- parms "gcc" "-fpic" "-c"
- (include-spec "-I" parms) (c-includes parms) (c-flags parms) files)
+ (batch:try-chopped-command parms "gcc" "-fpic" "-c"
+ (include-spec "-I" parms)
+ (c-includes parms)
+ (c-flags parms)
+ files)
(let* ((platform (car (parameter-list-ref parms 'platform)))
(fnames (truncate-up-to (map c-> files) #\/))
(fname.so (string-append (car fnames) ".so"))
@@ -1061,8 +1057,7 @@
result))))
(defcommand make-dll-archive linux
(lambda (oname objects libs parms)
- (let ((platform (car (parameter-list-ref
- parms 'platform))))
+ (let ((platform (car (parameter-list-ref parms 'platform))))
(and (batch:try-command
parms
"gcc" "-shared" "-o"
@@ -1274,8 +1269,7 @@
(list (string-append (car fnames) ".so")))))))
(defcommand make-dll-archive osf1
(lambda (oname objects libs parms)
- (let ((platform (car (parameter-list-ref
- parms 'platform))))
+ (let ((platform (car (parameter-list-ref parms 'platform))))
(and (batch:try-command
parms
"cc" "-shared" "-o"
@@ -1874,10 +1868,10 @@
(define (look platform)
(let ((ans (getter thing platform)))
(cond (ans ans)
- ((eq? '*unknown* platform)
- ;;(slib:warn "Couldn't find: " plat thing)
- '())
- (else (look '*unknown*)))))
+ (else (let ((os (platform->os platform)))
+ (cond ((eq? os platform) (look '*unknown*))
+ ((eq? platform '*unknown*) '())
+ (else (look os))))))))
(look plat)))
(define (build:command rdb)
@@ -2108,7 +2102,8 @@
(define build:initializer
(lambda (rdb)
- (set! build:c-libraries (open-table rdb 'c-libraries))
+ (set! build:c-libraries
+ (open-table rdb 'c-libraries))
(set! build:lib-cc-flag
(make-defaulting-platform-lookup
(build:c-libraries 'get 'compiler-flags)))
@@ -2121,8 +2116,8 @@
(set! build:c-suppress
(make-defaulting-platform-lookup
(build:c-libraries 'get 'suppress-files)))
- (set! platform->os ((open-table rdb 'platform)
- 'get 'operating-system))
+ (set! platform->os
+ ((open-table rdb 'platform) 'get 'operating-system))
(set! plan-command
(let ((lookup (make-defaulting-platform-lookup
((open-table rdb 'compile-commands)