Makefile 1.6 KB

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