A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw71/LW/html/lw-567.htm below:

compile-file-if-needed

Signature

compile-file-if-needed input-pathname &key output-file load &allow-other-keys => output-truename, warnings-p, failure-p

Description

The function compile-file-if-needed compares the file-write-date of the source file named by input-pathname with the file-write-date of the appropriate fasl file (as computed by compile-file-pathname from input-pathname and output-file).

If the fasl file does not exist or is older than input-pathname, then compile-file is called with input-pathname, output-file, load and any other arguments passed., and the values returned are those returned from compile-file.

Otherwise, if load is true compile-file-if-needed loads the fasl file and returns nil, and if load is nil it simply returns nil.

Example
CL-USER 19 > (compile-file-if-needed "H:/tmp/foo.lisp"
                                     :output-file
                                     "C:/temp/")
;;; Compiling file H:/tmp/foo.lisp ...
;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 0
;;; Compilation speed = 1, Debug = 2, Fixnum safety = 3
;;; Source level debugging is off 
;;; Source file recording is  on 
;;; Cross referencing is off
; (TOP-LEVEL-FORM 1)
; (TOP-LEVEL-FORM 2)
; (TOP-LEVEL-FORM 3)
; FOO
; BAR
#P"C:/temp/foo.ofasl"
NIL
NIL
 
CL-USER 20 > (compile-file-if-needed "H:/tmp/foo.lisp"
                                     :output-file
                                     "C:/temp/"
                                     :load t)
; Loading fasl file C:\temp\foo.ofasl
NIL

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4