Skip to content

Commit fde5ce4

Browse files
committed
Prevent doc/src/sgml subdirs from being created, instead of deleting
them after the fact. This is a more elegant fix for bug #5595.
1 parent 0a8ed2c commit fde5ce4

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

config/prep_buildtree

+5-10
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ sourcetree=`cd $1 && pwd`
2222

2323
buildtree=`cd ${2:-'.'} && pwd`
2424

25-
for item in `find "$sourcetree" -type d \( \( -name CVS -prune \) -o \( -name .git -prune \) -o -print \)`; do
25+
# We must not auto-create the subdirectories holding built documentation.
26+
# If we did, it would interfere with installation of prebuilt docs from
27+
# the source tree, if a VPATH build is done from a distribution tarball.
28+
# See bug #5595.
29+
for item in `find "$sourcetree" -type d \( \( -name CVS -prune \) -o \( -name .git -prune \) -o \( -path "$sourcetree/doc/src/sgml/*" -prune \) -o -print \)`; do
2630
subdir=`expr "$item" : "$sourcetree\(.*\)"`
2731
if test ! -d "$buildtree/$subdir"; then
2832
mkdir -p "$buildtree/$subdir" || exit 1
@@ -38,13 +42,4 @@ for item in `find "$sourcetree" -name Makefile -print -o -name GNUmakefile -prin
3842
fi
3943
done
4044

41-
# We must not auto-create the subdirectories holding built documentation.
42-
# If we did, it would interfere with installation of prebuilt docs from
43-
# the source tree, if a VPATH build is done from a distribution tarball.
44-
# See bug #5595.
45-
rmdir "$buildtree/doc/src/sgml/html" 2>/dev/null
46-
rmdir "$buildtree/doc/src/sgml/man1" 2>/dev/null
47-
rmdir "$buildtree/doc/src/sgml/man3" 2>/dev/null
48-
rmdir "$buildtree/doc/src/sgml/man7" 2>/dev/null
49-
5045
exit 0

0 commit comments

Comments
 (0)