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:
8
Makefile
8
Makefile
@@ -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:
|
||||||
|
Reference in New Issue
Block a user