...

Text file src/go.einride.tech/aip/Makefile

Documentation: go.einride.tech/aip

     1# Code generated by go.einride.tech/sage. DO NOT EDIT.
     2# To learn more, see .sage/main.go and https://github.com/einride/sage.
     3
     4.DEFAULT_GOAL := all
     5
     6cwd := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
     7sagefile := $(abspath $(cwd)/.sage/bin/sagefile)
     8
     9# Setup Go.
    10go := $(shell command -v go 2>/dev/null)
    11export GOWORK ?= off
    12ifndef go
    13SAGE_GO_VERSION ?= 1.20.2
    14export GOROOT := $(abspath $(cwd)/.sage/tools/go/$(SAGE_GO_VERSION)/go)
    15export PATH := $(PATH):$(GOROOT)/bin
    16go := $(GOROOT)/bin/go
    17os := $(shell uname | tr '[:upper:]' '[:lower:]')
    18arch := $(shell uname -m)
    19ifeq ($(arch),x86_64)
    20arch := amd64
    21endif
    22$(go):
    23	$(info installing Go $(SAGE_GO_VERSION)...)
    24	@mkdir -p $(dir $(GOROOT))
    25	@curl -sSL https://go.dev/dl/go$(SAGE_GO_VERSION).$(os)-$(arch).tar.gz | tar xz -C $(dir $(GOROOT))
    26	@touch $(GOROOT)/go.mod
    27	@chmod +x $(go)
    28endif
    29
    30.PHONY: $(sagefile)
    31$(sagefile): $(go)
    32	@cd .sage && $(go) mod tidy && $(go) run .
    33
    34.PHONY: sage
    35sage:
    36	@$(MAKE) $(sagefile)
    37
    38.PHONY: update-sage
    39update-sage: $(go)
    40	@cd .sage && $(go) get -d go.einride.tech/sage@latest && $(go) mod tidy && $(go) run .
    41
    42.PHONY: clean-sage
    43clean-sage:
    44	@git clean -fdx .sage/tools .sage/bin .sage/build
    45
    46.PHONY: all
    47all: $(sagefile)
    48	@$(sagefile) All
    49
    50.PHONY: convco-check
    51convco-check: $(sagefile)
    52	@$(sagefile) ConvcoCheck
    53
    54.PHONY: format-markdown
    55format-markdown: $(sagefile)
    56	@$(sagefile) FormatMarkdown
    57
    58.PHONY: format-yaml
    59format-yaml: $(sagefile)
    60	@$(sagefile) FormatYAML
    61
    62.PHONY: git-verify-no-diff
    63git-verify-no-diff: $(sagefile)
    64	@$(sagefile) GitVerifyNoDiff
    65
    66.PHONY: go-generate
    67go-generate: $(sagefile)
    68	@$(sagefile) GoGenerate
    69
    70.PHONY: go-lines
    71go-lines: $(sagefile)
    72	@$(sagefile) GoLines
    73
    74.PHONY: go-lint
    75go-lint: $(sagefile)
    76	@$(sagefile) GoLint
    77
    78.PHONY: go-lint-fix
    79go-lint-fix: $(sagefile)
    80	@$(sagefile) GoLintFix
    81
    82.PHONY: go-mod-tidy
    83go-mod-tidy: $(sagefile)
    84	@$(sagefile) GoModTidy
    85
    86.PHONY: go-test
    87go-test: $(sagefile)
    88	@$(sagefile) GoTest
    89
    90.PHONY: stringer
    91stringer: $(sagefile)
    92	@$(sagefile) Stringer
    93
    94.PHONY: proto
    95proto:
    96	$(MAKE) -C proto -f Makefile

View as plain text