Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add targets for building into the root bin dir #159

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
WORKING_DIR := $(shell pwd)
_ := $(shell mkdir -p .make)
_ := $(shell mkdir -p .make bin)

export GOWORK := off

Expand Down Expand Up @@ -61,7 +61,7 @@ lint: .make/lint_proto .make/lint_dotnet

.PHONY: clean clean_gen clean_src clean_dist
clean: clean_gen clean_src clean_dist
rm -rf .make
rm -rf .make bin
clean_cli:
@$(MAKE) -C cli clean
clean_gen:
Expand Down Expand Up @@ -99,6 +99,7 @@ pkg:
src:
@$(MAKE) -C src

.PHONY: version
version:
@echo '${VERSION}'

Expand All @@ -113,6 +114,14 @@ undev:
.PHONY: work
work: go.work go.work.sum

###################### Real targets ######################

bin/uml2ts: .make/gen_proto $(shell find packages/uml2ts -type f -path '*.ts')
bun build packages/uml2ts/index.ts --compile --outfile $@

bin/um: .make/gen_proto $(shell find cli/um -type f -path '*.go')
go build -C cli/um -o ${WORKING_DIR}/$@

$(GO_ECHO_CLI): $(GO_ECHO_SRC)
@$(MAKE) -C cli/echo --no-print-directory

Expand All @@ -136,6 +145,8 @@ go.work.sum: go.work
.envrc: .make/regen_envrc
echo '#!/bin/bash\nexport TDL_DEV=true' > .envrc

###################### Sentinal targets ######################

.make/tool_restore: .config/dotnet-tools.json
dotnet tool restore
@touch $@
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Run `make clean` to remove local artifacts like `/.make` targets and `/node_modu
| `/.idea` | JetBrains IDE configuration (yes some of this gets checked in, fight me) |
| `/.make` | Local `make` sentinel target files |
| `/.vscode` | VSCode configuration |
| `/bin` | Binaries |
| `/cli` | Go CLI applications |
| `/docker` | Dockerfiles |
| `/gen` | Generated code |
Expand Down
28 changes: 14 additions & 14 deletions gen/proto/go/unmango/dev/tdl/v1alpha1/uml.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/uml2ts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ test:
clean:
rm -rf dist

lint:
bun lint

docker:
@$(MAKE) -C ${ROOT}/docker uml2ts

Expand Down
Loading