Makefile.in 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. all: conf build test etc dashboard dist
  2. conf: Makefile conf/substitutions.sed
  3. Makefile: Makefile.in conf/substitutions.sed conf/Makefile conf/substitutions.conf conf/substitute.sh
  4. conf/substitutions.sed: conf/Makefile conf/substitutions.conf
  5. conf/substitutions.conf:
  6. cd conf && ${MAKE}
  7. build: src/Makefile src/nodes2prom src/json-pp
  8. src/Makefile: src/Makefile.in
  9. conf/substitute.sh $> $@
  10. src/nodes2prom: src/Makefile
  11. cd src && ${MAKE} nodes2prom
  12. src/json-pp: src/Makefile
  13. cd src && ${MAKE} json-pp
  14. test: test/Makefile test/tmp
  15. test/Makefile: test/Makefile.in
  16. conf/substitute.sh $> $@
  17. test/tmp:
  18. cd test && ${MAKE} test
  19. etc: etc/Makefile etc/crontab etc/nodes2prometheus.sh
  20. etc/Makefile: etc/Makefile.in
  21. conf/substitute.sh $> $@
  22. etc/crontab:
  23. cd etc && ${MAKE}
  24. etc/nodes2prometheus.sh:
  25. cd etc && ${MAKE}
  26. dashboard: dashboard/Makefile dashboard/%%DASHBOARD_PREFIX%%status.json
  27. dashboard/Makefile: dashboard/Makefile.in
  28. conf/substitute.sh $> $@
  29. dashboard/%%DASHBOARD_PREFIX%%status.json:
  30. cd dashboard && ${MAKE}
  31. dist: dist/Makefile dist/nodes2grafana.txz
  32. dist/Makefile: dist/Makefile.in
  33. conf/substitute.sh $> $@
  34. dist/nodes2grafana.txz:
  35. cd dist && rm -f $@ && ${MAKE}
  36. install: install-bin %%EXPORT_DIR%% install-crontab install-dashboard
  37. install-bin: src/nodes2prom src/json-pp etc/nodes2prometheus.sh %%HEAP_FILES%%
  38. %%INSTALL_BIN_CMD%% $> %%BIN_DIR%%
  39. %%EXPORT_DIR%%:
  40. %%EXPORT_DIR_CMD%% $@
  41. install-crontab:
  42. [ ! -r %%ETC_DIR%%/crontab ] || { \
  43. cp -p %%ETC_DIR%%/crontab /tmp/crontab.old && \
  44. grep nodes2prometheus.sh %%ETC_DIR%%/crontab > /tmp/crontab.n2g || \
  45. cat etc/crontab >> %%ETC_DIR%%/crontab ; \
  46. diff /tmp/crontab.old %%ETC_DIR%%/crontab || true ; }
  47. install-dashboard:
  48. cd dashboard && ${MAKE} install
  49. clean:
  50. cd conf && ${MAKE} clean
  51. [ ! -r test/Makefile ] || { cd test && ${MAKE} clean && rm -f Makefile ; }
  52. [ ! -r etc/Makefile ] || { cd etc && ${MAKE} clean && rm -f Makefile ; }
  53. [ ! -r src/Makefile ] || { cd src && ${MAKE} clean && rm -f Makefile ; }
  54. [ ! -r dashboard/Makefile ] || { cd dashboard && ${MAKE} clean && rm -f Makefile ; }
  55. [ ! -r dist/Makefile ] || { cd dist && ${MAKE} clean && rm -f Makefile ; }