summaryrefslogtreecommitdiff
path: root/Makefile
blob: b49af6a7a2742ae1e7fafa34283757a7f9285b39 (plain)
    1 all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion
    2 
    3 clean:
    4 	rm -rf youtube-dl youtube-dl.exe youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/
    5 
    6 PREFIX=/usr/local
    7 BINDIR=$(PREFIX)/bin
    8 MANDIR=$(PREFIX)/man
    9 SYSCONFDIR=/etc
   10 
   11 install: youtube-dl youtube-dl.1 youtube-dl.bash-completion
   12 	install -d $(DESTDIR)$(BINDIR)
   13 	install -m 755 youtube-dl $(DESTDIR)$(BINDIR)
   14 	install -d $(DESTDIR)$(MANDIR)/man1
   15 	install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1
   16 	install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
   17 	install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl
   18 
   19 test:
   20 	#nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test
   21 	nosetests --verbose test
   22 
   23 .PHONY: all clean install test
   24 
   25 youtube-dl: youtube_dl/*.py
   26 	zip --quiet youtube-dl youtube_dl/*.py
   27 	zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py
   28 	echo '#!/usr/bin/env python' > youtube-dl
   29 	cat youtube-dl.zip >> youtube-dl
   30 	rm youtube-dl.zip
   31 	chmod a+x youtube-dl
   32 
   33 README.md: youtube_dl/*.py
   34 	COLUMNS=80 python -m youtube_dl --help | python devscripts/make_readme.py
   35 
   36 README.txt: README.md
   37 	pandoc -f markdown -t plain README.md -o README.txt
   38 
   39 youtube-dl.1: README.md
   40 	pandoc -s -f markdown -t man README.md -o youtube-dl.1
   41 
   42 youtube-dl.bash-completion: youtube_dl/*.py devscripts/bash-completion.in
   43 	python devscripts/bash-completion.py
   44 
   45 youtube-dl.tar.gz: all
   46 	tar -czf youtube-dl.tar.gz -s "|^./|./youtube-dl/|" --exclude="updates_key.pem" \
   47 		--exclude="*.pyc" --exclude="*.pyo" --exclude="*~" --exclude="youtube-dl.exe" \
   48 		--exclude="wine-py2exe/" --exclude="py2exe.log" --exclude="*.kate-swp" \
   49 		--exclude="build/" --exclude="dist/" --exclude="MANIFEST" --exclude=".git/" .

Generated by cgit