[sr-dev] git:master: Makefile.utils: new target to install manpage for util tools

Daniel-Constantin Mierla miconda at gmail.com
Wed Oct 24 08:40:56 CEST 2012


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Oct 24 00:04:11 2012 +0200

Makefile.utils: new target to install manpage for util tools

---

 Makefile.utils |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/Makefile.utils b/Makefile.utils
index 8476969..3198ea5 100644
--- a/Makefile.utils
+++ b/Makefile.utils
@@ -84,7 +84,7 @@ modules:
 
 .PHONY: install
 .PHONY: install-libs
-install: $(NAME) $(util_dst) install-libs
+install: $(NAME) $(util_dst) install-libs install-util-man
 	$(INSTALL_TOUCH) $(util_dst)/$(NAME)
 	$(INSTALL_BIN)  $(NAME)  $(util_dst)
 
@@ -133,6 +133,21 @@ man:
 
 endif
 
+.PHONY: install-util-man
+#src-name man page install rules
+ifneq (,$(wildcard $(UTIL_SRC_NAME).8))
+install-util-man: $(man_prefix)/$(man_dir)/man8
+		sed -e "s#$(UTIL_SRC_NAME)#$(UTIL_NAME)#g" \
+			-e "s#$(SRC_NAME)#$(MAIN_NAME)#g" \
+			< $(UTIL_SRC_NAME).8 > $(man_prefix)/$(man_dir)/man8/$(UTIL_NAME).8
+		chmod 644  $(man_prefix)/$(man_dir)/man8/$(UTIL_NAME).8
+
+else
+
+install-util-man:
+
+endif
+
 endif # ifeq($(makefile_defs),1)
 
 include $(COREPATH)/Makefile.cfg




More information about the sr-dev mailing list