mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-12-22 13:52:13 +01:00
Makefile: add dependency for template input file
This commit is contained in:
parent
08e989b780
commit
0667b94d0f
1 changed files with 3 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -1,12 +1,13 @@
|
|||
PLUGINS = df cpu if_ if_err_ load memory processes swap netstat uptime interrupts irqstats ntpdate plugindir_
|
||||
CONFIGURATION_FILE ?= munin-node.conf
|
||||
INPUT_FILE ?= munin-node.in
|
||||
TARGET_FILE ?= munin-node
|
||||
VERSION ?= $(shell cat VERSION)
|
||||
DIST_DIR = releases
|
||||
TGZ_FILE ?= $(DIST_DIR)/muninlite-$(VERSION).tar.gz
|
||||
|
||||
|
||||
$(TARGET_FILE): plugins/* $(CONFIGURATION_FILE)
|
||||
$(TARGET_FILE): $(INPUT_FILE) plugins/* $(CONFIGURATION_FILE)
|
||||
@export VERSION="$(VERSION)"; \
|
||||
export CONF=$$(grep -v '^#' "$(CONFIGURATION_FILE)"); \
|
||||
export "PLUGINS=$(PLUGINS)"; \
|
||||
|
@ -22,7 +23,7 @@ $(TARGET_FILE): plugins/* $(CONFIGURATION_FILE)
|
|||
s/\@\@CONF\@\@/$$ENV{"CONF"}/; \
|
||||
s/\@\@PLUGINS\@\@/$$ENV{"PLUGINS"}/; \
|
||||
s/\@\@PLSTR\@\@/$$ENV{"PLSTR"}/;' \
|
||||
munin-node.in >"$(TARGET_FILE).tmp"
|
||||
"$(INPUT_FILE)" >"$(TARGET_FILE).tmp"
|
||||
@chmod +x "$(TARGET_FILE).tmp"
|
||||
@mv "$(TARGET_FILE).tmp" "$(TARGET_FILE)"
|
||||
|
||||
|
|
Loading…
Reference in a new issue