From b8026cc02f6b7639afd83cbd4e0419963d8c9428 Mon Sep 17 00:00:00 2001 From: Karl Wette Date: Thu, 29 May 2014 14:35:23 +0200 Subject: [PATCH] Fix cleaning of Python runme.py scripts for in-source-tree builds --- Examples/Makefile.in | 2 +- Examples/test-suite/python/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples/Makefile.in b/Examples/Makefile.in index b1b460c56..521df3a70 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -402,7 +402,7 @@ python_clean: rm -f *.@OBJEXT@ *@SO@ *@PYTHON_SO@ rm -f $(TARGET).py if test -f $(SRCDIR)$(RUNME).py; then rm -f $(RUNME)3.py $(RUNME)3.py.bak; fi - if test "x$(SRCDIR)" != x; then rm -f $(RUNME).py; fi + case "x$(SRCDIR)" in x|x./);; *) rm -f $(RUNME).py;; esac ################################################################## diff --git a/Examples/test-suite/python/Makefile.in b/Examples/test-suite/python/Makefile.in index 87443cb57..9673d7da1 100644 --- a/Examples/test-suite/python/Makefile.in +++ b/Examples/test-suite/python/Makefile.in @@ -161,7 +161,7 @@ endif %.clean: @rm -f $*.py @if test -f $(srcdir)/$(py2_runme); then rm -f $(SCRIPTDIR)/$(py3_runme) $(SCRIPTDIR)/$(py3_runme).bak; fi - @if test "x$(SRCDIR)" != x; then rm -f $(SCRIPTDIR)/$(py2_runme); fi + @if test "x$(SCRIPTDIR)" != "x$(srcdir)"; then rm -f $(SCRIPTDIR)/$(py2_runme); fi clean: $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR="$(SRCDIR)" python_clean