Skip to content

Commit 6a44aac

Browse files
committed
fix: bug in makefile
Signed-off-by: Andrew Steurer <94206073+asteurer@users.noreply.github.com>
1 parent 6365777 commit 6a44aac

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

examples/wasip3/Makefile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
GO := ../../go-$(shell uname -s | tr 'A-Z' 'a-z')-$(shell uname -m | sed -e 's/aarch64/arm64/' -e 's/x86_64/amd64/')-bootstrap
1+
GO := go-$(shell uname -s | tr 'A-Z' 'a-z')-$(shell uname -m | sed -e 's/aarch64/arm64/' -e 's/x86_64/amd64/')-bootstrap
22

3-
$(GO)/bin/go:
4-
curl -OL https://github.com/dicej/go/releases/download/go1.25.5-wasi-on-idle/$(GO).tbz
5-
tar xf $(GO).tbz
3+
install-patched-go:
4+
@if [ ! -d "../../$(GO)" ]; then \
5+
curl -OL https://github.com/dicej/go/releases/download/go1.25.5-wasi-on-idle/$(GO).tbz --output-dir ../../; \
6+
tar xf ../../$(GO).tbz -C ../../; \
7+
rm ../../$(GO).tbz; \
8+
else \
9+
echo "Go bootstrap already exists at ../../$(GO), skipping download"; \
10+
fi
611

7-
generate-bindings:
12+
generate-bindings: install-patched-go
813
componentize-go --world wasip3-example bindings --format
914

10-
build-component: generate-bindings $(GO)/bin/go
11-
componentize-go --world wasip3-example componentize --go $(GO)/bin/go
15+
build-component: generate-bindings
16+
componentize-go --world wasip3-example componentize --go ../../$(GO)/bin/go
1217

1318
.PHONY: run
1419
run: build-component

0 commit comments

Comments
 (0)