public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org, dsterba@suse.com
Subject: Re: [PATCH v2 2/2] btrfs-progs Documentation: placeholder for contents.rst file
Date: Wed, 10 Jan 2024 22:52:04 +0100	[thread overview]
Message-ID: <20240110215204.GC31555@twin.jikos.cz> (raw)
In-Reply-To: <5563896f320e169cbd31f13eeba7ca2efb655d6a.1704906806.git.anand.jain@oracle.com>

On Wed, Jan 10, 2024 at 10:55:23PM +0530, Anand Jain wrote:
> Sphinx error:
> master file btrfs-progs/Documentation/contents.rst not found
> make[1]: *** [Makefile:37: man] Error 2
> make: *** [Makefile:502: build-Documentation] Error 2
> 
> This build error is seen on version 1.7.6-3 of the sphinx-build.
> 
> For now, to circumvent the build error, create a placeholder file
> named contents.rst using the Makefile also add its cleanup.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Added to devel, thanks.

> ---
>  .gitignore                | 1 +
>  Documentation/Makefile.in | 8 ++++++++
>  Makefile                  | 7 +++++++
>  3 files changed, 16 insertions(+)
> 
> diff --git a/.gitignore b/.gitignore
> index 26f1940d5546..bb719b41d200 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -79,5 +79,6 @@
>  
>  /Documentation/Makefile
>  /Documentation/_build
> +/Documentation/contents.rst
>  
>  *.patch
> diff --git a/Documentation/Makefile.in b/Documentation/Makefile.in
> index ffc253863ba8..2c036eef00fa 100644
> --- a/Documentation/Makefile.in
> +++ b/Documentation/Makefile.in
> @@ -28,6 +28,12 @@ man5dir = $(mandir)/man5
>  man8dir = $(mandir)/man8
>  
>  .PHONY: all man help
> +.PHONY: contents.rst
> +
> +contents.rst:
> +	@if [ "$$(sphinx-build --version | cut -d' ' -f2)" \< "1.7.7" ]; then \
> +		touch contents.rst; \
> +	fi
>  
>  # Build manual pages by default
>  
> @@ -53,6 +59,8 @@ uninstall:
>  clean:
>  	$(QUIET_RM)$(RM) -rf $(BUILDDIR)/*
>  	$(QUIET_RM)$(RM) -df -- $(BUILDDIR)
> +	$(QUIET_RM)$(RM) -f contents.rst
> +
>  
>  # Catch-all target: route all unknown targets to Sphinx using the new
>  # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
> diff --git a/Makefile b/Makefile
> index 374f59b99150..a031b0726a9c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -417,6 +417,12 @@ endif
>  .PHONY: $(CLEANDIRS)
>  .PHONY: all install clean
>  .PHONY: FORCE
> +.PHONY: contents.rst
> +
> +contents.rst:
> +	@if [ "$$(sphinx-build --version | cut -d' ' -f2)" \< "1.7.7" ]; then \
> +		touch Documentation/contents.rst; \
> +	fi
>  
>  # Create all the static targets
>  static_objects = $(patsubst %.o, %.static.o, $(objects))
> @@ -910,6 +916,7 @@ endif
>  clean-doc:
>  	@echo "Cleaning Documentation"
>  	$(Q)$(MAKE) $(MAKEOPTS) -C Documentation clean
> +	$(Q)$(RM) -f -- Documentation/contents.rst

You don't need to remove the file again, it's in the clean: target in
the documentation directory.

  reply	other threads:[~2024-01-10 21:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10 17:25 [PATCH v2 0/2] btrfs-progs: Documentation: fix compile an error and Anand Jain
2024-01-10 17:25 ` [PATCH v2 1/2] btrfs-progs: Documentation: fix sphinx code-block warning Anand Jain
2024-01-10 17:25 ` [PATCH v2 2/2] btrfs-progs Documentation: placeholder for contents.rst file Anand Jain
2024-01-10 21:52   ` David Sterba [this message]
2024-01-11  4:20     ` Anand Jain
2024-01-11  4:21 ` [PATCH] btrfs-progs: fixup: v2 " Anand Jain
2024-01-11 16:05   ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240110215204.GC31555@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox