Skip to content

Commit

Permalink
Makefile: build examples task
Browse files Browse the repository at this point in the history
  • Loading branch information
progrium committed Nov 14, 2023
1 parent aaa64cd commit 9b9a7da
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
.PHONY: generate test clobber example examples

GOEXE ?= go
EXAMPLES := $(wildcard macos/_examples/*)

generate:
$(GOEXE) generate ./...
.PHONY: generate

test:
$(GOEXE) test ./...
.PHONY: test

clobber:
$(GOEXE) run ./generate/tools/clobbergen.go ./macos
.PHONY: clobber

example:
$(GOEXE) run ./macos/_examples/helloworld/main.go
.PHONY: example

examples: _local/bin
@for dir in $(EXAMPLES); do \
$(GOEXE) build -o ./_local/bin/$$(basename $$dir) ./$$dir; \
done

_local/bin:
mkdir -p _local/bin

generate/symbols.zip:
cd generate && wget https://github.com/mactypes/symbolsdb/releases/download/1.1/symbols.zip

0 comments on commit 9b9a7da

Please sign in to comment.