Example and test-suite makefile tidy up
Python output is less verbose if pep8 is not available (tweaks for patch #416)
This commit is contained in:
parent
2348d8377f
commit
0f94ea9208
2 changed files with 18 additions and 25 deletions
|
|
@ -66,9 +66,6 @@ LIBCRYPT = @LIBCRYPT@
|
||||||
SYSLIBS = $(LIBM) $(LIBC) $(LIBCRYPT)
|
SYSLIBS = $(LIBM) $(LIBC) $(LIBCRYPT)
|
||||||
LIBPREFIX =
|
LIBPREFIX =
|
||||||
|
|
||||||
PEP8 = @PEP8@
|
|
||||||
PEP8_FLAGS = --ignore=E402,E501,E30,W291,W391
|
|
||||||
|
|
||||||
# RUNTOOL is for use with runtime tools, eg set it to valgrind
|
# RUNTOOL is for use with runtime tools, eg set it to valgrind
|
||||||
RUNTOOL =
|
RUNTOOL =
|
||||||
# COMPILETOOL is a way to run the compiler under another tool, or more commonly just to stop the compiler executing
|
# COMPILETOOL is a way to run the compiler under another tool, or more commonly just to stop the compiler executing
|
||||||
|
|
@ -324,6 +321,9 @@ else
|
||||||
SWIGPYTHON = $(SWIG) -python -py3
|
SWIGPYTHON = $(SWIG) -python -py3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
PEP8 = @PEP8@
|
||||||
|
PEP8_FLAGS = --ignore=E402,E501,E30,W291,W391
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
# Build a C dynamically loadable module
|
# Build a C dynamically loadable module
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
@ -375,9 +375,11 @@ endif
|
||||||
|
|
||||||
PY2TO3 = 2to3 `2to3 -l | grep -v -E "Available|import$$" | awk '{print "-f "$$0}'`
|
PY2TO3 = 2to3 `2to3 -l | grep -v -E "Available|import$$" | awk '{print "-f "$$0}'`
|
||||||
|
|
||||||
python_run: $(PYSCRIPT) python_check
|
python_run: $(PYSCRIPT)
|
||||||
export PYTHONPATH=".:$$PYTHONPATH"; \
|
ifneq (,$(PEP8))
|
||||||
$(RUNTOOL) $(PYTHON) $(PYSCRIPT) $(RUNPIPE)
|
$(PEP8) $(PEP8_FLAGS) $(PYSCRIPT)
|
||||||
|
endif
|
||||||
|
env PYTHONPATH=$$PWD $(RUNTOOL) $(PYTHON) $(PYSCRIPT) $(RUNPIPE)
|
||||||
|
|
||||||
ifneq (,$(SRCDIR))
|
ifneq (,$(SRCDIR))
|
||||||
$(RUNME).py: $(SRCDIR)$(RUNME).py
|
$(RUNME).py: $(SRCDIR)$(RUNME).py
|
||||||
|
|
@ -388,16 +390,6 @@ $(RUNME)3.py: $(SRCDIR)$(RUNME).py
|
||||||
cp $< $@
|
cp $< $@
|
||||||
$(PY2TO3) -w $@ >/dev/null 2>&1
|
$(PY2TO3) -w $@ >/dev/null 2>&1
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
|
||||||
# Run Python pep8 if it exists
|
|
||||||
# -----------------------------------------------------------------
|
|
||||||
|
|
||||||
python_check: $(PYSCRIPT)
|
|
||||||
+if [ -n "$(PEP8)" ]; then \
|
|
||||||
$(PEP8) $(PEP8_FLAGS) $(PYSCRIPT) || true;\
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Version display
|
# Version display
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
@ -1742,7 +1734,7 @@ scilab_cpp:
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
scilab_run:
|
scilab_run:
|
||||||
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(SCILAB) $(SCILAB_OPT) -f $(SRCDIR)$(RUNME).sci $(RUNPIPE)
|
env LD_LIBRARY_PATH=$$PWD $(RUNTOOL) $(SCILAB) $(SCILAB_OPT) -f $(SRCDIR)$(RUNME).sci $(RUNPIPE)
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Scilab version
|
# Scilab version
|
||||||
|
|
@ -1765,6 +1757,10 @@ scilab_clean:
|
||||||
##### Go ######
|
##### Go ######
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
|
# TODO: The Go make targets need simplifying to use configure time
|
||||||
|
# configuration or to use Make's ifeq rather than using lots of
|
||||||
|
# runtime shell code. The output will then be a lot less verbose.
|
||||||
|
|
||||||
GO = @GO@
|
GO = @GO@
|
||||||
GOGCC = @GOGCC@
|
GOGCC = @GOGCC@
|
||||||
GCCGO = @GCCGO@
|
GCCGO = @GCCGO@
|
||||||
|
|
|
||||||
|
|
@ -125,17 +125,14 @@ py_runme = $(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
||||||
py2_runme = $(SCRIPTPREFIX)$*$(PY2SCRIPTSUFFIX)
|
py2_runme = $(SCRIPTPREFIX)$*$(PY2SCRIPTSUFFIX)
|
||||||
py3_runme = $(SCRIPTPREFIX)$*$(PY3SCRIPTSUFFIX)
|
py3_runme = $(SCRIPTPREFIX)$*$(PY3SCRIPTSUFFIX)
|
||||||
|
|
||||||
check_pep8 = \
|
ifneq (,$(PEP8))
|
||||||
if [ -n "$(PEP8)" ]; then \
|
check_pep8 = $(PEP8) $(PEP8_FLAGS) $(SCRIPTPREFIX)$*.py
|
||||||
$(PEP8) $(PEP8_FLAGS) $(SCRIPTPREFIX)$*.py;\
|
|
||||||
fi
|
|
||||||
|
|
||||||
check_pep8_multi_cpp = \
|
check_pep8_multi_cpp = \
|
||||||
if [ -n "$(PEP8)" ]; then \
|
for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
|
||||||
for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
|
|
||||||
$(PEP8) $(PEP8_FLAGS) $$f.py; \
|
$(PEP8) $(PEP8_FLAGS) $$f.py; \
|
||||||
done \
|
done
|
||||||
fi
|
endif
|
||||||
|
|
||||||
run_python = env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=.:$(srcdir):$$PYTHONPATH $(RUNTOOL) $(PYTHON) $(py_runme)
|
run_python = env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=.:$(srcdir):$$PYTHONPATH $(RUNTOOL) $(PYTHON) $(py_runme)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue