From e0cbf4752f66d32d5ee0a890b930e9e6724a3063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Thu, 21 Jan 2016 12:23:17 +0100 Subject: [PATCH] Fixed makefile: was attempting to create MathJax link when it already existed. --- graph-lib/make/make-lib-2.rkt | 5 ++++- graph-lib/make/make.rkt | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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.