commit b60849770e3d78ebdead712d71ab8aeca61b437c parent fb965ae346c09480977cfb41583f9e63414f69e0 Author: Drew DeVault <sir@cmpwn.com> Date: Thu, 8 Jul 2021 12:38:12 -0400 true, false: new commands Diffstat:
M | Makefile | | | 13 | ++++++++++++- |
A | cmd/false.ha | | | 3 | +++ |
A | cmd/true.ha | | | 1 | + |
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile @@ -3,12 +3,23 @@ OUTDIR=bin HARE=hare -all: $(OUTDIR)/cat +all: \ + $(OUTDIR)/cat \ + $(OUTDIR)/false \ + $(OUTDIR)/true $(OUTDIR)/cat: cmd/cat.ha main/main.ha @mkdir -p $(OUTDIR) $(HARE) build -o $@ $< +$(OUTDIR)/false: cmd/false.ha + @mkdir -p $(OUTDIR) + $(HARE) build -o $@ $< + +$(OUTDIR)/true: cmd/true.ha + @mkdir -p $(OUTDIR) + $(HARE) build -o $@ $< + clean: rm -rf $(OUTDIR) diff --git a/cmd/false.ha b/cmd/false.ha @@ -0,0 +1,3 @@ +use os; + +export fn main() void = os::exit(1); diff --git a/cmd/true.ha b/cmd/true.ha @@ -0,0 +1 @@ +export fn main() void = void;