[sr-dev] git:master: Makefile: use one tab for install-cfg and added nop not to confuse some versions of shell

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 14 11:16:10 CEST 2014


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Thu Aug 14 11:09:36 2014 +0200

Makefile: use one tab for install-cfg and added nop not to confuse some versions of shell

- apparently they evaluate wrongly the sequence: escape (\), new line,
  tab, done

---

 Makefile |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index d0e00b9..8786cc8 100644
--- a/Makefile
+++ b/Makefile
@@ -755,7 +755,7 @@ $(man_prefix)/$(man_dir)/man5:
 
 # note: sed with POSIX.1 regex doesn't support |, + or ? (darwin, solaris ...) 
 install-cfg: $(cfg_prefix)/$(cfg_dir)
-		@if [ -f etc/$(CFG_NAME).cfg ]; then \
+	@if [ -f etc/$(CFG_NAME).cfg ]; then \
 			sed $(foreach m,$(modules_dirs),\
 					-e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
 					-e "s#/usr/local/etc/$(CFG_NAME)/#$(cfg_target)#g" \
@@ -768,7 +768,7 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
 					$(cfg_prefix)/$(cfg_dir)$(MAIN_NAME).cfg; \
 			fi; \
 		fi
-		@if [ -f etc/$(CFG_NAME)-basic.cfg ]; then \
+	@if [ -f etc/$(CFG_NAME)-basic.cfg ]; then \
 			sed $(foreach m,$(modules_dirs),\
 					-e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
 					-e "s#/usr/local/etc/$(CFG_NAME)/#$(cfg_target)#g" \
@@ -781,7 +781,7 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
 					$(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-basic.cfg; \
 			fi; \
 		fi
-		@if [ -f etc/$(CFG_NAME)-oob.cfg ]; then \
+	@if [ -f etc/$(CFG_NAME)-oob.cfg ]; then \
 			sed $(foreach m,$(modules_dirs),\
 					-e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
 					-e "s#/usr/local/etc/$(CFG_NAME)/#$(cfg_target)#g" \
@@ -795,8 +795,8 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
 					$(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-advanced.cfg; \
 			fi; \
 		fi
-		@# other configs
-		@for r in $(C_INSTALL_CFGS) ""; do \
+	@# other configs
+	@for r in $(C_INSTALL_CFGS) ""; do \
 			if [ -n "$$r" ]; then \
 				if [ -f "$$r" ]; then \
 					n=`basename "$$r"` ; \
@@ -818,14 +818,15 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
 					fi ; \
 				fi ; \
 			fi ; \
-		done; true
-		# radius dictionary
-		$(INSTALL_TOUCH) $(cfg_prefix)/$(cfg_dir)/dictionary.$(CFG_NAME)
-		$(INSTALL_CFG) etc/dictionary.$(CFG_NAME) $(cfg_prefix)/$(cfg_dir)
+			: ; done; true
+	@# radius dictionary
+	@$(INSTALL_TOUCH) $(cfg_prefix)/$(cfg_dir)/dictionary.$(CFG_NAME)
+	@$(INSTALL_CFG) etc/dictionary.$(CFG_NAME) $(cfg_prefix)/$(cfg_dir)
+	@echo "config files installed"
 
 install-bin: $(bin_prefix)/$(bin_dir) $(NAME)
-		$(INSTALL_TOUCH) $(bin_prefix)/$(bin_dir)/$(NAME)
-		$(INSTALL_BIN) $(NAME) $(bin_prefix)/$(bin_dir)
+	$(INSTALL_TOUCH) $(bin_prefix)/$(bin_dir)/$(NAME)
+	$(INSTALL_BIN) $(NAME) $(bin_prefix)/$(bin_dir)
 
 
 install-share: $(share_prefix)/$(share_dir)




More information about the sr-dev mailing list