Skip to content

Commit

Permalink
A couple of fixes (#1015)
Browse files Browse the repository at this point in the history
0. Kill version.ss, the v0.19 development cycle has started.
1. make clean should not try to delete things that don't exist and fail
2. normalize load-path order: 1. GERBIL_LOADPATH 2. GERBIL_PATH/lib 3.
GERBIL_HOME/lib (2 is excluded during the build)
  • Loading branch information
vyzo authored Oct 15, 2023
1 parent 5966820 commit 0adf6e9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ src/TAGS
.build*
doc/node_modules
doc/.vuepress/dist
# src/gerbil/runtime/version.ss
src/gerbil/runtime/version.ss
src/gerbil/boot-gxi
src/bootstrap/static

Expand Down
22 changes: 12 additions & 10 deletions src/gerbil/runtime/init.ss
Original file line number Diff line number Diff line change
Expand Up @@ -243,20 +243,22 @@ namespace: #f
;; initialize the load path
(let* ((home (gerbil-home))
(libdir (path-expand "lib" home))
(loadpath
(cond
((getenv "GERBIL_LOADPATH" #f)
=> (lambda (envvar)
(filter (lambda (x) (not (string-empty? x)))
(string-split envvar #\:))))
(else '())))
(userpath
(path-expand "lib" (gerbil-path)))
(loadpath
(if (getenv "GERBIL_BUILD_PREFIX" #f)
loadpath
(cons userpath loadpath))))
(current-module-library-path (cons libdir loadpath)))
[libdir]
[userpath libdir]))
(loadpath
(cond
((getenv "GERBIL_LOADPATH" #f)
=> (lambda (envvar)
(append
(filter (lambda (x) (not (string-empty? x)))
(string-split envvar #\:))
loadpath)))
(else loadpath))))
(current-module-library-path loadpath))

;; initialize the modue registry
(let* ((registry-entry (lambda (m) (cons m 'builtin)))
Expand Down
1 change: 0 additions & 1 deletion src/gerbil/runtime/version.ss

This file was deleted.

5 changes: 3 additions & 2 deletions src/std/make.ss
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,9 @@ TODO:
(lambda (spec)
(for-each
(lambda (f)
(displayln "... remove " f)
(delete-file-or-directory f))
(when (file-exists? f)
(displayln "... remove " f)
(delete-file-or-directory f)))
(spec-outputs spec settings)))
buildspec))

Expand Down

0 comments on commit 0adf6e9

Please sign in to comment.