- 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.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/" .
+ $(PYTHON) devscripts/prepare_manpage.py >youtube-dl.1.temp.md
+ pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1
+ rm -f youtube-dl.1.temp.md
+
+youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
+ $(PYTHON) devscripts/bash-completion.py
+
+bash-completion: youtube-dl.bash-completion
+
+youtube-dl.zsh: youtube_dl/*.py youtube_dl/*/*.py devscripts/zsh-completion.in
+ $(PYTHON) devscripts/zsh-completion.py
+
+zsh-completion: youtube-dl.zsh
+
+youtube-dl.fish: youtube_dl/*.py youtube_dl/*/*.py devscripts/fish-completion.in
+ $(PYTHON) devscripts/fish-completion.py
+
+fish-completion: youtube-dl.fish
+
+youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish
+ @tar -czf youtube-dl.tar.gz --transform "s|^|youtube-dl/|" --owner 0 --group 0 \
+ --exclude '*.DS_Store' \
+ --exclude '*.kate-swp' \
+ --exclude '*.pyc' \
+ --exclude '*.pyo' \
+ --exclude '*~' \
+ --exclude '__pycache' \
+ --exclude '.git' \
+ --exclude 'testdata' \
+ --exclude 'docs/_build' \
+ -- \
+ bin devscripts test youtube_dl docs \
+ LICENSE README.md README.txt \
+ Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion \
+ youtube-dl.zsh youtube-dl.fish setup.py \
+ youtube-dl