Fix makefile recursion when running python test-suite.
Use terminal / double-colon rules in makefile pattern matching rule to prevent recursion reported on some versions of make. Closes #688
This commit is contained in:
parent
4930fab5a0
commit
eb81355196
2 changed files with 11 additions and 4 deletions
|
|
@ -7,6 +7,9 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
||||||
Version 4.0.0 (in progress)
|
Version 4.0.0 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2018-08-18: wsfulton
|
||||||
|
[Python] #688 Fix makefile recursion when running python test-suite.
|
||||||
|
|
||||||
2018-08-18: wsfulton
|
2018-08-18: wsfulton
|
||||||
[Python] #1310 Re-implement Python -fastproxy option.
|
[Python] #1310 Re-implement Python -fastproxy option.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,8 @@ run_testcase = \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Grab runme file ready for running: copied for out of source tree builds, and/or run 2to3
|
# Grab runme file ready for running: copied for out of source tree builds, and/or run 2to3
|
||||||
|
# Note terminal (double colon) rules creating runme files to fix possible infinite recursion,
|
||||||
|
# see https://github.com/swig/swig/pull/688
|
||||||
ifeq ($(SCRIPTDIR),$(srcdir))
|
ifeq ($(SCRIPTDIR),$(srcdir))
|
||||||
# in source tree build
|
# in source tree build
|
||||||
ifeq (,$(PY3))
|
ifeq (,$(PY3))
|
||||||
|
|
@ -167,7 +169,8 @@ ifeq ($(SCRIPTDIR),$(srcdir))
|
||||||
$(MAKE) $(SCRIPTDIR)/$(py_runme); \
|
$(MAKE) $(SCRIPTDIR)/$(py_runme); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX): $(srcdir)/$(SCRIPTPREFIX)%$(PY2SCRIPTSUFFIX)
|
# For converting python 2 tests into Python 3 tests
|
||||||
|
$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX):: $(srcdir)/$(SCRIPTPREFIX)%$(PY2SCRIPTSUFFIX)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
$(PY2TO3) -w $@ >/dev/null 2>&1
|
$(PY2TO3) -w $@ >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
@ -180,7 +183,7 @@ else
|
||||||
$(MAKE) $(SCRIPTDIR)/$(py_runme); \
|
$(MAKE) $(SCRIPTDIR)/$(py_runme); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX): $(srcdir)/$(SCRIPTPREFIX)%$(PY2SCRIPTSUFFIX)
|
$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX):: $(srcdir)/$(SCRIPTPREFIX)%$(PY2SCRIPTSUFFIX)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
@ -192,10 +195,11 @@ $(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX): $(srcdir)/$(SCRIPTPREFIX)%$(PY2SCR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For when there is a _runme3.py instead of a _runme.py, ie a Python 3 only run test
|
# For when there is a _runme3.py instead of a _runme.py, ie a Python 3 only run test
|
||||||
$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX): $(srcdir)/$(SCRIPTPREFIX)%$(PY3SCRIPTSUFFIX)
|
$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX):: $(srcdir)/$(SCRIPTPREFIX)%$(PY3SCRIPTSUFFIX)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX): $(srcdir)/$(SCRIPTPREFIX)%$(PY2SCRIPTSUFFIX)
|
# For converting python 2 tests into Python 3 tests
|
||||||
|
$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX):: $(srcdir)/$(SCRIPTPREFIX)%$(PY2SCRIPTSUFFIX)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
$(PY2TO3) -w $@ >/dev/null 2>&1
|
$(PY2TO3) -w $@ >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue