[sr-dev] git:3.3: Makefiles: Updated Makefiles to use db2x_docbook2man when docbook2x-man is not installed

Peter Dunkley peter.dunkley at crocodile-rcs.com
Sat Oct 20 05:07:14 CEST 2012


Module: sip-router
Branch: 3.3
Commit: 1e8b69569f810aa7e91c2b0f12948db82fd2d145
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1e8b69569f810aa7e91c2b0f12948db82fd2d145

Author: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Date:   Sat Oct 20 01:23:51 2012 +0100

Makefiles: Updated Makefiles to use db2x_docbook2man when docbook2x-man is not installed

- db2x_docbook2man is what Fedora contains
(cherry picked from commit c9088190cf29b7d561ca2bded6266b3e21d51d8b)

---

 Makefile.modules |    2 +-
 Makefile.shared  |    5 +++++
 Makefile.utils   |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile.modules b/Makefile.modules
index cd391e6..d047946 100644
--- a/Makefile.modules
+++ b/Makefile.modules
@@ -295,7 +295,7 @@ endif
 ifneq (,$(wildcard $(MOD_NAME).xml))
 
 $(MOD_NAME).7: $(MOD_NAME).xml
-	docbook2x-man -s ../../doc/stylesheets/serdoc2man.xsl $<
+	$(DOCBOOK) -s ../../doc/stylesheets/serdoc2man.xsl $<
 
 man: $(MOD_NAME).7
 
diff --git a/Makefile.shared b/Makefile.shared
index 22060a7..2d92bab 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -42,3 +42,8 @@ sh_err_fail=
 try_err=$(1) ; if [ $$? != 0 ]; then echo ERROR: $(1) failed ; fi
 endif
 
+DOCBOOK = $(shell which docbook2x-man 2>/dev/null)
+ifeq ($(DOCBOOK),)
+	DOCBOOK = $(shell which db2x_docbook2man 2>/dev/null)
+endif
+
diff --git a/Makefile.utils b/Makefile.utils
index 570a9ef..8476969 100644
--- a/Makefile.utils
+++ b/Makefile.utils
@@ -123,7 +123,7 @@ endif
 ifneq (,$(wildcard $(UTIL_NAME).xml))
 
 $(UTIL_NAME).7: $(UTIL_NAME).xml
-	docbook2x-man -s ../../doc/stylesheets/serdoc2man.xsl $<
+	$(DOCBOOK) -s ../../doc/stylesheets/serdoc2man.xsl $<
 
 man: $(UTIL_NAME).7
 




More information about the sr-dev mailing list