[LTP] [PATCH v4 4/5] Makefile: Update 'doc' target, add 'doc-clean'

Ricardo B. Marlière rbm@suse.com
Fri Mar 28 12:36:03 CET 2025


Hi Petr,

On Fri Mar 28, 2025 at 6:57 AM -03, Petr Vorel wrote:
> 'doc' target previously run docparse documentation. Point it to doc/
> directory so that it build sphinx docs. doc/ dir has metadata/ dir as
> dependency, no need to specify it. Call also '.venv' target.
>
> NOTE: it's still possible to avoid virtualenv by calling 'make -C doc'
>
> Add 'doc-clean': to remove only generated data (not optional .venv).
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Changes in v4:
> * Use 'setup' instead of '.venv' in the top level doc target
>
>  Makefile | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 5066789349..6aa77e1b9b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -170,7 +170,13 @@ INSTALL_TARGETS		+= $(addprefix $(DESTDIR)/$(bindir)/,$(BINDIR_INSTALL_SCRIPTS))
>  $(INSTALL_TARGETS): $(INSTALL_DIR) $(DESTDIR)/$(bindir)
>  
>  .PHONY: doc
> -doc: metadata-all
> +doc:
> +	$(MAKE) -C $(abs_builddir)/doc setup
> +	$(MAKE) -C $(abs_builddir)/doc
> +
> +.PHONY: doc-clean
> +doc-clean:
> +	$(MAKE) -C $(abs_builddir)/doc clean

IMO the top-level clean and distclean targets should be responsible of
calling the respective targets in doc/Makefile, what do you think?

>  
>  .PHONY: check
>  check: $(CHECK_TARGETS)



More information about the ltp mailing list