提交 2d5158d3 编写于 作者: C Cleber Rosa

Makefile: add support for setup.py in targets link/clean

The `link` and `clean` targets, very useful under development
environments, have supported directories containing `Makefiles`.

It turns out that for some plugins it may be enough (and more
Pythonic) to just have `setup.py` files, so let's support that.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 2e732e92
...@@ -103,7 +103,10 @@ clean: ...@@ -103,7 +103,10 @@ clean:
rm -rf docs/build rm -rf docs/build
find docs/source/api/ -name '*.rst' -delete find docs/source/api/ -name '*.rst' -delete
for MAKEFILE in $(AVOCADO_PLUGINS); do\ for MAKEFILE in $(AVOCADO_PLUGINS); do\
if test -f $$MAKEFILE/Makefile; then AVOCADO_DIRNAME=$(AVOCADO_DIRNAME) make -C $$MAKEFILE unlink &>/dev/null && echo ">> UNLINK $$MAKEFILE" || echo ">> SKIP $$MAKEFILE"; fi;\ if test -f $$MAKEFILE/Makefile -o -f $$MAKEFILE/setup.py; then echo ">> UNLINK $$MAKEFILE";\
if test -f $$MAKEFILE/Makefile; then AVOCADO_DIRNAME=$(AVOCADO_DIRNAME) make -C $$MAKEFILE unlink &>/dev/null;\
elif test -f $$MAKEFILE/setup.py; then cd $$MAKEFILE; $(PYTHON) setup.py develop --uninstall $(shell $(PYTHON26) || echo --user); cd -; fi;\
else echo ">> SKIP $$MAKEFILE"; fi;\
done done
$(PYTHON) setup.py develop --uninstall $(shell $(PYTHON26) || echo --user) $(PYTHON) setup.py develop --uninstall $(shell $(PYTHON26) || echo --user)
rm -rf avocado.egg-info rm -rf avocado.egg-info
...@@ -152,7 +155,10 @@ develop: ...@@ -152,7 +155,10 @@ develop:
link: develop link: develop
for MAKEFILE in $(AVOCADO_PLUGINS); do\ for MAKEFILE in $(AVOCADO_PLUGINS); do\
if test -f $$MAKEFILE/Makefile; then AVOCADO_DIRNAME=$(AVOCADO_DIRNAME) make -C $$MAKEFILE link &>/dev/null && echo ">> LINK $$MAKEFILE" || echo ">> SKIP $$MAKEFILE"; fi;\ if test -f $$MAKEFILE/Makefile -o -f $$MAKEFILE/setup.py; then echo ">> LINK $$MAKEFILE";\
if test -f $$MAKEFILE/Makefile; then AVOCADO_DIRNAME=$(AVOCADO_DIRNAME) make -C $$MAKEFILE link &>/dev/null;\
elif test -f $$MAKEFILE/setup.py; then cd $$MAKEFILE; $(PYTHON) setup.py develop $(shell $(PYTHON26) || echo --user); cd -; fi;\
else echo ">> SKIP $$MAKEFILE"; fi;\
done done
spell: spell:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册