Merge branch 'master' into fork_master
[youtube-dl] / Makefile
index dbb315dc73a9a86009e3124743e96ce002d27945..c97d6ffb005d9561dc2fede6f613d026d9c0924e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion 
+all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion
 
 clean:
        rm -rf youtube-dl youtube-dl.exe youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/
@@ -38,7 +38,11 @@ README.txt: README.md
 youtube-dl.1: README.md
        pandoc -s -f markdown -t man README.md -o youtube-dl.1
 
-youtube-dl.bash-completion: README.md youtube-dl.bash-completion.in
-       @options=`egrep -o '(--[a-z-]+) ' README.md | sort -u | xargs echo` && \
-               content=`sed "s/opts=\"[^\"]*\"/opts=\"$${options}\"/g" youtube-dl.bash-completion.in` && \
-               echo "$${content}" > youtube-dl.bash-completion
+youtube-dl.bash-completion: youtube_dl/*.py devscripts/bash-completion.template
+       python devscripts/bash-completion.py
+
+youtube-dl.tar.gz: all
+       tar -czf youtube-dl.tar.gz -s "|^./|./youtube-dl/|" \
+               --exclude="*.pyc" --exclude="*.pyo" --exclude="*~" --exclude="youtube-dl.exe" \
+               --exclude="wine-py2exe/" --exclude="py2exe.log" --exclude="*.kate-swp" \
+               --exclude="build/" --exclude="dist/" --exclude="MANIFEST" --exclude=".git/" .