ERL in corp app for fortage
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

64 lines
2.1 KiB

  1. .PHONY: fix-slim-release test
  2. all: releases get-deps plugins compile
  3. REBAR?=./rebar -q
  4. cookie:
  5. @echo Generating a default cookie in /etc/vm.args
  6. @(echo -setcookie `openssl rand -base64 50 | head -n1 | sed -e 's/[^a-zA-Z0-9]//g'` >> etc/vm.args)
  7. compile:
  8. @(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Erlang in `which erl`"; $(REBAR) compile)
  9. get-deps:
  10. @(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Erlang in `which erl`"; $(REBAR) get-deps)
  11. update-deps:
  12. @(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Erlang in `which erl`"; $(REBAR) update-deps)
  13. eunit: get-deps compile
  14. @(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Erlang in `which erl`"; $(REBAR) skip_deps=true eunit)
  15. releases:
  16. make fix-slim-release
  17. copy-static:
  18. @(mkdir -p site/static/nitrogen)
  19. @(cp -r lib/nitrogen_core/www/* site/static/nitrogen/)
  20. plugins:
  21. @(export PATH=`pwd`/`echo erts-*/bin`:$$PATH;escript do-plugins.escript)
  22. ## This is only applicable for slim releases
  23. fix-slim-release:
  24. @echo Fixing slim release to the version of Erlang installed on this machine
  25. @(./fix-slim-release)
  26. DEPS_PLT=$(CURDIR)/.deps_plt
  27. DEPS=erts kernel stdlib sasl lib/nitrogen_core lib/simple_bridge lib/nprocreg lib/nitro_cache lib/rekt lib/qdate
  28. $(DEPS_PLT):
  29. @echo Building local plt at $(DEPS_PLT)
  30. @echo
  31. @(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Dialyzer in `which dialyzer`"; dialyzer --output_plt $(DEPS_PLT) --build_plt --apps $(DEPS) -r ./lib)
  32. dialyzer: all $(DEPS_PLT)
  33. @(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; echo "Using Dialyzer in `which dialyzer`"; dialyzer --fullpath --plt $(DEPS_PLT) -Wrace_conditions -r ./site/ebin)
  34. update: update-deps copy-static compile
  35. @(echo "*** CONGRATULATIONS ***")
  36. @(echo "Your Nitrogen installation has been upgraded.")
  37. @(echo "You may need to manually merge any changes that may have been made to")
  38. @(echo "configuration files as well as the initialization modules:")
  39. @(echo " site/src/nitrogen_sup.erl")
  40. @(echo " site/src/nitrogen_PLATFORM.erl")
  41. @(echo " site/src/nitrogen_app.erl")
  42. @(echo "")
  43. upgrade: update
  44. clean:
  45. @(export PATH=`pwd`/`echo erts-*/bin`:$$PATH; $(REBAR) clean)