[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-commits
Subject:    svn commit: r1883939 - /subversion/trunk/Makefile.in
From:       brane () apache ! org
Date:       2020-11-29 20:17:19
Message-ID: 20201129201719.A3E2417A67F () svn01-us-east ! apache ! org
[Download RAW message or body]

Author: brane
Date: Sun Nov 29 20:17:19 2020
New Revision: 1883939

URL: http://svn.apache.org/viewvc?rev=1883939&view=rev
Log:
Fix 'make clean' in an out-of-tree build if bindings been built yet.

* Makefile.in (fast-clean, clean-swig-pl, clean-swig-py, clean-swig-rb):
   Check that paths exist before trying to 'cd' to them or 'find' in them.

Modified:
    subversion/trunk/Makefile.in

Modified: subversion/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/trunk/Makefile.in?rev=1883939&r1=1883938&r2=1883939&view=diff
 ==============================================================================
--- subversion/trunk/Makefile.in (original)
+++ subversion/trunk/Makefile.in Sun Nov 29 20:17:19 2020
@@ -456,9 +456,12 @@ fast-clean: doc-clean
           fi                                                         \
         done
 	echo $(CLEAN_FILES) | xargs rm -f --
-	find $(CTYPES_PYTHON_SRC_DIR) $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR) \
-		$(abs_srcdir)/build $(top_srcdir)/subversion/tests/cmdline/svntest \
-		-name "*.pyc" -exec rm {} ';'
+	for d in $(CTYPES_PYTHON_SRC_DIR) $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR) \
+		$(abs_srcdir)/build $(top_srcdir)/subversion/tests/cmdline/svntest; \
+	do \
+	  test -e $$d || continue; \
+	  find $$d -name "*.pyc" -exec rm {} ';'; \
+	done
 
 # clean everything, returning to before './configure' was run.
 SVN_CONFIG_SCRIPT_FILES = @SVN_CONFIG_SCRIPT_FILES@
@@ -919,7 +922,7 @@ clean-swig-pl:
 	fi
 	for d in $(SWIG_PL_DIR)/libsvn_swig_perl; \
 	do \
-	  cd $$d; \
+	  test -e $$d && cd $$d || continue; \
 	  rm -rf *.lo *.la *.o .libs; \
 	done
 	if [ -f "$(SWIG_PL_DIR)/native/Makefile" ]; then \
@@ -956,9 +959,14 @@ clean-swig-py:
 	fi
 	for d in $(SWIG_PY_DIR) $(SWIG_PY_DIR)/libsvn_swig_py; \
 	do \
-	  cd $$d && rm -rf *.lo *.la *.o *.pyc .libs; \
+	  test -e $$d && cd $$d || continue; \
+	  rm -rf *.lo *.la *.o *.pyc .libs; \
+	done
+	for d in $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR); \
+	do \
+	  test -e $$d || continue; \
+	  find $$d -name "*.pyc" -exec rm {} ';'; \
 	done
-	find $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR) -name "*.pyc" -exec rm {} ';'
 
 extraclean-swig-py: clean-swig-py
 	$(EXTRACLEAN_SWIG_PY)
@@ -989,7 +997,7 @@ clean-swig-rb:
 	fi
 	for d in $(SWIG_RB_DIR) $(SWIG_RB_DIR)/libsvn_swig_ruby; \
 	do \
-	  cd $$d; \
+	  test -e $$d && cd $$d || continue; \
 	  rm -rf *.lo *.la *.o .libs; \
 	done
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic