Makefile.in 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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/graph2prom 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/graph2prom: src/Makefile
  13. cd src && ${MAKE} graph2prom
  14. src/json-pp: src/Makefile
  15. cd src && ${MAKE} json-pp
  16. test: test/Makefile test/tmp
  17. test/Makefile: test/Makefile.in
  18. conf/substitute.sh $> $@
  19. test/tmp:
  20. cd test && ${MAKE} test
  21. etc: etc/Makefile etc/crontab etc/nodes2prometheus.sh
  22. etc/Makefile: etc/Makefile.in
  23. conf/substitute.sh $> $@
  24. etc/crontab:
  25. cd etc && ${MAKE}
  26. etc/nodes2prometheus.sh:
  27. cd etc && ${MAKE}
  28. dashboard: dashboard/Makefile dashboard/%%DASHBOARD_PREFIX%%status.json
  29. dashboard/Makefile: dashboard/Makefile.in
  30. conf/substitute.sh $> $@
  31. dashboard/%%DASHBOARD_PREFIX%%status.json:
  32. cd dashboard && ${MAKE}
  33. dist: dist/Makefile dist/nodes2grafana.txz
  34. dist/Makefile: dist/Makefile.in
  35. conf/substitute.sh $> $@
  36. dist/nodes2grafana.txz:
  37. cd dist && rm -f $@ && ${MAKE}
  38. install: install-bin install-export install-crontab install-dashboard
  39. install-bin: src/nodes2prom src/graph2prom src/json-pp etc/nodes2prometheus.sh %%HEAP_INSTALL_FILES%%
  40. %%INSTALL_BIN_CMD%% $> %%BIN_DIR%%
  41. install-export:
  42. if [ -e %%EXPORT_DIR%% ] ; \
  43. then %%EXPORT_DIR_CHOWN%% %%EXPORT_DIR%% ; \
  44. else %%EXPORT_DIR_INSTALL%% %%EXPORT_DIR%% ; \
  45. fi
  46. install-crontab:
  47. [ ! -r %%ETC_DIR%%/crontab ] || { \
  48. cp -p %%ETC_DIR%%/crontab /tmp/crontab.old && \
  49. grep nodes2prometheus.sh %%ETC_DIR%%/crontab > /tmp/crontab.n2g || \
  50. cat etc/crontab >> %%ETC_DIR%%/crontab ; \
  51. diff /tmp/crontab.old %%ETC_DIR%%/crontab || true ; }
  52. install-dashboard:
  53. cd dashboard && ${MAKE} install
  54. clean:
  55. cd conf && ${MAKE} clean
  56. [ ! -r test/Makefile ] || { cd test && ${MAKE} clean && rm -f Makefile ; }
  57. [ ! -r etc/Makefile ] || { cd etc && ${MAKE} clean && rm -f Makefile ; }
  58. [ ! -r src/Makefile ] || { cd src && ${MAKE} clean && rm -f Makefile ; }
  59. [ ! -r dashboard/Makefile ] || { cd dashboard && ${MAKE} clean && rm -f Makefile ; }
  60. [ ! -r dist/Makefile ] || { cd dist && ${MAKE} clean && rm -f Makefile ; }