mirror of
https://github.com/janet-lang/janet
synced 2025-10-24 04:07:41 +00:00
Refactor with image-only variable
This commit is contained in:
@@ -4934,16 +4934,15 @@
|
||||
"src/core/wrap.c"])
|
||||
|
||||
# Print janet.c to stdout
|
||||
(if (has-value? boot/args "image-only")
|
||||
(print "/* Image-only build - DO NOT EDIT */")
|
||||
(print "/* Amalgamated build - DO NOT EDIT */"))
|
||||
(def image-only (has-value? boot/args "image-only"))
|
||||
(print "/* " (if image-only "Image-only" "Amalgamated") " build - DO NOT EDIT */")
|
||||
(print "/* Generated from janet version " janet/version "-" janet/build " */")
|
||||
(print "#define JANET_BUILD \"" janet/build "\"")
|
||||
(print ```#define JANET_AMALG```)
|
||||
|
||||
(defn do-one-file
|
||||
[fname]
|
||||
(unless (has-value? boot/args "image-only")
|
||||
(unless image-only
|
||||
(print "\n/* " fname " */")
|
||||
(print "#line 0 \"" fname "\"\n")
|
||||
(def source (slurp fname))
|
||||
|
||||
Reference in New Issue
Block a user