Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. DEBUG ?= 0
  2. ifeq ($(DEBUG), 1)
  3. OPTS += -v
  4. endif
  5. PROJECT_NAME = hypervideo-gui
  6. V_MAJOR = 1
  7. V_MINOR = 0
  8. V_PATCH = 3
  9. V_EXTRA =
  10. VERSION = $(V_MAJOR).$(V_MINOR).$(V_PATCH)$(V_EXTRA)
  11. help:
  12. @echo 'Makefile for generate tarball to Hypervideo GUI '
  13. @echo ' '
  14. @echo 'Usage: '
  15. @echo ' make dist - generate tarball '
  16. @echo ' make clean - cleaunp '
  17. @echo ' make demo - execute APP in local '
  18. @echo ' '
  19. @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 demo'
  20. all: dist
  21. # set markdown input format to "markdown-smart" for pandoc version 2 and to "markdown" for pandoc prior to version 2
  22. MARKDOWN = $(shell if [ `pandoc -v | head -n1 | cut -d" " -f2 | head -c1` = "2" ]; then echo markdown-smart; else echo markdown; fi)
  23. README.txt:
  24. pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
  25. pandoc -f $(MARKDOWN) -t plain Changelog.md -o Changelog.txt
  26. clean:
  27. rm -rf $(PROJECT_NAME)-$(VERSION).tar.lz hypervideo_gui.egg-info README.txt Changelog.txt MANIFEST build/ dist/ || true
  28. find . -name "*.pyc" -delete
  29. find . -name "*.class" -delete
  30. dist: README.txt
  31. @tar --create --lzip --file="$(PROJECT_NAME)-$(VERSION).tar.lz" --transform "s|^|$(PROJECT_NAME)/|" --owner 0 --group 0 \
  32. --exclude '*.DS_Store' \
  33. --exclude '*.kate-swp' \
  34. --exclude '*.pyc' \
  35. --exclude '*.pyo' \
  36. --exclude '*~' \
  37. --exclude '__pycache__' \
  38. --exclude '.git' \
  39. -- \
  40. bin hypervideo_gui images setup-files LICENSE \
  41. README.md README.txt Changelog.txt Makefile \
  42. setup.py
  43. demo:
  44. @python script.py $(OPTS)