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.
 
 
 

48 lines
860 B

  1. # By default, run the tests.
  2. all: test
  3. version:
  4. python3 setup.py version
  5. build:
  6. python3 setup.py build_ext --inplace
  7. dist: sdist
  8. sdist:
  9. python3 setup.py sdist
  10. install:
  11. python3 setup.py install
  12. develop:
  13. python3 setup.py develop
  14. docs:
  15. make -C docs
  16. lint:
  17. flake8 nilmdb --exclude=fsck.py,nilmdb_fsck.py
  18. ctrl: lint
  19. test:
  20. ifneq ($(INSIDE_EMACS),)
  21. # Use the slightly more flexible script
  22. python3 setup.py build_ext --inplace
  23. python3 tests/runtests.py
  24. else
  25. # Let setup.py check dependencies, build stuff, and run the test
  26. python3 setup.py nosetests
  27. endif
  28. clean::
  29. find . -name '*.pyc' -o -name '__pycache__' -print0 | xargs -0 rm -rf
  30. rm -f .coverage
  31. rm -rf tests/*testdb*
  32. rm -rf nilmdb.egg-info/ build/ nilmdb/server/*.so
  33. make -C docs clean
  34. gitclean::
  35. git clean -dXf
  36. .PHONY: all version build dist sdist install docs lint test clean gitclean