Skip to content
Snippets Groups Projects
Commit 22066b47 authored by Max Leonard Inden's avatar Max Leonard Inden
Browse files

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.
parent c42e9d83
No related branches found
No related tags found
No related merge requests found
...@@ -23,16 +23,18 @@ generate-in-docker: ../../hack/jsonnet-docker-image ...@@ -23,16 +23,18 @@ generate-in-docker: ../../hack/jsonnet-docker-image
--workdir /go/src/github.com/coreos/prometheus-operator/contrib/kube-prometheus \ --workdir /go/src/github.com/coreos/prometheus-operator/contrib/kube-prometheus \
po-jsonnet make generate po-jsonnet make generate
generate: manifests/** **.md generate: manifests **.md
**.md: $(EMBEDMD_BINARY) $(shell find examples) build.sh example.jsonnet **.md: $(EMBEDMD_BINARY) $(shell find examples) build.sh example.jsonnet
echo '>>> inside **.md' echo '>>> inside **.md'
$(EMBEDMD_BINARY) -w `find . -name "*.md" | grep -v vendor` $(EMBEDMD_BINARY) -w `find . -name "*.md" | grep -v vendor`
manifests/**: vendor/** example.jsonnet manifests: vendor example.jsonnet
rm -rf manifests
./build.sh ./build.sh
vendor/**: $(JB_BINARY) jsonnetfile.json vendor: $(JB_BINARY) jsonnetfile.json
rm -rf vendor
$(JB_BINARY) install $(JB_BINARY) install
fmt: fmt:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment