aboutsummaryrefslogtreecommitdiffstats
path: root/build.scm
diff options
context:
space:
mode:
Diffstat (limited to 'build.scm')
-rw-r--r--build.scm74
1 files changed, 51 insertions, 23 deletions
diff --git a/build.scm b/build.scm
index f45d994..28a768e 100644
--- a/build.scm
+++ b/build.scm
@@ -1,19 +1,19 @@
;; "build.scm" Build database and program -*-scheme-*-
;; 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, or (at your option)
-;; any later version.
+;; 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 3 of the
+;; License, 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 software; see the file COPYING. If not, write to
-;; the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+;; You should have received a copy of the GNU General Public
+;; License along with this program. If not, see
+;; <http://www.gnu.org/licenses/>.
(require 'parameters)
(require 'databases)
@@ -21,7 +21,7 @@
(require 'alist)
(require 'common-list-functions)
(require 'object->string)
-(require 'glob)
+(require 'filename)
(require 'batch)
(require-if 'compiling 'posix-time)
;@
@@ -70,11 +70,13 @@
(category file-categories))
((documentation string))
(("README" plaintext documentation "contains a MANIFEST, INSTALLATION INSTRUCTIONS, hints for EDITING SCHEME CODE, and a TROUBLE SHOOTING GUIDE.")
- ("COPYING" plaintext documentation "details the LACK OF WARRANTY for SCM and the conditions for distributing SCM.")
+ ("COPYING" plaintext documentation "GNU GENERAL PUBLIC LICENSE")
+ ("COPYING.LESSER" plaintext documentation "GNU LESSER GENERAL PUBLIC LICENSE")
("scm.1" nroff documentation "unix style man page.")
("scm.doc" plaintext documentation "man page generated from scm.1.")
("QUICKREF" plaintext documentation "Quick Reference card for R4RS and IEEE Scheme.")
("scm.texi" Texinfo documentation "SCM installation and use.")
+ ("fdl.texi" Texinfo documentation "GNU Free Documentation License.")
("ChangeLog" plaintext documentation "changes to SCM.")
("r4rstest.scm" Scheme test "tests conformance with Scheme specifications.")
("example.scm" Scheme test "example from R4RS which uses inexact numbers.")
@@ -142,6 +144,9 @@
("unexalpha.c" c-source platform-specific "Convert a running program into an Alpha executable file.")
("unexsgi.c" c-source platform-specific "Convert a running program into an IRIX executable file.")
("unexsunos4.c" c-source platform-specific "Convert a running program into an executable file.")
+ ("macos-config.h" c-header platform-specific "Included by unexmacosx.c and lastfile.c.")
+ ("unexmacosx.c" c-source platform-specific "Convert a running program into an executable file under MacOS X.")
+ ("lastfile.c" c-source platform-specific "find the point in data space between data and libraries.")
))
'(build-whats
@@ -563,16 +568,6 @@
(nostart linux "" "" #f () ())
(dump linux "" "" #f ("unexelf.c" "gmalloc.c") ())
- (m linux-ia64 "" "-lm" "/lib/libm.so" () ())
- (c linux-ia64 "" "-lc" "/lib/libc.so" () ())
- (dlll linux-ia64 "-DSUN_DL" "-ldl" #f () ())
- (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" () ())
- (nostart linux-ia64 "" "" #f () ())
- (dump linux-ia64 "" "" #f ("unexelf.c" "gmalloc.c") ())
-
(dump irix "" "-G 0" #f () ())
(m acorn-unixlib "" "" #f () ())
@@ -655,6 +650,8 @@
(c darwin "" "" #f () ())
(curses darwin "" "" #f () ())
(regex darwin "" "" #f () ())
+ (dump darwin "" "" #f ("unexmacosx.c" "lastfile.c") ())
+ (dlll darwin "-DSUN_DL" "-ldl" "" () ())
(c freebsd "" "-export-dynamic" #f () ())
(m freebsd "" "-lm" #f () ())
@@ -1664,6 +1661,37 @@
"cc" "-o" oname
(append objects libs))
oname)))
+(defcommand compile-dll-c-files darwin
+ (lambda (files parms)
+ (and (batch:try-chopped-command
+ parms "gcc" "-c"
+ (c-includes parms) (c-flags parms) files)
+ (let ((fnames (truncate-up-to (map c-> files) #\/)))
+ (and (batch:try-command
+ parms "gcc" "-dynamiclib" "-single_module" "-L." "-undefined" "dynamic_lookup"
+ "-o" (string-append (car fnames) ".so")
+ (map (lambda (fname) (string-append fname ".o")) fnames))
+ (for-each (lambda (fname)
+ (batch:delete-file
+ parms (string-append fname ".o")))
+ fnames)
+ (list (string-append (car fnames) ".so")))))))
+(defcommand make-dll-archive darwin
+ (lambda (oname objects libs parms)
+ (let ((platform (car (parameter-list-ref parms 'platform))))
+ (and (batch:try-command
+ parms
+ "gcc" "-dynamiclib" "-L." "-undefined" "dynamic_lookup" "-o"
+ (string-append
+ (car (parameter-list-ref parms 'implvic))
+ oname ".so")
+ objects
+ (map (lambda (l) (build:lib-ld-flag l platform))
+ (parameter-list-ref parms 'c-lib)))
+ (batch:rebuild-catalog parms)
+ (string-append
+ (car (parameter-list-ref parms 'implvic))
+ oname ".so")))))
(defcommand compile-c-files netbsd
(lambda (files parms)