subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1198883 - /subversion/trunk/Makefile.in
Date Mon, 07 Nov 2011 19:22:28 GMT
Author: danielsh
Date: Mon Nov  7 19:22:28 2011
New Revision: 1198883

URL: http://svn.apache.org/viewvc?rev=1198883&view=rev
Log:
Allow "make extraclean-swig" and "make swig-pl" in VPATH builds without
requiring the user to run "make mkdir-init" by hand first.

* Makefile.in
  (swig-pl, $(SWIG_PY_DIR)/libsvn): Depend on mkdir-init.
  (schema-clean, clean-swig-pl, clean-swig-py, clean-swig-rb): Check if
    directories exist before cleaning them.

Patch by: Jonathan Nieder <jrnieder@gmail.com>

Review by: philip
           danielsh
(philip noticed that this should use mkdir-init instead of reimplementing
it poorly.  danielsh helped pare down the patch.)

Modified:
    subversion/trunk/Makefile.in

Modified: subversion/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/trunk/Makefile.in?rev=1198883&r1=1198882&r2=1198883&view=diff
==============================================================================
--- subversion/trunk/Makefile.in (original)
+++ subversion/trunk/Makefile.in Mon Nov  7 19:22:28 2011
@@ -648,7 +648,9 @@ schema-xsd: $(SCHEMAS_XSD)
 $(SCHEMAS_RNG) $(SCHEMAS_DTD) $(SCHEMAS_XSD): $(SCHEMA_DIR)/common.rnc
 
 schema-clean:
-	(cd $(SCHEMA_DIR) && rm -f *.rng *.dtd *.xsd)
+	if test -d $(SCHEMA_DIR); then \
+	    (cd $(SCHEMA_DIR) && rm -f *.rng *.dtd *.xsd); \
+	fi
 
 #
 # Implicit rules for creating outputs from input files
@@ -748,7 +750,7 @@ $(SWIG_PL_DIR)/native/Makefile: $(SWIG_P
 READLINK_PY=$(PYTHON) -c 'import sys,os; print(os.path.realpath(sys.argv[1]))'
 READLINK_PL=$(PERL) -e 'use Cwd; print Cwd::realpath(shift)'
 
-swig-pl_DEPS = autogen-swig-pl libsvn_swig_perl \
+swig-pl_DEPS = mkdir-init autogen-swig-pl libsvn_swig_perl \
   $(SWIG_PL_DIR)/native/Makefile
 swig-pl: $(swig-pl_DEPS)
 	if test "`$(READLINK_PL) $(SWIG_PL_DIR)`" != "`$(READLINK_PL) $(SWIG_PL_SRC_DIR)`"; then
\
@@ -772,11 +774,10 @@ clean-swig-pl:
 	if test -z "$(RELEASE_MODE)"; then \
 	  $(EXTRACLEAN_SWIG_PL); \
 	fi
-	for d in $(SWIG_PL_DIR)/libsvn_swig_perl; \
-	do \
-	  cd $$d; \
+	if [ -d "$(SWIG_PL_DIR)/libsvn_swig_perl" ]; then \
+	  cd "$(SWIG_PL_DIR)/libsvn_swig_perl"; \
 	  rm -rf *.lo *.la *.o .libs; \
-	done
+	fi
 	if [ -f "$(SWIG_PL_DIR)/native/Makefile" ]; then \
 	  cd $(SWIG_PL_DIR)/native; $(MAKE) clean; \
 	fi
@@ -784,7 +785,7 @@ clean-swig-pl:
 extraclean-swig-pl: clean-swig-pl
 	$(EXTRACLEAN_SWIG_PL)
 
-$(SWIG_PY_DIR)/libsvn:
+$(SWIG_PY_DIR)/libsvn: mkdir-init
 	mkdir $(SWIG_PY_DIR)/libsvn
 
 copy-swig-py: autogen-swig-py $(SWIG_PY_DIR)/libsvn
@@ -808,9 +809,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; \
+	  if test -d $$d; then \
+	    cd $$d && rm -rf *.lo *.la *.o *.pyc .libs; \
+	  fi; \
 	done
-	find $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR) -name "*.pyc" -exec rm {} ';'
+	find $(SWIG_PY_SRC_DIR) -name "*.pyc" -exec rm {} ';'
+	if test -d $(SWIG_PY_DIR); then \
+	  find $(SWIG_PY_DIR) -name "*.pyc" -exec rm {} ';'; \
+	fi
 
 extraclean-swig-py: clean-swig-py
 	$(EXTRACLEAN_SWIG_PY)
@@ -832,8 +838,10 @@ clean-swig-rb:
 	fi
 	for d in $(SWIG_RB_DIR) $(SWIG_RB_DIR)/libsvn_swig_ruby; \
 	do \
-	  cd $$d; \
-	  rm -rf *.lo *.la *.o .libs; \
+	  if test -d $$d; then \
+	    cd $$d; \
+	    rm -rf *.lo *.la *.o .libs; \
+	  fi; \
 	done
 
 extraclean-swig-rb: clean-swig-rb



Mime
View raw message