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

Jonas Ådahl jadahl at gmail.com
Sat Dec 1 09:12:22 PST 2012


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)
 
 %.1: %.xml
 	$(XSLTPROC_PROCESS_MAN)
-- 
1.7.10.4



More information about the wayland-devel mailing list