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
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 955
 			$(foreach m,$(modules_dirs),\
956 956
 				-e "s#/usr/lib/$(CFG_NAME)/$(m)\([^_]\)#$($(m)_target)\1#g") \
957 957
 			-e "s#/usr/share/doc/$(CFG_NAME)/#$(doc_target)#g" \
958
-			< $(CFG_NAME).cfg.5 >  \
958
+			-e "s#$(SRC_NAME)#$(MAIN_NAME)#g" \
959
+			< $(SRC_NAME).cfg.5 >  \
959 960
 			$(man_prefix)/$(man_dir)/man5/$(MAIN_NAME).cfg.5
960 961
 		@chmod 644  $(man_prefix)/$(man_dir)/man5/$(MAIN_NAME).cfg.5
961 962
 
... ...
@@ -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 1919
 #  cannot be overwritten from environment or command line, unless make cfg
1920 1920
 #  is run)
1921 1921
 saved_fixed_vars:=	MAIN_NAME  CFG_NAME SCR_NAME FLAVOUR INSTALL_FLAVOUR \
1922
-		RELEASE OS ARCH \
1922
+		SRC_NAME RELEASE OS ARCH \
1923 1923
 		C_DEFS DEFS_RM PROFILE CC LD MKDEP MKTAGS LDFLAGS C_INCLUDES \
1924 1924
 		MOD_LDFLAGS LIB_LDFLAGS UTILS_LDFLAGS LIB_SONAME LD_RPATH \
1925 1925
 		LIB_SUFFIX LIB_PREFIX \