1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

Restructure makefiles

This change makes it easier to add new packages; it's only necessary
to update the sub makefile (lib/Makefile) and add new packaes to the
PACKAGES variable.
This commit is contained in:
Olof Johansson 2013-04-21 14:08:41 +02:00
parent bd1ae14e53
commit 23ed1b840b
2 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,6 @@
all: svtplay-dl all: svtplay-dl
.PHONY: test cover pylint .PHONY: test cover pylint svtplay-dl
clean: clean:
rm -f svtplay-dl rm -f svtplay-dl
@ -14,8 +14,8 @@ install: svtplay-dl
install -d $(DESTDIR)$(BINDIR) install -d $(DESTDIR)$(BINDIR)
install -m 755 svtplay-dl $(DESTDIR)$(BINDIR) install -m 755 svtplay-dl $(DESTDIR)$(BINDIR)
svtplay-dl: lib/svtplay_dl/*py lib/svtplay_dl/fetcher/*py lib/svtplay_dl/service/*py svtplay-dl: $(PYFILES)
cd lib; $(MAKE) $(MAKE) -C lib
mv lib/svtplay-dl . mv lib/svtplay-dl .
test: test:

View File

@ -3,6 +3,12 @@ all: svtplay-dl
clean: clean:
rm -f svtplay-dl rm -f svtplay-dl
export PACKAGES = svtplay_dl \
svtplay_dl.fetcher \
svtplay_dl.utils \
svtplay_dl.service
export PYFILES = $(addsuffix /*.py,$(subst .,/,$(PACKAGES)))
PREFIX=/usr/local PREFIX=/usr/local
BINDIR=$(PREFIX)/bin BINDIR=$(PREFIX)/bin
PYTHON=/usr/bin/env python PYTHON=/usr/bin/env python
@ -11,8 +17,8 @@ install: svtplay-dl
install -d $(DESTDIR)$(BINDIR) install -d $(DESTDIR)$(BINDIR)
install -m 755 svtplay-dl $(DESTDIR)$(BINDIR) install -m 755 svtplay-dl $(DESTDIR)$(BINDIR)
svtplay-dl: svtplay_dl/*py svtplay_dl/fetcher/*py svtplay_dl/service/*py svtplay-dl: $(PYFILES)
zip --quiet svtplay-dl svtplay_dl/*py svtplay_dl/fetcher/*py svtplay_dl/service/*py zip --quiet svtplay-dl $(PYFILES)
zip --quiet --junk-paths svtplay-dl svtplay_dl/__main__.py zip --quiet --junk-paths svtplay-dl svtplay_dl/__main__.py
echo '#!$(PYTHON)' > svtplay-dl echo '#!$(PYTHON)' > svtplay-dl
cat svtplay-dl.zip >> svtplay-dl cat svtplay-dl.zip >> svtplay-dl