Prevent doc/src/sgml subdirs from being created, instead of deleting
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 24 Sep 2010 05:32:52 +0000 (01:32 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 24 Sep 2010 05:32:52 +0000 (01:32 -0400)
them after the fact.  This is a more elegant fix for bug #5595.

config/prep_buildtree

index 2527812f1264a57062a578a4d5de4f3839301ffd..30572326d44a4acac77f2b907320fc9d3b382003 100644 (file)
@@ -22,7 +22,11 @@ sourcetree=`cd $1 && pwd`
 
 buildtree=`cd ${2:-'.'} && pwd`
 
-for item in `find "$sourcetree" -type d \( \( -name CVS -prune \) -o \( -name .git -prune \) -o -print \)`; do
+# We must not auto-create the subdirectories holding built documentation.
+# If we did, it would interfere with installation of prebuilt docs from
+# the source tree, if a VPATH build is done from a distribution tarball.
+# See bug #5595.
+for item in `find "$sourcetree" -type d \( \( -name CVS -prune \) -o \( -name .git -prune \) -o \( -path "$sourcetree/doc/src/sgml/*" -prune \) -o -print \)`; do
     subdir=`expr "$item" : "$sourcetree\(.*\)"`
     if test ! -d "$buildtree/$subdir"; then
         mkdir -p "$buildtree/$subdir" || exit 1
@@ -38,13 +42,4 @@ for item in `find "$sourcetree" -name Makefile -print -o -name GNUmakefile -prin
     fi
 done
 
-# We must not auto-create the subdirectories holding built documentation.
-# If we did, it would interfere with installation of prebuilt docs from
-# the source tree, if a VPATH build is done from a distribution tarball.
-# See bug #5595.
-rmdir "$buildtree/doc/src/sgml/html" 2>/dev/null
-rmdir "$buildtree/doc/src/sgml/man1" 2>/dev/null
-rmdir "$buildtree/doc/src/sgml/man3" 2>/dev/null
-rmdir "$buildtree/doc/src/sgml/man7" 2>/dev/null
-
 exit 0