make: Recompile .go too when included mes is touched.

* build-aux/compile-all.scm (scm->mes): New function.
  (file-needs-compilation?): Use it to hackishly respect (include-[from-path] "<>.mes")
This commit is contained in:
Jan Nieuwenhuizen 2017-05-02 16:56:14 +02:00
parent e16a74d74f
commit 0ec15a3220

View file

@ -68,10 +68,18 @@
(without-extension (string-drop-right relative 4))) (without-extension (string-drop-right relative 4)))
(string-append without-extension ".go"))) (string-append without-extension ".go")))
(define (scm->mes file)
(let* ((relative (relative-file file))
(without-extension (string-drop-right relative 4)))
(string-append without-extension ".mes")))
(define (file-needs-compilation? file) (define (file-needs-compilation? file)
(let ((go (scm->go file))) (let ((go (scm->go file)))
(or (not (file-exists? go)) (or (not (file-exists? go))
(file-mtime<? go file)))) (file-mtime<? go file)
(let ((mes (scm->mes file))) ; FIXME: try to respect (include-from-path ".mes")
(and (file-exists? mes)
(file-mtime<? go mes))))))
(define (file->module file) (define (file->module file)
(let* ((relative (relative-file file)) (let* ((relative (relative-file file))