Browse code

Makefile: updated paths for installing the tools

Daniel-Constantin Mierla authored on 07/12/2016 12:21:01
Showing 2 changed files
... ...
@@ -202,7 +202,7 @@ cmodules=$(foreach mods,$(modules_dirs), $($(mods)))
202 202
 
203 203
 
204 204
 # list of utils directories that should be compiled by make utils
205
-C_COMPILE_UTILS=	utils/kamcmd
205
+C_COMPILE_UTILS=	../utils/kamcmd
206 206
 # list of binaries that should be installed alongside
207 207
 # (they should be created after make utils, see C_COMPILE_UTILS)
208 208
 C_INSTALL_BIN=	# kamcmd is now installed by ctl
... ...
@@ -210,7 +210,7 @@ C_INSTALL_BIN=	# kamcmd is now installed by ctl
210 210
 # which utils know to install themselves and should be installed
211 211
 # along the core (list of utils directories)
212 212
 ifeq ($(FLAVOUR),kamailio)
213
-C_INSTALL_UTILS= utils/kamctl
213
+C_INSTALL_UTILS= ../utils/kamctl
214 214
 else
215 215
 C_INSTALL_UTILS=
216 216
 endif
... ...
@@ -697,11 +697,11 @@ $(man_prefix)/$(man_dir)/man5:
697 697
 
698 698
 # note: sed with POSIX.1 regex doesn't support |, + or ? (darwin, solaris ...) 
699 699
 install-cfg: $(cfg_prefix)/$(cfg_dir)
700
-	@if [ -f etc/$(CFG_NAME).cfg ]; then \
700
+	@if [ -f ../etc/$(CFG_NAME).cfg ]; then \
701 701
 			sed $(foreach m,$(modules_dirs),\
702 702
 					-e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
703 703
 					-e "s#/usr/local/etc/$(CFG_NAME)/#$(cfg_target)#g" \
704
-				< etc/$(CFG_NAME).cfg \
704
+				< ../etc/$(CFG_NAME).cfg \
705 705
 				> $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME).cfg.sample; \
706 706
 			chmod 644 $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME).cfg.sample; \
