[sr-dev] git:kamailio_3.0: Makefile: introducing SRC_NAME var

Daniel-Constantin Mierla miconda at gmail.com
Wed Oct 28 22:45:11 CET 2009


Module: sip-router
Branch: kamailio_3.0
Commit: 3a7b050c9f9d71a6ab8d44eca1c50f52153d22e7
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3a7b050c9f9d71a6ab8d44eca1c50f52153d22e7

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Oct 28 22:43:14 2009 +0100

Makefile: introducing SRC_NAME var

- store the name as it is in source tree, updated by
  installation to MAIN_NAME (used for man pages install)

---

 Makefile      |    6 ++++--
 Makefile.defs |    4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 95115a5..5841f5d 100644
--- a/Makefile
+++ b/Makefile
@@ -944,7 +944,8 @@ install-sr-man: $(man_prefix)/$(man_dir)/man8 $(man_prefix)/$(man_dir)/man5
 			$(foreach m,$(modules_dirs),\
 				-e "s#/usr/lib/$(CFG_NAME)/$(m)\([^_]\)#$($(m)_target)\1#g") \
 			-e "s#/usr/share/doc/$(CFG_NAME)/#$(doc_target)#g" \
-			< $(CFG_NAME).8 >  \
+			-e "s#$(SRC_NAME)#$(MAIN_NAME)#g" \
+			< $(SRC_NAME).8 >  \
 							$(man_prefix)/$(man_dir)/man8/$(MAIN_NAME).8
 		@chmod 644  $(man_prefix)/$(man_dir)/man8/$(MAIN_NAME).8
 		@sed -e "s#/etc/$(CFG_NAME)/$(CFG_NAME)\.cfg#$(cfg_target)$(MAIN_NAME).cfg#g" \
@@ -952,7 +953,8 @@ install-sr-man: $(man_prefix)/$(man_dir)/man8 $(man_prefix)/$(man_dir)/man5
 			$(foreach m,$(modules_dirs),\
 				-e "s#/usr/lib/$(CFG_NAME)/$(m)\([^_]\)#$($(m)_target)\1#g") \
 			-e "s#/usr/share/doc/$(CFG_NAME)/#$(doc_target)#g" \
-			< $(CFG_NAME).cfg.5 >  \
+			-e "s#$(SRC_NAME)#$(MAIN_NAME)#g" \
+			< $(SRC_NAME).cfg.5 >  \
 			$(man_prefix)/$(man_dir)/man5/$(MAIN_NAME).cfg.5
 		@chmod 644  $(man_prefix)/$(man_dir)/man5/$(MAIN_NAME).cfg.5
 
diff --git a/Makefile.defs b/Makefile.defs
index d623b9b..f6be32c 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -120,6 +120,8 @@ FLAVOUR=kamailio
 CFG_NAME=sip-router
 #config name/name-prefix for distributed scripts
 SCR_NAME=sip-router
+#name in source tree
+SRC_NAME=sip-router
 
 ifeq ($(FLAVOUR),sip-router)
 # main binary name
@@ -1920,7 +1922,7 @@ export exported_vars
 #  cannot be overwritten from environment or command line, unless make cfg
 #  is run)
 saved_fixed_vars:=	MAIN_NAME  CFG_NAME SCR_NAME FLAVOUR INSTALL_FLAVOUR \
-		RELEASE OS ARCH \
+		SRC_NAME RELEASE OS ARCH \
 		C_DEFS DEFS_RM PROFILE CC LD MKDEP MKTAGS LDFLAGS C_INCLUDES \
 		MOD_LDFLAGS LIB_LDFLAGS UTILS_LDFLAGS LIB_SONAME LD_RPATH \
 		LIB_SUFFIX LIB_PREFIX \




More information about the sr-dev mailing list