[PATCH wayland 3/5 v2] man: Properly handle multiple man page aliases

David Herrmann dh.herrmann at googlemail.com
Wed Dec 5 10:04:56 PST 2012


Hi Jonas

On Sat, Dec 1, 2012 at 6:12 PM, Jonas Ådahl <jadahl at gmail.com> wrote:
> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
> ---
>
> v2: Properly specify dependencies. Without this make -j8 fails.
>
>  doc/man/Makefile.am |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
> index 1407953..6d4fcd4 100644
> --- a/doc/man/Makefile.am
> +++ b/doc/man/Makefile.am
> @@ -20,7 +20,7 @@ if HAVE_MANPAGES_STYLESHEET
>
>  CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES)
>  EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES)
> -man_MANS += $(MANPAGES) $(MANPAGES_ALIASES)
> +man_MANS += $(MANPAGES) $(MANPAGES_ALIASES) fixup_aliases
>
>  XSLTPROC_FLAGS = \
>         --stringparam man.authors.section.enabled 0 \
> @@ -31,8 +31,11 @@ XSLTPROC_FLAGS = \
>
>  XSLTPROC_PROCESS_MAN = \
>         $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
> -       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) $< && \
> -       $(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES)
> +       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) $<
> +
> +fixup_aliases: $(MANPAGES_ALIASES)
> +       $(SED) -i -e 's/^\.so \([a-z_]\+\)\.\([0-9]\)$$/\.so man\2\/\1\.\2/' \
> +               $(MANPAGES_ALIASES)

Could you explain the SED change here? I think the previous regexp
matches a whole line and the new one also matches a whole line. How
does that change the replacement?
I'm just curios what corner case you found here that wasn't working previously.

Or did you do the SED change only to be more specific and avoid any
incorrect ".so" lines?

Anyway, the change looks good.

Cheers
David


More information about the wayland-devel mailing list