(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)))
filename tmp-c-source (constants-package component))
(and
(= (run-shell-command "gcc ~A -o ~S ~S"
- (if (sb-ext:posix-getenv "CFLAGS")
- (sb-ext:posix-getenv "CFLAGS")
+ (if (sb-ext:posix-getenv "EXTRA_CFLAGS")
+ (sb-ext:posix-getenv "EXTRA_CFLAGS")
"")
(namestring tmp-a-dot-out)
(namestring tmp-c-source)) 0)