make install: Bunch more shell magic for cleaner installs.

asyncio-segfault
Paul Sokolovsky 2014-04-22 01:12:02 +03:00
rodzic 56454eba33
commit fb3300974f
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -3,12 +3,13 @@ PREFIX = ~/.micropython/lib
all:
# Installs all modules to a lib location, for development testing
CMD="find . -maxdepth 1 -mindepth 1 \( -name '*.py' -not -name 'test_*' -not -name 'setup.py' \) -or \( -type d -not -name 'dist' -not -name '*.egg-info' -not -name '__pycache__' \)| xargs cp -r -t $(PREFIX)"
install:
@mkdir -p $(PREFIX)
@if [ -n "$(MOD)" ]; then \
(cd $(MOD); cp -r * $(PREFIX)); \
(cd $(MOD); sh -c $(CMD)); \
else \
for d in $$(find -maxdepth 1 -type d ! -name ".*"); do \
(cd $$d; cp -r * $(PREFIX)); \
(cd $$d; sh -c $(CMD)); \
done \
fi