1
0
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:
jpaquim
2025-10-11 16:32:24 +01:00
parent c29195596e
commit 511c1f4b0a

View File

@@ -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))