PageRenderTime 29ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/Makefile

http://github.com/AF83/ucengine
Makefile | 89 lines | 54 code | 20 blank | 15 comment | 1 complexity | 17c553848593d0a0072e45c61248ca09 MD5 | raw file
  1. DIRS = rel/ucengine/data/files
  2. # Try to find yaws include dir for Debian/Ubuntu users
  3. # If you have a custom yaws install, you can change it with for example:
  4. # make rel ERL_LIBS=/usr/local/lib/yaws
  5. ifeq ($(shell test -d /usr/lib/yaws && echo found),found)
  6. ERL_LIBS:=/usr/lib/yaws
  7. $(warning Found directory /usr/lib/yaws)
  8. $(warning Using ERL_LIBS=${ERL_LIBS})
  9. export ERL_LIBS
  10. endif
  11. all: compile
  12. $(DIRS):
  13. mkdir -p $(DIRS)
  14. ###############################################################################
  15. # Build
  16. ###############################################################################
  17. compile:
  18. ./rebar get-deps
  19. ./rebar compile
  20. rel: compile
  21. ./rebar generate force=1
  22. ###############################################################################
  23. # Usual targets
  24. ###############################################################################
  25. dev: rel $(DIRS)
  26. wwwroot: $(DIRS)
  27. -@rm rel/ucengine/wwwroot/ -fr
  28. -@cp -r wwwroot rel/ucengine/.
  29. run: dev
  30. rel/ucengine/bin/ucengine console
  31. start: dev
  32. rel/ucengine/bin/ucengine start
  33. stop:
  34. rel/ucengine/bin/ucengine stop
  35. restart: dev
  36. rel/ucengine/bin/ucengine restart
  37. tests: dev
  38. rel/ucengine/bin/ucengine-admin tests
  39. ./rebar skip_deps=true eunit
  40. mnesia_tests: dev
  41. sed -i 's/db, mongodb/db, mnesia/' rel/ucengine/etc/uce.cfg
  42. rel/ucengine/bin/ucengine-admin tests
  43. ./rebar skip_deps=true eunit
  44. mongodb_tests: dev
  45. sed -i 's/db, mnesia/db, mongodb/' rel/ucengine/etc/uce.cfg
  46. sed -i 's/database, "ucengine"}/database, "ucengine_test"},{index, 0}/' rel/ucengine/etc/uce.cfg
  47. rel/ucengine/bin/ucengine-admin tests
  48. ./rebar skip_deps=true eunit
  49. dialyze: compile
  50. ./rebar skip_deps=true check-plt
  51. ./rebar skip_deps=true dialyze
  52. ###############################################################################
  53. # Benchmark
  54. ###############################################################################
  55. populate:
  56. ./benchmarks/scenarii/$(SCENARIO).sh localhost
  57. bench:
  58. @mkdir -p benchmarks/ebin/
  59. @erlc -o benchmarks/ebin/ benchmarks/tsung_utils.erl
  60. @mkdir -p benchmarks/results
  61. @./utils/benchmark $(SCENARIO) $(LEVEL)
  62. @rm -rf benchmarks/ebin
  63. ###############################################################################
  64. # Cleanup
  65. ###############################################################################
  66. clean:
  67. -@rm -v erl_crash.dump -f
  68. ./rebar clean
  69. .PHONY: clean bench