mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-12-22 13:52:13 +01:00
4d3c45ca4d
git-svn-id: svn://svn.code.sf.net/p/muninlite/code/muninlite@2 35caa317-6b62-4e8a-81c0-b04f0c356266
46 lines
No EOL
1.2 KiB
Makefile
46 lines
No EOL
1.2 KiB
Makefile
|
|
|
|
PLUGINS=df cpu if_ if_err_ load memory processes swap netstat uptime interrupts irqstats
|
|
#PLUGINS=cpu if_ if_err_ load memory processes netstat uptime interrupts irqstats
|
|
|
|
munin-node:
|
|
@VERSION=$$(cat VERSION); \
|
|
echo "Making munin-node for muninlite version $$VERSION"; \
|
|
PLSTR=""; \
|
|
for PLGIN in $(PLUGINS); \
|
|
do \
|
|
echo "Adding plugin $$PLGIN"; \
|
|
PLSTR=$$(echo "$$PLSTR"; grep -v '^#' plugins/$$PLGIN); \
|
|
done; \
|
|
PLSTR=$$(echo "$$PLSTR" | sed -e 's/\\/\\\\/g' \
|
|
-e 's/\//\\\//g' \
|
|
-e 's/\$$/\\$$/g'); \
|
|
perl -p -e \
|
|
"s/\@\@VERSION\@\@/$$VERSION/;s/\@\@PLUGINS\@\@/$(PLUGINS)/;s/\@\@PLSTR\@\@/$$PLSTR/;" \
|
|
munin-node.in > munin-node
|
|
@chmod +x munin-node
|
|
|
|
|
|
all: munin-node
|
|
|
|
clean-node:
|
|
@echo "Removing munin-node"
|
|
@rm -f munin-node
|
|
|
|
clean-tgz:
|
|
@echo "Old releases"
|
|
@rm -rf releases
|
|
|
|
clean: clean-node
|
|
|
|
clean-all: clean-node clean-tgz
|
|
|
|
tgz: clean-node
|
|
@VERSION=$$(cat VERSION); \
|
|
echo "Building release/muninlite-$$VERSION.tar.gz"; \
|
|
mkdir -p releases; \
|
|
cp -ra . releases/muninlite-$$VERSION 2>/dev/null || true; \
|
|
cd releases; \
|
|
rm -rf muninlite-$$VERSION/releases; \
|
|
tar zcvf muninlite-$$VERSION.tar.gz muninlite-$$VERSION >/dev/null; \
|
|
rm -rf muninlite-$$VERSION;
|