Commit 06a6f2cc authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

run-in-tempdir: Copy doc/* only if needed

To preserve disk space on copying all files to a temporary directory,
the “doc” directory is only copied when building documentation. A
comment describing the need is also added to, as well as a
superfluous direct invocation of Bash removed.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarGuido Trotter <>
parent e71c47d3
......@@ -612,10 +612,16 @@ if !MANPAGES_IN_DOC
exit 1; \
## Sphinx provides little control over what content should be included. Some
## mechanisms exist, but they all have drawbacks or actual issues. Since we
## build two different versions of the documentation--once without man pages and
## once, if enabled, with them--some control is necessary. xmpp-wrapper provides
## us with this, but requires running in a temporary directory. It moves the
## correct files into place depending on environment variables.
dir=$(dir $@) && \
@mkdir_p@ $$dir && \
$(RUN_IN_TEMPDIR) bash autotools/sphinx-wrapper $(SPHINX) -q -W -b html \
$(RUN_IN_TEMPDIR) autotools/sphinx-wrapper $(SPHINX) -q -W -b html \
-d . \
-D release="$(PACKAGE_VERSION)" \
......@@ -9,10 +9,15 @@ tmpdir=$(mktemp -d -t gntbuild.XXXXXXXX)
trap "rm -rf $tmpdir" EXIT
# fully copy items
cp -r doc autotools daemons scripts lib tools qa $tmpdir
#mkdir $tmpdir/doc
#ln -s $PWD/doc/examples $tmpdir/doc
cp -r autotools daemons scripts lib tools qa $tmpdir
if [[ -z "$COPY_DOC" ]]; then
mkdir $tmpdir/doc
ln -s $PWD/doc/examples $tmpdir/doc
# Building documentation requires all files
cp -r doc $tmpdir
mkdir $tmpdir/test/
cp -r test/py $tmpdir/test/py
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment