commit 45749e45938543ebeaf8474a16226f8ac6c18303
parent 1855a6076fd9aa38a1cd1e247e3640eb8a08a27d
Author: Drew DeVault <sir@cmpwn.com>
Date: Wed, 24 Feb 2021 12:17:35 -0500
Update stdlib (bufio, strio)
Diffstat:
2 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/gen-stdlib b/gen-stdlib
@@ -101,7 +101,7 @@ bufio() {
gen_srcs bufio \
dynamic.ha \
fixed.ha
- gen_ssa bufio io
+ gen_ssa bufio io bytes strings
}
bytes() {
@@ -324,6 +324,13 @@ strings() {
gen_ssa strings bytes encoding::utf8 types
}
+strio() {
+ printf '# strio\n'
+ gen_srcs strio \
+ buffer.ha
+ gen_ssa strio io strings
+}
+
types() {
printf '# types\n'
gen_srcs types \
@@ -353,6 +360,7 @@ slice
sort
strconv
strings
+strio
types"
stdlib() {
rt
diff --git a/mk/stdlib.mk b/mk/stdlib.mk
@@ -114,6 +114,9 @@ hare_stdlib_deps+=$(stdlib_strconv)
stdlib_strings=$(HARECACHE)/strings/strings.o
hare_stdlib_deps+=$(stdlib_strings)
+stdlib_strio=$(HARECACHE)/strio/strio.o
+hare_stdlib_deps+=$(stdlib_strio)
+
stdlib_types=$(HARECACHE)/types/types.o
hare_stdlib_deps+=$(stdlib_types)
@@ -133,7 +136,7 @@ stdlib_bufio_srcs= \
$(STDLIB)/bufio/dynamic.ha \
$(STDLIB)/bufio/fixed.ha
-$(HARECACHE)/bufio/bufio.ssa: $(stdlib_bufio_srcs) $(stdlib_rt) $(stdlib_io)
+$(HARECACHE)/bufio/bufio.ssa: $(stdlib_bufio_srcs) $(stdlib_rt) $(stdlib_io) $(stdlib_bytes)
@printf 'HAREC \t$@\n'
@mkdir -p $(HARECACHE)/bufio
@HARECACHE=$(HARECACHE) $(HAREC) $(HAREFLAGS) -o $@ -Nbufio \
@@ -338,6 +341,16 @@ $(HARECACHE)/strings/strings.ssa: $(stdlib_strings_srcs) $(stdlib_rt) $(stdlib_b
@HARECACHE=$(HARECACHE) $(HAREC) $(HAREFLAGS) -o $@ -Nstrings \
-t$(HARECACHE)/strings/strings.td $(stdlib_strings_srcs)
+# strio
+stdlib_strio_srcs= \
+ $(STDLIB)/strio/buffer.ha
+
+$(HARECACHE)/strio/strio.ssa: $(stdlib_strio_srcs) $(stdlib_rt) $(stdlib_io) $(stdlib_strings)
+ @printf 'HAREC \t$@\n'
+ @mkdir -p $(HARECACHE)/strio
+ @HARECACHE=$(HARECACHE) $(HAREC) $(HAREFLAGS) -o $@ -Nstrio \
+ -t$(HARECACHE)/strio/strio.td $(stdlib_strio_srcs)
+
# types
stdlib_types_srcs= \
$(STDLIB)/types/limits.ha \
@@ -465,6 +478,9 @@ hare_testlib_deps+=$(testlib_strconv)
testlib_strings=$(TESTCACHE)/strings/strings.o
hare_testlib_deps+=$(testlib_strings)
+testlib_strio=$(TESTCACHE)/strio/strio.o
+hare_testlib_deps+=$(testlib_strio)
+
testlib_types=$(TESTCACHE)/types/types.o
hare_testlib_deps+=$(testlib_types)
@@ -484,7 +500,7 @@ testlib_bufio_srcs= \
$(STDLIB)/bufio/dynamic.ha \
$(STDLIB)/bufio/fixed.ha
-$(TESTCACHE)/bufio/bufio.ssa: $(testlib_bufio_srcs) $(testlib_rt) $(testlib_io)
+$(TESTCACHE)/bufio/bufio.ssa: $(testlib_bufio_srcs) $(testlib_rt) $(testlib_io) $(testlib_bytes)
@printf 'HAREC \t$@\n'
@mkdir -p $(TESTCACHE)/bufio
@HARECACHE=$(TESTCACHE) $(HAREC) $(TESTHAREFLAGS) -o $@ -Nbufio \
@@ -698,6 +714,16 @@ $(TESTCACHE)/strings/strings.ssa: $(testlib_strings_srcs) $(testlib_rt) $(testli
@HARECACHE=$(TESTCACHE) $(HAREC) $(TESTHAREFLAGS) -o $@ -Nstrings \
-t$(TESTCACHE)/strings/strings.td $(testlib_strings_srcs)
+# strio
+testlib_strio_srcs= \
+ $(STDLIB)/strio/buffer.ha
+
+$(TESTCACHE)/strio/strio.ssa: $(testlib_strio_srcs) $(testlib_rt) $(testlib_io) $(testlib_strings)
+ @printf 'HAREC \t$@\n'
+ @mkdir -p $(TESTCACHE)/strio
+ @HARECACHE=$(TESTCACHE) $(HAREC) $(TESTHAREFLAGS) -o $@ -Nstrio \
+ -t$(TESTCACHE)/strio/strio.td $(testlib_strio_srcs)
+
# types
testlib_types_srcs= \
$(STDLIB)/types/limits.ha \