[master] 146a28651 symlink documentation source files from $(srcdir) to $(builddir)

Dridi Boukelmoune dridi at varni.sh
Wed Jun 10 08:40:02 UTC 2020


On Wed, Jun 10, 2020 at 8:06 AM Nils Goroll <nils.goroll at uplex.de> wrote:
>
>
> commit 146a28651a140db54b8efd576e971efcd6cc3ae3
> Author: Nils Goroll <nils.goroll at uplex.de>
> Date:   Fri May 8 19:37:16 2020 +0200
>
>     symlink documentation source files from $(srcdir) to $(builddir)
>
>     ... if they differ.
>
>     Ref #3309

There should be a better way to manage this mess. I'm personally
tempted to wrap the sphinx-build execution in a shell script that
merges $(srcdir) and $(builddir) in a temp directory, and specify the
output directory as $(builddir)/html.

This change doesn't pass distcheck.

For rst2man execution I'd need to check all cases to enumerate VPATH quirks.

Question: do we need to keep rules to build all kinds of sphinx output
other than html?

> diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am
> index fa71cacc9..ea010ab1a 100644
> --- a/doc/sphinx/Makefile.am
> +++ b/doc/sphinx/Makefile.am
> @@ -30,9 +30,13 @@ clean:
>  # use index.rst as an indicator if we have copied already
>  .PHONY: link_srcdir
>  link_srcdir:
> -       if test "x$(srcdir)" != "x$(builddir)" && test ! -f index.rst ; then \
> -               d=`pwd`/$(builddir) ; \
> -               cd $(srcdir) && find . -type f | cpio -dmp $${d} || true ; \
> +       if test "x$(srcdir)" != "x$(builddir)" && test ! -f index.rst; then \
> +               s=`realpath $(srcdir)`; \
> +               for f in `cd $$s && find . -type f`; do \
> +                       d=`dirname $$f`; \
> +                       test -d $$d || mkdir -p $$d; \
> +                       test -f $$f || ln -s $$s/$$f $$f; \
> +               done \
>         fi
>
>  # work around for make html called within doc/sphinx
> _______________________________________________
> varnish-commit mailing list
> varnish-commit at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit


More information about the varnish-commit mailing list