Skip to content

Commit

Permalink
Update Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
srebhan committed May 25, 2022
1 parent b425897 commit 746e944
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,18 @@ versioninfo:
build_generator:
go build -o ./tools/readme_config_includer/generator ./tools/readme_config_includer/generator.go

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

generate_plugins_%: build_generator
go generate -run="plugindata/main.go$$" ./plugins/$*/...

.PHONY: generate
generate: insert_config_to_readme_inputs insert_config_to_readme_outputs insert_config_to_readme_processors generate_plugins_aggregators

.PHONY: generate-clean
generate-clean:
go generate -run="plugindata/main.go --clean" ./plugins/aggregators/...
generate: 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 generate-clean
telegraf: generate build

# Used by dockerfile builds
.PHONY: go-install
Expand Down Expand Up @@ -340,7 +333,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) generate-clean
package: generate $(include_packages)

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

0 comments on commit 746e944

Please sign in to comment.