projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.10.28:
[sbcl.git]
/
contrib
/
sb-grovel
/
def-to-lisp.lisp
diff --git
a/contrib/sb-grovel/def-to-lisp.lisp
b/contrib/sb-grovel/def-to-lisp.lisp
index
3b2cba1
..
e1f54f0
100644
(file)
--- a/
contrib/sb-grovel/def-to-lisp.lisp
+++ b/
contrib/sb-grovel/def-to-lisp.lisp
@@
-74,7
+74,7
@@
printf(\"(in-package ~S)\\\n\");~%" package-name)
(format stream "exit(0);~%}~%")))
(defun c-constants-extract (filename output-file package)
(format stream "exit(0);~%}~%")))
(defun c-constants-extract (filename output-file package)
- (with-open-file (f output-file :direction :output)
+ (with-open-file (f output-file :direction :output :if-exists :supersede)
(with-open-file (i filename :direction :input)
(let* ((headers (read i))
(definitions (read i)))
(with-open-file (i filename :direction :input)
(let* ((headers (read i))
(definitions (read i)))
@@
-104,8
+104,12
@@
printf(\"(in-package ~S)\\\n\");~%" package-name)
(funcall (intern "C-CONSTANTS-EXTRACT" (find-package "SB-GROVEL"))
filename tmp-c-source (constants-package component))
(and
(funcall (intern "C-CONSTANTS-EXTRACT" (find-package "SB-GROVEL"))
filename tmp-c-source (constants-package component))
(and
- (= (run-shell-command "gcc -o ~S ~S" (namestring tmp-a-dot-out)
- (namestring tmp-c-source)) 0)
+ (= (run-shell-command "gcc ~A -o ~S ~S"
+ (if (sb-ext:posix-getenv "EXTRA_CFLAGS")
+ (sb-ext:posix-getenv "EXTRA_CFLAGS")
+ "")
+ (namestring tmp-a-dot-out)
+ (namestring tmp-c-source)) 0)
(= (run-shell-command "~A >~A"
(namestring tmp-a-dot-out)
(namestring tmp-constants)) 0)
(= (run-shell-command "~A >~A"
(namestring tmp-a-dot-out)
(namestring tmp-constants)) 0)