1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 03:38:43 +00:00

kube-prometheus/Makefile: Change target output from files to folder

Previously the `manifests` and `vendor` folder content has been build
via `manifests/**` and `vendor/**` target definitions. This results in
two issues:

1. The GNU Make recipe is executed for every single file in the folders.

2. Not all timestamps inside the `manifests` folder would be updated on
every run, thereby needing to be rerun on all following target
executions.

Solution:

1. Define the target based on the folder, not individual files

2. Remove target folder before execution recipe to ensure all timestamps
are updated.
This commit is contained in:
Max Leonard Inden 2018-06-26 00:04:01 +08:00
parent cab34d7fe1
commit 6f79b72e5b
No known key found for this signature in database
GPG key ID: 5403C5464810BC26

View file

@ -23,16 +23,18 @@ generate-in-docker: ../../hack/jsonnet-docker-image
--workdir /go/src/github.com/coreos/prometheus-operator/contrib/kube-prometheus \
po-jsonnet make generate
generate: manifests/** **.md
generate: manifests **.md
**.md: $(EMBEDMD_BINARY) $(shell find examples) build.sh example.jsonnet
echo '>>> inside **.md'
$(EMBEDMD_BINARY) -w `find . -name "*.md" | grep -v vendor`
manifests/**: vendor/** example.jsonnet
manifests: vendor example.jsonnet
rm -rf manifests
./build.sh
vendor/**: $(JB_BINARY) jsonnetfile.json
vendor: $(JB_BINARY) jsonnetfile.json
rm -rf vendor
$(JB_BINARY) install
fmt: