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/json-pp src/Makefile: src/Makefile.in conf/substitute.sh $> $@ src/nodes2prom: src/Makefile cd src && ${MAKE} nodes2prom 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 %%EXPORT_DIR%% install-crontab install-dashboard install-bin: src/nodes2prom src/json-pp etc/nodes2prometheus.sh %%HEAP_FILES%% %%INSTALL_BIN_CMD%% $> %%BIN_DIR%% %%EXPORT_DIR%%: %%EXPORT_DIR_CMD%% $@ 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 ; }