[sr-dev] git:master: Makefile: update path to cfg dir at install
Daniel-Constantin Mierla
miconda at gmail.com
Tue Sep 7 00:32:35 CEST 2010
Module: sip-router
Branch: master
Commit: 73619b560620a1dc6cb50bbbf0cdfbaa975f4ffe
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=73619b560620a1dc6cb50bbbf0cdfbaa975f4ffe
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Tue Sep 7 00:28:50 2010 +0200
Makefile: update path to cfg dir at install
- in case some parameters use absolute path to cfg dir, they are updated
with $cfg_target value
---
Makefile | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 1a3650f..c4cc1a9 100644
--- a/Makefile
+++ b/Makefile
@@ -889,8 +889,9 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
@if [ -f etc/$(CFG_NAME).cfg ]; then \
sed $(foreach m,$(modules_dirs),\
-e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
- < etc/$(CFG_NAME).cfg > \
- $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME).cfg.sample; \
+ -e "s#/usr/local/etc/$(CFG_NAME)/#$(cfg_target)#g" \
+ < etc/$(CFG_NAME).cfg \
+ > $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME).cfg.sample; \
chmod 644 $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME).cfg.sample; \
if [ -z "${skip_cfg_install}" -a \
! -f $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME).cfg ]; then \
@@ -901,8 +902,9 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
@if [ -f etc/$(CFG_NAME)-basic.cfg ]; then \
sed $(foreach m,$(modules_dirs),\
-e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
- < etc/$(CFG_NAME)-basic.cfg > \
- $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-basic.cfg.sample; \
+ -e "s#/usr/local/etc/$(CFG_NAME)/#$(cfg_target)#g" \
+ < etc/$(CFG_NAME)-basic.cfg \
+ > $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-basic.cfg.sample; \
chmod 644 $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-basic.cfg.sample; \
if [ -z "${skip_cfg_install}" -a \
! -f $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-basic.cfg ]; then \
@@ -912,7 +914,8 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
fi
@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/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
+ -e "s#/usr/local/etc/$(CFG_NAME)/#$(cfg_target)#g" \
< etc/$(CFG_NAME)-oob.cfg \
> $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-advanced.cfg.sample; \
chmod 644 $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-advanced.cfg.sample; \
More information about the sr-dev
mailing list