+ (macrolet ((out-to (name &body body)
+ `(let ((fn (format nil "~A/~A.h" c-header-dir-name ,name)))
+ (ensure-directories-exist fn)
+ (with-open-file (*standard-output* fn
+ :if-exists :supersede :direction :output)
+ (write-boilerplate)
+ (let ((n (substitute #\_ #\- (string-upcase ,name))))
+ (format
+ t
+ "#ifndef SBCL_GENESIS_~A~%#define SBCL_GENESIS_~A 1~%"
+ n n))
+ ,@body
+ (format t
+ "#endif /* SBCL_GENESIS_~A */~%"
+ (string-upcase ,name))))))