Makefile install: Add --no-run-if-empty to xargs.

pull/118/head
Paul Sokolovsky 2014-05-11 12:22:03 +03:00
rodzic cc4cd5b47a
commit 2d8fde40a4
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -3,13 +3,14 @@ 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)"
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 --no-run-if-empty cp -r -t $(PREFIX)"
install:
@mkdir -p $(PREFIX)
@if [ -n "$(MOD)" ]; then \
(cd $(MOD); sh -c $(CMD)); \
else \
for d in $$(find -maxdepth 1 -type d ! -name ".*"); do \
echo $$d; \
(cd $$d; sh -c $(CMD)); \
done \
fi