2020-11-28 23:34:20 +05:00
|
|
|
# This is a Metricator Makefile.
|
|
|
|
# It contains calls to scripts placed in scripts directory.
|
|
|
|
|
2020-11-29 03:22:39 +05:00
|
|
|
CONFIG ?= ./metricator.example.yaml
|
|
|
|
|
2020-11-28 23:34:20 +05:00
|
|
|
help: Makefile
|
|
|
|
@echo -e "Metricator Makefile available subcommands:\n"
|
|
|
|
@cat $< | grep "## " | sort | sed -n 's/^## //p'
|
|
|
|
@echo ""
|
2020-11-28 23:46:24 +05:00
|
|
|
@make show-git-data
|
2020-11-28 23:34:20 +05:00
|
|
|
|
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
|
|
|
|
check-build-dir:
|
|
|
|
@if [ ! -d "._bin" ]; then mkdir ._bin; fi
|
|
|
|
|
2020-12-24 23:06:13 +05:00
|
|
|
## metricator-client-build: builds metricator client and places into ${PWD}/._bin.
|
|
|
|
metricator-client-build: check-build-dir
|
2021-02-19 19:18:10 +05:00
|
|
|
@if [ -f ./._bin/metricator-client ]; then rm ./._bin/metricator-client; fi
|
2020-12-24 23:06:13 +05:00
|
|
|
@scripts/build.sh metricator-client
|
|
|
|
|
2020-11-28 23:34:20 +05:00
|
|
|
## metricatord-build: builds metricator daemon and places into ${PWD}/._bin.
|
|
|
|
metricatord-build: check-build-dir
|
2021-02-19 19:18:10 +05:00
|
|
|
@if [ -f ./._bin/metricatord ]; then rm ./._bin/metricatord; fi
|
2020-11-28 23:46:24 +05:00
|
|
|
@scripts/build.sh metricatord
|
2020-11-28 23:34:20 +05:00
|
|
|
|
2020-12-24 23:06:13 +05:00
|
|
|
## metricator-client-run: starts metricator client. Use ARGS to supply args.
|
|
|
|
metricator-client-run: metricator-client-build
|
|
|
|
@./._bin/metricator-client -config ${CONFIG} $(ARGS)
|
|
|
|
|
2020-11-28 23:34:20 +05:00
|
|
|
## metricatord-run: starts metricator daemon.
|
|
|
|
metricatord-run: metricatord-build
|
2020-11-29 03:22:39 +05:00
|
|
|
./._bin/metricatord -config ${CONFIG}
|
2020-11-28 23:34:20 +05:00
|
|
|
|
|
|
|
show-git-data:
|
|
|
|
@echo "Parameters for current source code state:"
|
|
|
|
@scripts/show_git_data.sh
|