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

fix: Always build README-embedder for host-architecture #11253

Merged
merged 6 commits into from
Jun 8, 2022
Merged
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
20 changes: 9 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,14 @@ localstatedir ?= $(prefix)/var
pkgdir ?= build/dist

.PHONY: all
all:
@$(MAKE) deps
@$(MAKE) telegraf
all: deps docs telegraf

.PHONY: help
help:
@echo 'Targets:'
@echo ' all - download dependencies and compile telegraf binary'
@echo ' deps - download dependencies'
@echo ' docs - embed sample-configurations into READMEs'
@echo ' telegraf - compile telegraf binary'
@echo ' test - run short unit tests'
@echo ' fmt - format source files'
Expand Down Expand Up @@ -115,22 +114,21 @@ versioninfo:
go run scripts/generate_versioninfo/main.go; \
go generate cmd/telegraf/telegraf_windows.go; \

.PHONY: build_generator
build_generator:
go build -o ./tools/readme_config_includer/generator ./tools/readme_config_includer/generator.go
build_tools:
$(HOSTGO) build -o ./tools/readme_config_includer/generator ./tools/readme_config_includer/generator.go

embed_readme_%: build_generator
embed_readme_%:
go generate -run="readme_config_includer/generator$$" ./plugins/$*/...

.PHONY: generate
generate: embed_readme_inputs embed_readme_outputs embed_readme_processors embed_readme_aggregators
.PHONY: docs
docs: build_tools embed_readme_inputs embed_readme_outputs embed_readme_processors embed_readme_aggregators

.PHONY: build
build:
go build -ldflags "$(LDFLAGS)" ./cmd/telegraf

.PHONY: telegraf
telegraf: generate build
telegraf: build

# Used by dockerfile builds
.PHONY: go-install
Expand Down Expand Up @@ -328,7 +326,7 @@ darwin-arm64:
include_packages := $(mips) $(mipsel) $(arm64) $(amd64) $(static) $(armel) $(armhf) $(riscv64) $(s390x) $(ppc64le) $(i386) $(windows) $(darwin-amd64) $(darwin-arm64)

.PHONY: package
package: generate $(include_packages)
package: docs $(include_packages)

.PHONY: $(include_packages)
$(include_packages):
Expand Down