1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-23 19:55:38 +01:00
svtplay-dl/Makefile

60 lines
1.2 KiB
Makefile
Raw Normal View History

2013-03-23 15:43:05 +01:00
all: svtplay-dl
.PHONY: test cover pylint svtplay-dl
2013-04-21 10:48:20 +02:00
VERSION = 0.9
2013-03-23 15:43:05 +01:00
PREFIX ?= /usr/local
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)"
2014-02-02 15:10:17 +01:00
PYTHON ?= /usr/bin/env python
export PYTHONPATH=lib
2013-03-23 15:43:05 +01:00
# If you don't have a python3 environment (e.g. mock for py3 and
# nosetests3), you can remove the -3 flag.
TEST_OPTS ?= -2 -3
install: svtplay-dl $(MANFILE)
2013-03-23 15:43:05 +01:00
install -d $(DESTDIR)$(BINDIR)
install -d $(DESTDIR)$(MANDIR)
2013-03-23 15:43:05 +01:00
install -m 755 svtplay-dl $(DESTDIR)$(BINDIR)
install -m 755 $(MANFILE) $(DESTDIR)$(MANDIR)
2013-03-23 15:43:05 +01:00
svtplay-dl: $(PYFILES)
$(MAKE) -C lib
2013-03-23 16:30:19 +01:00
mv lib/svtplay-dl .
2013-03-23 17:07:36 +01:00
svtplay-dl.1: svtplay-dl.pod
rm -f $@
$(POD2MAN) $< $@
svtplay-dl.1.gz: svtplay-dl.1
rm -f $@
gzip -9 svtplay-dl.1
2013-03-23 17:07:36 +01:00
test:
sh run-tests.sh $(TEST_OPTS)
2013-04-21 10:48:20 +02:00
cover:
sh run-tests.sh -C
pylint:
2014-12-26 02:11:19 +01:00
$(MAKE) -C lib pylint
clean:
$(MAKE) -C lib clean
rm -f svtplay-dl
rm -f $(MANFILE)