diff mbox series

[1/3] Documentation/Makefile: add missing xsl dependencies for manpages

Message ID e960fec4b492f3edf7bade35862333af5e8704d7.1551123979.git.martin.agren@gmail.com (mailing list archive)
State New, archived
Headers show
Series asciidoctor-extensions: fix spurious space after linkgit | expand

Commit Message

Martin Ågren Feb. 25, 2019, 8:02 p.m. UTC
These stylesheets very rarely change, but when they do, it really helps
if the manpages depend on them. We're casting the net a bit too wide
here, since we'll only ever use a subset of the stylesheets, but since
these files change so rarely, that should be ok. It's better than
missing a dependency.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Sunshine Feb. 25, 2019, 8:08 p.m. UTC | #1
On Mon, Feb 25, 2019 at 3:03 PM Martin Ågren <martin.agren@gmail.com> wrote:
> These stylesheets very rarely change, but when they do, it really helps
> if the manpages depend on them. We're casting the net a bit too wide
> here, since we'll only ever use a subset of the stylesheets, but since
> these files change so rarely, that should be ok. It's better than
> missing a dependency.
>
> Signed-off-by: Martin Ågren <martin.agren@gmail.com>
> ---
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> @@ -354,7 +354,7 @@ $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf
> -%.1 %.5 %.7 : %.xml manpage-base-url.xsl
> +%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)

The wildcard expression also matches the manpage-base-url.xsl
mentioned explicitly. Did you intentionally retain the explicit one or
was that an oversight?
Martin Ågren Feb. 25, 2019, 8:28 p.m. UTC | #2
On Mon, 25 Feb 2019 at 21:08, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Mon, Feb 25, 2019 at 3:03 PM Martin Ågren <martin.agren@gmail.com> wrote:
> > These stylesheets very rarely change, but when they do, it really helps
> > if the manpages depend on them. We're casting the net a bit too wide
> > here, since we'll only ever use a subset of the stylesheets, but since
> > these files change so rarely, that should be ok. It's better than
> > missing a dependency.
> >
> > Signed-off-by: Martin Ågren <martin.agren@gmail.com>
> > ---
> > diff --git a/Documentation/Makefile b/Documentation/Makefile
> > @@ -354,7 +354,7 @@ $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf
> > -%.1 %.5 %.7 : %.xml manpage-base-url.xsl
> > +%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)
>
> The wildcard expression also matches the manpage-base-url.xsl
> mentioned explicitly. Did you intentionally retain the explicit one or
> was that an oversight?

Hmm, I should have mentioned that, thanks for asking for clarification.

It's intentional. You can see in the context how manpage-base-url.xsl is
actually generated, so the wildcard won't be able to expand to mention
it. That's subtle enough that it warrants being mentioned upfront.


Martin
Eric Sunshine Feb. 25, 2019, 9 p.m. UTC | #3
On Mon, Feb 25, 2019 at 3:29 PM Martin Ågren <martin.agren@gmail.com> wrote:
> On Mon, 25 Feb 2019 at 21:08, Eric Sunshine <sunshine@sunshineco.com> wrote:
> > On Mon, Feb 25, 2019 at 3:03 PM Martin Ågren <martin.agren@gmail.com> wrote:
> > > -%.1 %.5 %.7 : %.xml manpage-base-url.xsl
> > > +%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)
> >
> > The wildcard expression also matches the manpage-base-url.xsl
> > mentioned explicitly. Did you intentionally retain the explicit one or
> > was that an oversight?
>
> Hmm, I should have mentioned that, thanks for asking for clarification.
>
> It's intentional. You can see in the context how manpage-base-url.xsl is
> actually generated, so the wildcard won't be able to expand to mention
> it. That's subtle enough that it warrants being mentioned upfront.

I guess I was further confused by the fact that manpage-base-url.xsl
is still present even after "make distclean", which is not something I
would have expected for a generated file. (Perhaps something to
consider "fixing" if you re-roll, or not if it's out of scope.)
Martin Ågren Feb. 26, 2019, 5:59 a.m. UTC | #4
On Mon, 25 Feb 2019 at 22:01, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Mon, Feb 25, 2019 at 3:29 PM Martin Ågren <martin.agren@gmail.com> wrote:
> > On Mon, 25 Feb 2019 at 21:08, Eric Sunshine <sunshine@sunshineco.com> wrote:
> > >
> > > The wildcard expression also matches the manpage-base-url.xsl
> > > mentioned explicitly. Did you intentionally retain the explicit one or
> > > was that an oversight?
> >
> > Hmm, I should have mentioned that, thanks for asking for clarification.
> >
> > It's intentional.

> I guess I was further confused by the fact that manpage-base-url.xsl
> is still present even after "make distclean", which is not something I
> would have expected for a generated file. (Perhaps something to
> consider "fixing" if you re-roll, or not if it's out of scope.)

Are you sure? `make distclean` in the top directory depends on the
"clean" target, which calls out to `make -C Documentation/ clean`, which
removes the file. A test-run works here:

Before:

$ ls | grep manpage-base
manpage-base-url.xsl
manpage-base-url.xsl.in
manpage-base.xsl

After:

$ ls | grep manpage-base
manpage-base-url.xsl.in
manpage-base.xsl

Were you perhaps mislead by one of the similarly-named files?

Martin
Eric Sunshine Feb. 26, 2019, 12:47 p.m. UTC | #5
On Tue, Feb 26, 2019 at 12:59 AM Martin Ågren <martin.agren@gmail.com> wrote:
> On Mon, 25 Feb 2019 at 22:01, Eric Sunshine <sunshine@sunshineco.com> wrote:
> > I guess I was further confused by the fact that manpage-base-url.xsl
> > is still present even after "make distclean", which is not something I
> > would have expected for a generated file. (Perhaps something to
> > consider "fixing" if you re-roll, or not if it's out of scope.)
>
> Are you sure? `make distclean` in the top directory depends on the
> "clean" target, which calls out to `make -C Documentation/ clean`, which
> removes the file. [...]
> Were you perhaps mislead by one of the similarly-named files?

Yes, I was misled by similar names. Sorry for the noise.
Martin Ågren Feb. 27, 2019, 6:19 p.m. UTC | #6
On Tue, 26 Feb 2019 at 13:47, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Tue, Feb 26, 2019 at 12:59 AM Martin Ågren <martin.agren@gmail.com> wrote:
> > Were you perhaps mislead by one of the similarly-named files?
>
> Yes, I was misled by similar names. Sorry for the noise.

Hey, no problem. And thanks for the subtle hint about "misled". ;-)
I appreciate it.

Martin
diff mbox series

Patch

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 26a2342bea..0f8054a115 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -354,7 +354,7 @@  $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf
 manpage-base-url.xsl: manpage-base-url.xsl.in
 	$(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
 
-%.1 %.5 %.7 : %.xml manpage-base-url.xsl
+%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)
 	$(QUIET_XMLTO)$(RM) $@ && \
 	$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<