mirror of
https://github.com/janet-lang/janet
synced 2025-02-03 02:39:09 +00:00
Make amalg tool windows friendly
Convert / to \ in file paths for windows.
This commit is contained in:
parent
7350bf5dd9
commit
5bf9e4fc89
@ -3,6 +3,14 @@
|
|||||||
|
|
||||||
(def {:year YY :month MM :month-day DD} (os/date))
|
(def {:year YY :month MM :month-day DD} (os/date))
|
||||||
|
|
||||||
|
(defn dofile
|
||||||
|
"Print one file to stdout"
|
||||||
|
[path]
|
||||||
|
(def path (if (= (os/which) :windows)
|
||||||
|
(string/replace "/" "\\" path)
|
||||||
|
path))
|
||||||
|
(print (slurp path)))
|
||||||
|
|
||||||
# Order is important here, as some headers
|
# Order is important here, as some headers
|
||||||
# depend on other headers.
|
# depend on other headers.
|
||||||
(def headers
|
(def headers
|
||||||
@ -63,8 +71,8 @@
|
|||||||
(print ```#define JANET_AMALG
|
(print ```#define JANET_AMALG
|
||||||
#include "janet.h"```)
|
#include "janet.h"```)
|
||||||
|
|
||||||
(each h headers (print (slurp h)))
|
(each h headers (dofile h))
|
||||||
(each s sources (print (slurp s)))
|
(each s sources (dofile s))
|
||||||
|
|
||||||
# Relies on this file being built
|
# Relies on this file being built
|
||||||
(print (slurp "build/core.gen.c"))
|
(dofile "build/core.gen.c")
|
||||||
|
Loading…
Reference in New Issue
Block a user