hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 7335488fe080f8e670deff4e2a253aa6287a449f
parent 749c39109903ca7ec322f9c7cc5e0fa15d7aa0fe
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 24 Feb 2021 11:02:54 -0500

Update stdlib: add fs

Diffstat:
Mgen-stdlib | 10++++++++++
Mmk/stdlib.mk | 30++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/gen-stdlib b/gen-stdlib @@ -148,6 +148,15 @@ format_elf() { gen_ssa format::elf } +fs() { + printf '# fs\n' + gen_srcs fs \ + types.ha \ + fs.ha \ + util.ha + gen_ssa fs io +} + hare_ast() { printf '# hare::ast\n' gen_srcs hare::ast \ @@ -333,6 +342,7 @@ crypto_random encoding_utf8 fmt format_elf +fs hare_ast hare_lex hare_parse diff --git a/mk/stdlib.mk b/mk/stdlib.mk @@ -81,6 +81,9 @@ hare_stdlib_deps+=$(stdlib_fmt) stdlib_format_elf=$(HARECACHE)/format/elf/format.elf.o hare_stdlib_deps+=$(stdlib_format_elf) +stdlib_fs=$(HARECACHE)/fs/fs.o +hare_stdlib_deps+=$(stdlib_fs) + stdlib_hare_ast=$(HARECACHE)/hare/ast/hare.ast.o hare_stdlib_deps+=$(stdlib_hare_ast) @@ -194,6 +197,18 @@ $(HARECACHE)/format/elf/format.elf.ssa: $(stdlib_format_elf_srcs) $(stdlib_rt) @HARECACHE=$(HARECACHE) $(HAREC) $(HAREFLAGS) -o $@ -Nformat::elf \ -t$(HARECACHE)/format/elf/format.elf.td $(stdlib_format_elf_srcs) +# fs +stdlib_fs_srcs= \ + $(STDLIB)/fs/types.ha \ + $(STDLIB)/fs/fs.ha \ + $(STDLIB)/fs/util.ha + +$(HARECACHE)/fs/fs.ssa: $(stdlib_fs_srcs) $(stdlib_rt) $(stdlib_io) + @printf 'HAREC \t$@\n' + @mkdir -p $(HARECACHE)/fs + @HARECACHE=$(HARECACHE) $(HAREC) $(HAREFLAGS) -o $@ -Nfs \ + -t$(HARECACHE)/fs/fs.td $(stdlib_fs_srcs) + # hare::ast stdlib_hare_ast_srcs= \ $(STDLIB)/hare/ast/types.ha @@ -417,6 +432,9 @@ hare_testlib_deps+=$(testlib_fmt) testlib_format_elf=$(TESTCACHE)/format/elf/format.elf.o hare_testlib_deps+=$(testlib_format_elf) +testlib_fs=$(TESTCACHE)/fs/fs.o +hare_testlib_deps+=$(testlib_fs) + testlib_hare_ast=$(TESTCACHE)/hare/ast/hare.ast.o hare_testlib_deps+=$(testlib_hare_ast) @@ -530,6 +548,18 @@ $(TESTCACHE)/format/elf/format.elf.ssa: $(testlib_format_elf_srcs) $(testlib_rt) @HARECACHE=$(TESTCACHE) $(HAREC) $(TESTHAREFLAGS) -o $@ -Nformat::elf \ -t$(TESTCACHE)/format/elf/format.elf.td $(testlib_format_elf_srcs) +# fs +testlib_fs_srcs= \ + $(STDLIB)/fs/types.ha \ + $(STDLIB)/fs/fs.ha \ + $(STDLIB)/fs/util.ha + +$(TESTCACHE)/fs/fs.ssa: $(testlib_fs_srcs) $(testlib_rt) $(testlib_io) + @printf 'HAREC \t$@\n' + @mkdir -p $(TESTCACHE)/fs + @HARECACHE=$(TESTCACHE) $(HAREC) $(TESTHAREFLAGS) -o $@ -Nfs \ + -t$(TESTCACHE)/fs/fs.td $(testlib_fs_srcs) + # hare::ast testlib_hare_ast_srcs= \ $(STDLIB)/hare/ast/types.ha