Skip to content

Commit 511c1f4

Browse files
committed
Refactor with image-only variable
1 parent c291955 commit 511c1f4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/boot/boot.janet

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4934,16 +4934,15 @@
49344934
"src/core/wrap.c"])
49354935

49364936
# Print janet.c to stdout
4937-
(if (has-value? boot/args "image-only")
4938-
(print "/* Image-only build - DO NOT EDIT */")
4939-
(print "/* Amalgamated build - DO NOT EDIT */"))
4937+
(def image-only (has-value? boot/args "image-only"))
4938+
(print "/* " (if image-only "Image-only" "Amalgamated") " build - DO NOT EDIT */")
49404939
(print "/* Generated from janet version " janet/version "-" janet/build " */")
49414940
(print "#define JANET_BUILD \"" janet/build "\"")
49424941
(print ```#define JANET_AMALG```)
49434942

49444943
(defn do-one-file
49454944
[fname]
4946-
(unless (has-value? boot/args "image-only")
4945+
(unless image-only
49474946
(print "\n/* " fname " */")
49484947
(print "#line 0 \"" fname "\"\n")
49494948
(def source (slurp fname))

0 commit comments

Comments
 (0)