mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 13:44:14 +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:
parent
bd1ae14e53
commit
23ed1b840b
6
Makefile
6
Makefile
@ -1,6 +1,6 @@
|
||||
all: svtplay-dl
|
||||
|
||||
.PHONY: test cover pylint
|
||||
.PHONY: test cover pylint svtplay-dl
|
||||
|
||||
clean:
|
||||
rm -f svtplay-dl
|
||||
@ -14,8 +14,8 @@ install: svtplay-dl
|
||||
install -d $(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
|
||||
cd lib; $(MAKE)
|
||||
svtplay-dl: $(PYFILES)
|
||||
$(MAKE) -C lib
|
||||
mv lib/svtplay-dl .
|
||||
|
||||
test:
|
||||
|
10
lib/Makefile
10
lib/Makefile
@ -3,6 +3,12 @@ all: svtplay-dl
|
||||
clean:
|
||||
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
|
||||
BINDIR=$(PREFIX)/bin
|
||||
PYTHON=/usr/bin/env python
|
||||
@ -11,8 +17,8 @@ install: svtplay-dl
|
||||
install -d $(DESTDIR)$(BINDIR)
|
||||
install -m 755 svtplay-dl $(DESTDIR)$(BINDIR)
|
||||
|
||||
svtplay-dl: svtplay_dl/*py svtplay_dl/fetcher/*py svtplay_dl/service/*py
|
||||
zip --quiet svtplay-dl svtplay_dl/*py svtplay_dl/fetcher/*py svtplay_dl/service/*py
|
||||
svtplay-dl: $(PYFILES)
|
||||
zip --quiet svtplay-dl $(PYFILES)
|
||||
zip --quiet --junk-paths svtplay-dl svtplay_dl/__main__.py
|
||||
echo '#!$(PYTHON)' > svtplay-dl
|
||||
cat svtplay-dl.zip >> svtplay-dl
|
||||
|
Loading…
Reference in New Issue
Block a user