12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- all: conf build test etc dashboard dist
- conf: Makefile conf/substitutions.sed
- Makefile: Makefile.in conf/substitutions.sed conf/Makefile conf/substitutions.conf conf/substitute.sh
- conf/substitutions.sed: conf/Makefile conf/substitutions.conf
- conf/substitutions.conf:
- cd conf && ${MAKE}
- build: src/Makefile src/nodes2prom src/graph2prom src/json-pp
- src/Makefile: src/Makefile.in
- conf/substitute.sh $> $@
- src/nodes2prom: src/Makefile
- cd src && ${MAKE} nodes2prom
- src/graph2prom: src/Makefile
- cd src && ${MAKE} graph2prom
- src/json-pp: src/Makefile
- cd src && ${MAKE} json-pp
- test: test/Makefile test/tmp
- test/Makefile: test/Makefile.in
- conf/substitute.sh $> $@
- test/tmp:
- cd test && ${MAKE} test
- etc: etc/Makefile etc/crontab etc/nodes2prometheus.sh
- etc/Makefile: etc/Makefile.in
- conf/substitute.sh $> $@
- etc/crontab:
- cd etc && ${MAKE}
- etc/nodes2prometheus.sh:
- cd etc && ${MAKE}
- dashboard: dashboard/Makefile dashboard/%%DASHBOARD_PREFIX%%status.json
- dashboard/Makefile: dashboard/Makefile.in
- conf/substitute.sh $> $@
- dashboard/%%DASHBOARD_PREFIX%%status.json:
- cd dashboard && ${MAKE}
- dist: dist/Makefile dist/nodes2grafana.txz
- dist/Makefile: dist/Makefile.in
- conf/substitute.sh $> $@
- dist/nodes2grafana.txz:
- cd dist && rm -f $@ && ${MAKE}
- install: install-bin install-export install-crontab install-dashboard
- install-bin: src/nodes2prom src/graph2prom src/json-pp etc/nodes2prometheus.sh %%HEAP_INSTALL_FILES%%
- %%INSTALL_BIN_CMD%% $> %%BIN_DIR%%
- install-export:
- if [ -e %%EXPORT_DIR%% ] ; \
- then %%EXPORT_DIR_CHOWN%% %%EXPORT_DIR%% ; \
- else %%EXPORT_DIR_INSTALL%% %%EXPORT_DIR%% ; \
- fi
- install-crontab:
- [ ! -r %%ETC_DIR%%/crontab ] || { \
- cp -p %%ETC_DIR%%/crontab /tmp/crontab.old && \
- grep nodes2prometheus.sh %%ETC_DIR%%/crontab > /tmp/crontab.n2g || \
- cat etc/crontab >> %%ETC_DIR%%/crontab ; \
- diff /tmp/crontab.old %%ETC_DIR%%/crontab || true ; }
- install-dashboard:
- cd dashboard && ${MAKE} install
- clean:
- cd conf && ${MAKE} clean
- [ ! -r test/Makefile ] || { cd test && ${MAKE} clean && rm -f Makefile ; }
- [ ! -r etc/Makefile ] || { cd etc && ${MAKE} clean && rm -f Makefile ; }
- [ ! -r src/Makefile ] || { cd src && ${MAKE} clean && rm -f Makefile ; }
- [ ! -r dashboard/Makefile ] || { cd dashboard && ${MAKE} clean && rm -f Makefile ; }
- [ ! -r dist/Makefile ] || { cd dist && ${MAKE} clean && rm -f Makefile ; }
|