Browse code

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)
(slightly modified version of 3a7b050)

Daniel-Constantin Mierla authored on 28/10/2009 21:43:14 • Andrei Pelinescu-Onciul committed on 15/01/2010 11:30:35
Showing 2 changed files
... ...
@@ -947,7 +947,8 @@ install-sr-man: $(man_prefix)/$(man_dir)/man8 $(man_prefix)/$(man_dir)/man5
947 947
 			$(foreach m,$(modules_dirs),\
948 948
 				-e "s#/usr/lib/$(CFG_NAME)/$(m)\([^_]\)#$($(m)_target)\1#g") \
949 949
 			-e "s#/usr/share/doc/$(CFG_NAME)/#$(doc_target)#g" \
950
-			< $(CFG_NAME).8 >  \
950
+			-e "s#$(SRC_NAME)#$(MAIN_NAME)#g" \
951
+			< $(SRC_NAME).8 >  \
951 952
 							$(man_prefix)/$(man_dir)/man8/$(MAIN_NAME).8
952 953
 		@chmod 644  $(man_prefix)/$(man_dir)/man8/$(MAIN_NAME).8
953 954
 		@sed -e "s#/etc/$(CFG_NAME)/$(CFG_NAME)\.cfg#$(cfg_target)$(MAIN_NAME).cfg#g" \
... ...
@@ -955,7 +956,8 @@ install-sr-man: $(man_prefix)/$(man_dir)/man8 $(man_prefix)/$(man_dir)/man5
955 956
 			$(foreach m,$(modules_dirs),\
956 957
 				-e "s#/usr/lib/$(CFG_NAME)/$(m)\([^_]\)#$($(m)_target)\1#g") \
957 958
 			-e "s#/usr/share/doc/$(CFG_NAME)/#$(doc_target)#g" \
958
-			< $(CFG_NAME).cfg.5 >  \
959
+			-e "s#$(SRC_NAME)#$(MAIN_NAME)#g" \
960
+			< $(SRC_NAME).cfg.5 >  \
959 961
 			$(man_prefix)/$(man_dir)/man5/$(MAIN_NAME).cfg.5
960 962
 		@chmod 644  $(man_prefix)/$(man_dir)/man5/$(MAIN_NAME).cfg.5
961 963
 
... ...
@@ -134,6 +134,8 @@ endif
134 134
 CFG_NAME=sip-router
135 135
 #config name/name-prefix for distributed scripts
136 136
 SCR_NAME=sip-router
137
+#name in source tree
138
+SRC_NAME=sip-router
137 139
 
138 140
 # what to install
139 141
 INSTALL_FLAVOUR=$(FLAVOUR)
... ...
@@ -1919,7 +1921,7 @@ export exported_vars
1919 1921
 #  cannot be overwritten from environment or command line, unless make cfg
1920 1922
 #  is run)
1921 1923
 saved_fixed_vars:=	MAIN_NAME  CFG_NAME SCR_NAME FLAVOUR INSTALL_FLAVOUR \
1922
-		RELEASE OS ARCH \
1924
+		SRC_NAME RELEASE OS ARCH \
1923 1925
 		C_DEFS DEFS_RM PROFILE CC LD MKDEP MKTAGS LDFLAGS C_INCLUDES \
1924 1926
 		MOD_LDFLAGS LIB_LDFLAGS UTILS_LDFLAGS LIB_SONAME LD_RPATH \
1925 1927
 		LIB_SUFFIX LIB_PREFIX \