Browse Source

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 16 years ago
parent
commit
b5b92e046d
3 changed files with 5 additions and 5 deletions
  1. 2 1
      Makefile
  2. 2 3
      Makefile.libs
  3. 1 1
      Makefile.rules

+ 2 - 1
Makefile

@@ -540,7 +540,8 @@ man: modules.lst
 	done; true
 
 .PHONY: install
-install:all install-bin install-modules install-cfg \
+install: export compile_for_install=yes
+install: install-bin install-modules install-cfg \
 	install-doc install-man install-utils install-share
 
 .PHONY: dbinstall

+ 2 - 3
Makefile.libs

@@ -20,7 +20,7 @@ endif
 
 ifneq	(,$(filter install% %install install, $(MAKECMDGOALS)))
 compile_for_install:=yes
-$(info install mode => compile_for_install=$(compile_for_install))
+$(info install mode)
 endif
 
 ifeq ($(NAME),)
@@ -157,8 +157,7 @@ endif
 .PHONY:install-if-newer
 install-if-newer: $(lib_prefix)/$(lib_dir)/$(LIB_RUNTIME_NAME) 
 
-$(lib_prefix)/$(lib_dir)/$(LIB_RUNTIME_NAME): $(LIB_NAME) $(LIBINAME_F)
-	@$(MAKE) install
+$(lib_prefix)/$(lib_dir)/$(LIB_RUNTIME_NAME): $(LIB_NAME) $(LIBINAME_F) install
 
 
 ifneq ($(strip $(LIBINAME_F)),)

+ 1 - 1
Makefile.rules

@@ -62,7 +62,7 @@ ifneq	(,$(filter install install% %install, $(MAKECMDGOALS)))
 lib_compile_for_install=yes
 expected_lib_ipath=$(lib_target)
 else
-lib_compile_for_install=no
+lib_compile_for_install=$(compile_for_install)
 # function: expected_lib_ipath ser_lib_dir
 expected_lib_ipath=$(1)
 endif