Browse code

make install: avoid re-linking lib dependent modules

- install doesn't try first to build everything, it will build as
it installs. This will avoid re-linking ser-lib dependent
modules (the normal "make all" would use a local rpath, while "make
install" would change rpath to the install destination dir => the
module needs to be relinked with a different rpath or on Darwin
the lib has to be rebuilt)
- avoid an extra make call on lib install

Andrei Pelinescu-Onciul authored on 19/03/2009 14:32:36
Showing 3 changed files
... ...
@@ -540,7 +540,8 @@ man: modules.lst
540 540
 	done; true
541 541
 
542 542
 .PHONY: install
543
-install:all install-bin install-modules install-cfg \
543
+install: export compile_for_install=yes
544
+install: install-bin install-modules install-cfg \
544 545
 	install-doc install-man install-utils install-share
545 546
 
546 547
 .PHONY: dbinstall
... ...
@@ -20,7 +20,7 @@ endif
20 20
 
21 21
 ifneq	(,$(filter install% %install install, $(MAKECMDGOALS)))
22 22
 compile_for_install:=yes
23
-$(info install mode => compile_for_install=$(compile_for_install))
23
+$(info install mode)
24 24
 endif
25 25
 
26 26
 ifeq ($(NAME),)
... ...
@@ -157,8 +157,7 @@ endif
157 157
 .PHONY:install-if-newer
158 158
 install-if-newer: $(lib_prefix)/$(lib_dir)/$(LIB_RUNTIME_NAME) 
159 159
 
160
-$(lib_prefix)/$(lib_dir)/$(LIB_RUNTIME_NAME): $(LIB_NAME) $(LIBINAME_F)
161
-	@$(MAKE) install
160
+$(lib_prefix)/$(lib_dir)/$(LIB_RUNTIME_NAME): $(LIB_NAME) $(LIBINAME_F) install
162 161
 
163 162
 
164 163
 ifneq ($(strip $(LIBINAME_F)),)
... ...
@@ -62,7 +62,7 @@ ifneq	(,$(filter install install% %install, $(MAKECMDGOALS)))
62 62
 lib_compile_for_install=yes
63 63
 expected_lib_ipath=$(lib_target)
64 64
 else
65
-lib_compile_for_install=no
65
+lib_compile_for_install=$(compile_for_install)
66 66
 # function: expected_lib_ipath ser_lib_dir
67 67
 expected_lib_ipath=$(1)
68 68
 endif