707 707
 			if [ -z "${skip_cfg_install}" -a \
... ...
@@ -710,11 +710,11 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
710 710
 					$(cfg_prefix)/$(cfg_dir)$(MAIN_NAME).cfg; \
711 711
 			fi; \
712 712
 		fi
713
-	@if [ -f etc/$(CFG_NAME)-basic.cfg ]; then \
713
+	@if [ -f ../etc/$(CFG_NAME)-basic.cfg ]; then \
714 714
 			sed $(foreach m,$(modules_dirs),\
715 715
 					-e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
716 716
 					-e "s#/usr/local/etc/$(CFG_NAME)/#$(cfg_target)#g" \
717
-				< etc/$(CFG_NAME)-basic.cfg \
717
+				< ../etc/$(CFG_NAME)-basic.cfg \
718 718
 				> $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-basic.cfg.sample; \
719 719
 			chmod 644 $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-basic.cfg.sample; \
720 720
 			if [ -z "${skip_cfg_install}" -a \
... ...
@@ -723,11 +723,11 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
723 723
 					$(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-basic.cfg; \
724 724
 			fi; \
725 725
 		fi
726
-	@if [ -f etc/$(CFG_NAME)-oob.cfg ]; then \
726
+	@if [ -f ../etc/$(CFG_NAME)-oob.cfg ]; then \
727 727
 			sed $(foreach m,$(modules_dirs),\
728 728
 					-e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
729 729
 					-e "s#/usr/local/etc/$(CFG_NAME)/#$(cfg_target)#g" \
730
-				< etc/$(CFG_NAME)-oob.cfg \
730
+				< ../etc/$(CFG_NAME)-oob.cfg \
731 731
 				> $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-advanced.cfg.sample; \
732 732
 			chmod 644 $(cfg_prefix)/$(cfg_dir)$(MAIN_NAME)-advanced.cfg.sample; \
733 733
 			if [ -z "${skip_cfg_install}" -a \
... ...
@@ -763,7 +763,7 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
763 763
 			: ; done; true
764 764
 	@# radius dictionary
765 765
 	@$(INSTALL_TOUCH) $(cfg_prefix)/$(cfg_dir)/dictionary.$(CFG_NAME)
766
-	@$(INSTALL_CFG) etc/dictionary.$(CFG_NAME) $(cfg_prefix)/$(cfg_dir)
766
+	@$(INSTALL_CFG) ../etc/dictionary.$(CFG_NAME) $(cfg_prefix)/$(cfg_dir)
767 767
 	@echo "config files installed"
768 768
 
769 769
 install-bin: $(bin_prefix)/$(bin_dir) $(NAME)
... ...
@@ -839,16 +839,16 @@ install-modules-all: install-every-module install-every-module-doc
839 839
 
840 840
 
841 841
 install-doc: $(doc_prefix)/$(doc_dir) install-every-module-doc
842
-	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/INSTALL 
843
-	$(INSTALL_DOC) INSTALL $(doc_prefix)/$(doc_dir)
844
-	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/README-MODULES 
845
-	$(INSTALL_DOC) README-MODULES $(doc_prefix)/$(doc_dir)
846
-	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/AUTHORS 
847
-	$(INSTALL_DOC) AUTHORS $(doc_prefix)/$(doc_dir)
842
+	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/INSTALL
843
+	$(INSTALL_DOC) ../INSTALL $(doc_prefix)/$(doc_dir)
844
+	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/README-MODULES
845
+	$(INSTALL_DOC) ../README-MODULES $(doc_prefix)/$(doc_dir)
846
+	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/AUTHORS
847
+	$(INSTALL_DOC) ../AUTHORS $(doc_prefix)/$(doc_dir)
848 848
 	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/NEWS
849
-	$(INSTALL_DOC) NEWS $(doc_prefix)/$(doc_dir)
850
-	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/README 
851
-	$(INSTALL_DOC) README $(doc_prefix)/$(doc_dir)
849
+	$(INSTALL_DOC) ../NEWS $(doc_prefix)/$(doc_dir)
850
+	$(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/README
851
+	$(INSTALL_DOC) ../README $(doc_prefix)/$(doc_dir)
852 852
 
853 853
 
854 854
 install-sr-man: $(man_prefix)/$(man_dir)/man8 $(man_prefix)/$(man_dir)/man5
... ...
@@ -858,7 +858,7 @@ install-sr-man: $(man_prefix)/$(man_dir)/man8 $(man_prefix)/$(man_dir)/man5
858 858
 				-e "s#/usr/lib/$(CFG_NAME)/$(m)\([^_]\)#$($(m)_target)\1#g") \
859 859
 			-e "s#/usr/share/doc/$(CFG_NAME)/#$(doc_target)#g" \
860 860
 			-e "s#$(SRC_NAME)#$(MAIN_NAME)#g" \
861
-			< doc/man/$(MAIN_NAME).8 >  \
861
+			< ../doc/man/$(MAIN_NAME).8 >  \
862 862
 							$(man_prefix)/$(man_dir)/man8/$(MAIN_NAME).8
863 863
 		@chmod 644  $(man_prefix)/$(man_dir)/man8/$(MAIN_NAME).8
864 864
 		@sed -e "s#/etc/$(CFG_NAME)/$(CFG_NAME)\.cfg#$(cfg_target)$(MAIN_NAME).cfg#g" \
... ...
@@ -867,7 +867,7 @@ install-sr-man: $(man_prefix)/$(man_dir)/man8 $(man_prefix)/$(man_dir)/man5
867 867
 				-e "s#/usr/lib/$(CFG_NAME)/$(m)\([^_]\)#$($(m)_target)\1#g") \
868 868
 			-e "s#/usr/share/doc/$(CFG_NAME)/#$(doc_target)#g" \
869 869
 			-e "s#$(SRC_NAME)#$(MAIN_NAME)#g" \
870
-			< doc/man/$(MAIN_NAME).cfg.5 >  \
870
+			< ../doc/man/$(MAIN_NAME).cfg.5 >  \
871 871
 			$(man_prefix)/$(man_dir)/man5/$(MAIN_NAME).cfg.5
872 872
 		@chmod 644  $(man_prefix)/$(man_dir)/man5/$(MAIN_NAME).cfg.5
873 873
 
... ...
@@ -266,7 +266,7 @@ $(share_prefix)/$(share_dir):
266 266
 ifneq (,$(wildcard doc/Makefile))
267 267
 #doc/Makefile present => we can generate README
268 268
 
269
-README: doc/*.xml ../../docbook/entities.xml
269
+README: doc/*.xml ../../../docbook/entities.xml
270 270
 	$(MAKE) -C doc $(MOD_NAME).txt
271 271
 	mv doc/$(MOD_NAME).txt $@
272 272
 
... ...
@@ -280,7 +280,7 @@ endif
280 280
 ifneq (,$(wildcard $(MOD_NAME).xml))
281 281
 
282 282
 $(MOD_NAME).7: $(MOD_NAME).xml
283
-	$(DOCBOOK) -s ../../doc/stylesheets/serdoc2man.xsl $<
283
+	$(DOCBOOK) -s ../../../doc/stylesheets/serdoc2man.xsl $<
284 284
 
285 285
 man: $(MOD_NAME).7
286 286