Skip to content

Commit

Permalink
fix Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
viatoriche committed Sep 24, 2024
1 parent 47c6645 commit 09e4321
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.tokens
cover.html
cover.out
.build
26 changes: 10 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
# Directory containing the Makefile.
PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))

export PATH := $(GOBIN):$(PATH)

BENCH_FLAGS ?= -cpuprofile=cpu.pprof -memprofile=mem.pprof -benchmem

# Directories that we want to test and track coverage for.
TEST_DIRS = .

# Directories containing independent Go modules.
MODULE_DIRS = .

GO_INSTALLABLE_DIRS = cli

.PHONY: all
all: lint cover

Expand All @@ -29,12 +17,18 @@ cover:
@go test -coverprofile=cover.out -coverpkg=./... ./... \
&& go tool cover -html=cover.out -o cover.html

.PHONY: build
build: go-build

.PHONY: go-build
go-build:
@cd cmd/raml && go build -o ../../.build/raml

.PHONY: install
install: go-install

.PHONY: go-install
go-install:
@$(foreach dir,$(GO_INSTALLABLE_DIRS), ( \
cd $(dir) && \
go install -v ./... \
&& echo `go list -f '{{.Module.Path}}'` has been installed to `go list -f '{{.Target}}'`) &&) true
@cd cmd/raml && \
go install -v ./... \
&& echo `go list -f '{{.Module.Path}}'` has been installed to `go list -f '{{.Target}}'` && true

0 comments on commit 09e4321

Please sign in to comment.