mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-23 19:55:38 +01:00
Install manual with make install
(And of course, remove it on clean.)
This commit is contained in:
parent
9c6f0e7d5a
commit
52cc3fe9ca
34
Makefile
34
Makefile
@ -2,26 +2,47 @@ all: svtplay-dl
|
|||||||
|
|
||||||
.PHONY: test cover pylint svtplay-dl
|
.PHONY: test cover pylint svtplay-dl
|
||||||
|
|
||||||
clean:
|
VERSION = 0.9
|
||||||
$(MAKE) -C lib clean
|
|
||||||
rm -f svtplay-dl
|
|
||||||
|
|
||||||
PREFIX?=/usr/local
|
PREFIX?=/usr/local
|
||||||
BINDIR=$(PREFIX)/bin
|
BINDIR=$(PREFIX)/bin
|
||||||
|
MANDIR=$(PREFIX)/share/man/man1
|
||||||
|
|
||||||
|
# Compress the manual if MAN_GZIP is set to y,
|
||||||
|
ifeq ($(MAN_GZIP),y)
|
||||||
|
MANFILE_EXT = .gz
|
||||||
|
endif
|
||||||
|
MANFILE = svtplay-dl.1$(MANFILE_EXT)
|
||||||
|
|
||||||
|
# As pod2man is a perl tool, we have to jump through some hoops
|
||||||
|
# to remove references to perl.. :-)
|
||||||
|
POD2MAN ?= pod2man --section 1 --utf8 -c "svtplay-dl manual" \
|
||||||
|
-r "svtplay-dl $(VERSION)"
|
||||||
|
|
||||||
PYTHON=/usr/bin/env python
|
PYTHON=/usr/bin/env python
|
||||||
export PYTHONPATH=lib
|
export PYTHONPATH=lib
|
||||||
|
|
||||||
# Disable convention, refactor, and TODO warnings
|
# Disable convention, refactor, and TODO warnings
|
||||||
PYLINT_OPTS = -d C -d R -d W0511
|
PYLINT_OPTS = -d C -d R -d W0511
|
||||||
|
|
||||||
install: svtplay-dl
|
install: svtplay-dl $(MANFILE)
|
||||||
install -d $(DESTDIR)$(BINDIR)
|
install -d $(DESTDIR)$(BINDIR)
|
||||||
|
install -d $(DESTDIR)$(MANDIR)
|
||||||
install -m 755 svtplay-dl $(DESTDIR)$(BINDIR)
|
install -m 755 svtplay-dl $(DESTDIR)$(BINDIR)
|
||||||
|
install -m 755 $(MANFILE) $(DESTDIR)$(MANDIR)
|
||||||
|
|
||||||
svtplay-dl: $(PYFILES)
|
svtplay-dl: $(PYFILES)
|
||||||
$(MAKE) -C lib
|
$(MAKE) -C lib
|
||||||
mv lib/svtplay-dl .
|
mv lib/svtplay-dl .
|
||||||
|
|
||||||
|
svtplay-dl.1: svtplay-dl.pod
|
||||||
|
rm -f $@
|
||||||
|
$(POD2MAN) $< $@
|
||||||
|
|
||||||
|
svtplay-dl.1.gz: svtplay-dl.1
|
||||||
|
rm -f $@
|
||||||
|
gzip -9 svtplay-dl.1
|
||||||
|
|
||||||
test:
|
test:
|
||||||
sh run-tests.sh
|
sh run-tests.sh
|
||||||
|
|
||||||
@ -30,3 +51,8 @@ cover:
|
|||||||
|
|
||||||
pylint:
|
pylint:
|
||||||
find lib -name '*.py' -a '!' -path '*/tests/*' | xargs pylint $(PYLINT_OPTS)
|
find lib -name '*.py' -a '!' -path '*/tests/*' | xargs pylint $(PYLINT_OPTS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(MAKE) -C lib clean
|
||||||
|
rm -f svtplay-dl
|
||||||
|
rm -f $(MANFILE)
|
||||||
|
Loading…
Reference in New Issue
Block a user