From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 3/7] doc/Makefile: Improve make targets
Date: Thu, 6 Feb 2025 16:05:08 +0100 [thread overview]
Message-ID: <20250206150508.GC1573569@pevik> (raw)
In-Reply-To: <3032b376-8f7a-4b1c-8422-f5a61e59b680@suse.com>
> Hi Petr,
> On 2/6/25 15:34, Petr Vorel wrote:
> > * add _static/syscalls.rst into clean target)
> > * add targets:
> > - .venv
> > - distclean target (for .venv)
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > doc/Makefile | 20 ++++++++++++++++----
> > 1 file changed, 16 insertions(+), 4 deletions(-)
> > diff --git a/doc/Makefile b/doc/Makefile
> > index e536e95db6..0f67721ef5 100644
> > --- a/doc/Makefile
> > +++ b/doc/Makefile
> > @@ -1,8 +1,20 @@
> > -all:
> > - sphinx-build -b html . html
> > +PYTHON := python3
> > +
> > +# install sphinx only if needed
> > +INSTALL_SPHINX := $(shell $(PYTHON) -c "import sphinx" 2>/dev/null && echo "true" || echo "pip install sphinx")
> > +
> > +.venv:
> > + $(PYTHON) -m virtualenv .venv
> > + . .venv/bin/activate && pip install -r requirements.txt && $(INSTALL_SPHINX)
> > +
> > +all: .venv
> > + . .venv/bin/activate && sphinx-build -b html . html
> The reason why we didn't have virtualenv dependency in the makefie is that
> every distro has their own python packages as well.
> virtualenv requires pip, but it's not strictly needed. For example, that
> could be don't inside a container for development reasons and the venv
> activation wouldn't be possible.
> I would suggest to keep the previous version, without the virtualenv
> dependency for this reason.
I hoped using virtualenv would actually help developers. Because doc/ is not
parsed by top level Makefile, therefore rpm/deb packages will not build it.
But OK, let's drop this change, I'll send v2.
Kind regards,
Petr
> > spelling:
> > - sphinx-build -b spelling -d build/doctree . build/spelling
> > + . .venv/bin/activate && sphinx-build -b spelling -d build/doctree . build/spelling
> > clean:
> > - rm -rf html/
> > + rm -rf html/ _static/syscalls.rst
> Good idea, maybe also _static/tests.rst since we added it.
Now I'll add just _static/, to be always valid. Also, change in tests does not
trigger the need of rebuild, therefore one must always run 'make clean', but I
haven't tried to figure out how to express the dependency.
Kind regards,
Petr
> > +
> > +distclean: clean
> > + rm -rf .venv/
> Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-02-06 15:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 14:34 [LTP] [PATCH 0/7] configure.ac and make cleanup Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 1/7] realtime: Document bash and python3 dependencies Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 2/7] configure: Ignore --with-{bash,python} knobs Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 3/7] doc/Makefile: Improve make targets Petr Vorel
2025-02-06 14:59 ` Andrea Cervesato via ltp
2025-02-06 15:05 ` Petr Vorel [this message]
2025-02-06 14:34 ` [LTP] [PATCH 4/7] doc: documentation.rst: Update build instructions Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 5/7] .github: ci-sphinx-doc: Use make for building doc Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 6/7] configure: make: Add SPDX, update copyright Petr Vorel
2025-02-06 14:34 ` [LTP] [PATCH 7/7] doc/Makefile: Add dependency on metadata/ltp.json Petr Vorel
2025-02-06 15:00 ` Petr Vorel
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=20250206150508.GC1573569@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.com \
--cc=ltp@lists.linux.it \
/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