diff --git a/graph-lib/make/make-lib-2.rkt b/graph-lib/make/make-lib-2.rkt index 35484e50..7bbea1fc 100644 --- a/graph-lib/make/make-lib-2.rkt +++ b/graph-lib/make/make-lib-2.rkt @@ -1,5 +1,8 @@ #lang racket +;; TODO: use (or (file-exists? path) (directory-exists? path) +;; (link-exists? path)), when checking whether the output was created. + (require (for-syntax syntax/parse) rackunit) @@ -41,4 +44,4 @@ (check-equal? (match (build-path "a/b/c/d/e/f" 'up "g/") ((simple-path x y ... z) (simple-path z y ... 'up x))) - (string->path "g/b/c/d/a")) \ No newline at end of file + (string->path "g/b/c/d/a")) diff --git a/graph-lib/make/make.rkt b/graph-lib/make/make.rkt index b5d8f509..a91b4b97 100644 --- a/graph-lib/make/make.rkt +++ b/graph-lib/make/make.rkt @@ -143,8 +143,9 @@ ;; Create root MathJax link, must be done before the others ;; Otherwise make/proc thinks the (broken) link hasn't been created. (make-directory* "docs/") ;; docs/ must be created before Depencency graph too -(make-file-or-directory-link (build-path 'up "lib" "doc" "MathJax") - (build-path "docs" "MathJax")) +(unless (link-exists? (build-path "docs" "MathJax")) + (make-file-or-directory-link (build-path 'up "lib" "doc" "MathJax") + (build-path "docs" "MathJax"))) ;; Dependency graph, must be done before docs.