fixed: check if prereq exists when calculating md5-sum, check if

target has prereqs when md5 used, typo
This commit is contained in:
jottbee 2005-03-02 07:07:59 +00:00
parent 92821d9337
commit a5852a70ba
1 changed files with 6 additions and 4 deletions

View File

@ -141,15 +141,17 @@
(define (checksum-for-file fname)
(let ((file (expand-file-name fname (cwd))))
(and (file-exists? file)
(md5-digest->number (md5-digest-for-port (open-input-file file))))))
(if (file-exists? file)
(md5-digest->number (md5-digest-for-port (open-input-file file)))
(error "checksum-for-file: file does not exist" file))))
;;; optimizations possible: global variable with known checksums
(define (get-file-checksum fname)
(checksum-for-file fname))
(define (same-checksum? target extensions prereqs)
(or (null? prereqs)
(if (null? prereqs)
(error "same-checksum?: target has no prerequisites" target)
(let for-each-prereq ((current-prereq (car prereqs))
(previous-total 0)
(todo-prereqs (cdr prereqs)))
@ -220,7 +222,7 @@
(make-always-build-func target-name cooked-prereqs thunk)))
(define (make-common-once target-descr . prereqs)
(lambda args (apply make-common-once args)))
(lambda args (apply make-once args)))
(define (make-common-once-build-func target-descr prereqs thunk)
(lambda (target-name cooked-prereqs)