5 ;;; Build necessary things
7 ;;; (c) 2006 Straylight/Edgeware
10 ;;;----- Licensing notice ---------------------------------------------------
12 ;;; This program is free software; you can redistribute it and/or modify
13 ;;; it under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 2 of the License, or
15 ;;; (at your option) any later version.
17 ;;; This program is distributed in the hope that it will be useful,
18 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with this program; if not, write to the Free Software Foundation,
24 ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 (flet ((compile-if-necessary (name)
28 (let* ((name (pathname name))
29 (args #+ecl '(:system-p t :c-file t)
31 (object #+ecl (merge-pathnames (make-pathname :type "o")
33 #-ecl (apply #'compile-file-pathname name args)))
34 (unless (and (probe-file object)
35 (< (file-write-date name)
36 (file-write-date object)))
37 (format t ";;; Compiling ~A -> ~A~%" name object)
38 (apply #'compile-file name args))
39 (load object :verbose t))))
40 (let ((stamp (make-pathname :directory (list :relative)
41 :name (format nil "build-~A"
46 (ignore-errors (delete-file stamp))
47 (compile-if-necessary "runlisp.lisp")
48 (with-open-file (dummy stamp
51 :if-does-not-exist :create)
52 (declare (ignorable dummy)))))
54 (format *error-output* "Build failure: ~A.~%" cond)
58 ;;;----- That's all, folks --------------------------------------------------