;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; This file is part of "NOVA": NOVA = search + COCOMO tools ; Copyright, 2008, Tim Menzies tim@menzies.us ; ; NOVA 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. ; ; NOVA 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 ; a long with NOVA. If not, see . ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #+SBCL (DECLAIM (SB-EXT:MUFFLE-CONDITIONS CL:STYLE-WARNING)) (let ((what "NOVA v0.11") (who "Tim Menzies") (email "tim@menzies.us") (when 2008) (files '( tricks/macros tricks/eg tricks/lib guess/guess-db config guess/guess xomo/coc-lib xomo/model-defaults xomo/effort-model xomo/defects-model xomo/months-model xomo/threats-model misc/demos ))) (defun make () (maker :files files )) (defun about () (about-string what when who email)) (defun copyright () (gpl3-string what when who email)) (defun version () (format nil "~a. Copyright ~a." what when)) (defun hello () (labels ((line () (terpri) (dotimes (i 50) (princ "-")) (terpri))) (line) (format t "Welcome to ~a~%" (about)) (line))) ) ; you can stop reading now ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; the rest of this stuff is generic. ; you should be able to ignore it (defun maker ( &key files forcep ; always force a re-compile? (faslp nil) ; if nil, just load, don't fasl ) (labels ; some one-liners for compiling and loading files ((filename (x y) (string-downcase (format nil "~a.~a" x y))) (src (f) (filename f "lisp")) (bin (f) (filename f "fasl")) (newerp (f1 f2 ) (> (file-write-date f1) (file-write-date f2))) (compile? (src bin) (or forcep (not (probe-file bin)) (newerp src bin))) (update (f) (if (compile? (src f) (bin f)) (compile-file (src f)))) (cake (f) (update f) (load (bin f))) (loader (f) (format t ";;;; FILE: ~a~%" f) (load f)) (make1 (f) (if faslp (cake f) (loader (src f))))) (mapc #'make1 files))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; start up actions (make) (hello)