Makefile.in 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 install-export install-crontab install-dashboard
  37. install-bin: src/nodes2prom src/json-pp etc/nodes2prometheus.sh %%HEAP_INSTALL_FILES%%
  38. %%INSTALL_BIN_CMD%% $> %%BIN_DIR%%
  39. install-export:
  40. if [ -e %%EXPORT_DIR%% ] ; \
  41. then %%EXPORT_DIR_CHOWN%% %%EXPORT_DIR%% ; \
  42. else %%EXPORT_DIR_INSTALL%% %%EXPORT_DIR%% ; \
  43. fi
  44. install-crontab:
  45. [ ! -r %%ETC_DIR%%/crontab ] || { \
  46. cp -p %%ETC_DIR%%/crontab /tmp/crontab.old && \
  47. grep nodes2prometheus.sh %%ETC_DIR%%/crontab > /tmp/crontab.n2g || \
  48. cat etc/crontab >> %%ETC_DIR%%/crontab ; \
  49. diff /tmp/crontab.old %%ETC_DIR%%/crontab || true ; }
  50. install-dashboard:
  51. cd dashboard && ${MAKE} install
  52. clean:
  53. cd conf && ${MAKE} clean
  54. [ ! -r test/Makefile ] || { cd test && ${MAKE} clean && rm -f Makefile ; }
  55. [ ! -r etc/Makefile ] || { cd etc && ${MAKE} clean && rm -f Makefile ; }
  56. [ ! -r src/Makefile ] || { cd src && ${MAKE} clean && rm -f Makefile ; }
  57. [ ! -r dashboard/Makefile ] || { cd dashboard && ${MAKE} clean && rm -f Makefile ; }
  58. [ ! -r dist/Makefile ] || { cd dist && ${MAKE} clean && rm -f Makefile ; }