@ -656,28 +656,45 @@ install-with-libs: install
 
			
		
	
		
		
			
				
					
						test  -d      '$(DESTDIR)$(libdir)' /infer/infer/libso ||  \
 
	test  -d      '$(DESTDIR)$(libdir)' /infer/infer/libso ||  \
 
 
			
		
	
		
		
			
				
					
						  $( MKDIR_P)  '$(DESTDIR)$(libdir)' /infer/infer/libso
	  $( MKDIR_P)  '$(DESTDIR)$(libdir)' /infer/infer/libso
 
			
		
	
		
		
			
				
					
					i f n e q  ( $( OPAM ) , n o ) i f n e q  ( $( OPAM ) , n o )  
			
		
	
		
		
			
				
					
						$( INSTALL_PROGRAM)  -C $( GMP_LIB_PATH)  '$(DESTDIR)$(libdir)' /infer/infer/libso/
 
			
		
	
		
		
			
				
					
						$( INSTALL_PROGRAM)  -C $( MPFR_LIB_PATH)  '$(DESTDIR)$(libdir)' /infer/infer/libso/
 
			
		
	
		
		
			
				
					
						set  -x;  \
 
	set  -x;  \
 
 
			
		
	
		
		
			
				
					
						OPAM_SHARE = $$ ( $( OPAM)  config var share) ;  \
 
	OPAM_SHARE = $$ ( $( OPAM)  config var share) ;  \
 
 
			
		
	
		
		
			
				
					
						APRON_LIB_PATHS = " $$ OPAM_SHARE/apron/lib/libapron.so  $$ OPAM_SHARE/apron/lib/liboctMPQ.so " ;  \
 
	APRON_LIB_PATHS = " $$ OPAM_SHARE/apron/lib/libapron.so  $$ OPAM_SHARE/apron/lib/liboctMPQ.so " ;  \
 
 
			
		
	
		
		
			
				
					
						ELINA_LIB_PATHS = " $$ OPAM_SHARE/elina/lib/libelinalinearize.so  $$ OPAM_SHARE/elina/lib/liboptpoly.so  $$ OPAM_SHARE/elina/lib/libpartitions.so " ;  \
 
	ELINA_LIB_PATHS = " $$ OPAM_SHARE/elina/lib/libelinalinearize.so  $$ OPAM_SHARE/elina/lib/liboptpoly.so  $$ OPAM_SHARE/elina/lib/libpartitions.so " ;  \
 
 
			
		
	
		
		
			
				
					
						$( INSTALL_PROGRAM)  -C $$ APRON_LIB_PATHS '$(DESTDIR)$(libdir)' /infer/infer/libso/;  \
 
	$( INSTALL_PROGRAM)  -C $$ APRON_LIB_PATHS '$(DESTDIR)$(libdir)' /infer/infer/libso/;  \
 
 
			
		
	
		
		
			
				
					
						$( INSTALL_PROGRAM)  -C $$ ELINA_LIB_PATHS '$(DESTDIR)$(libdir)' /infer/infer/libso/
	$( INSTALL_PROGRAM)  -C $$ ELINA_LIB_PATHS '$(DESTDIR)$(libdir)' /infer/infer/libso/
 
			
		
	
		
		
			
				
					
					#	update rpath of executables
 i f n e q  ( $( LDD ) , n o )  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					i f n e q  ( $( PATCHELF ) , n o ) i f n e q  ( $( PATCHELF ) , n o )  
			
		
	
		
		
			
				
					
					#	this sort of assumes Linux
 #	this sort of assumes Linux
  
			
		
	
		
		
			
				
					
					#	figure out where libgmp and libmpfr are using ldd
  
			
		
	
		
		
			
				
					
						set  -x;  \
 
 
			
		
	
		
		
			
				
					
						for  lib in $$ ( $( LDD)  $( INFER_BIN)  \
 
 
			
		
	
		
		
			
				
					
						              |  cut -d ' '  -f 3  \
 
 
			
		
	
		
		
			
				
					
						              |  grep -e 'lib\(gmp\|mpfr\)' ) ;  do  \
 
 
			
		
	
		
		
			
				
					
						  $( INSTALL_PROGRAM)  -C " $$ lib "  '$(DESTDIR)$(libdir)' /infer/infer/libso/;  \
 
 
			
		
	
		
		
			
				
					
						done 
 
			
		
	
		
		
			
				
					
					#	update rpath of executables
  
			
		
	
		
		
			
				
					
						for  sofile in '$(DESTDIR)$(libdir)' /infer/infer/libso/*.so;  do  \
 
	for  sofile in '$(DESTDIR)$(libdir)' /infer/infer/libso/*.so;  do  \
 
 
			
		
	
		
		
			
				
					
						  $( PATCHELF)  --set-rpath '$$ORIGIN'  " $$ sofile " ;  \
 
	  $( PATCHELF)  --set-rpath '$$ORIGIN'  --force-rpath  " $$ sofile " ;  \
 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
						done 
	done 
 
			
		
	
		
		
			
				
					
						$( PATCHELF)  --set-rpath '$$ORIGIN/../libso'  '$(DESTDIR)$(libdir)' /infer/infer/bin/infer
	$( PATCHELF)  --set-rpath '$$ORIGIN/../libso'  --force-rpath  '$(DESTDIR)$(libdir)' /infer/infer/bin/infer
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					i f e q  ( $( IS_FACEBOOK_TREE ) , y e s ) i f e q  ( $( IS_FACEBOOK_TREE ) , y e s )  
			
		
	
		
		
			
				
					
						$( PATCHELF)  --set-rpath '$$ORIGIN/../libso'  '$(DESTDIR)$(libdir)' /infer/infer/bin/InferCreateTraceViewLinks
	$( PATCHELF)  --set-rpath '$$ORIGIN/../libso'  --force-rpath  '$(DESTDIR)$(libdir)' /infer/infer/bin/InferCreateTraceViewLinks
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					e n d i f e n d i f  
			
		
	
		
		
			
				
					
					e l s e  # patchelf not found
 e l s e  # ldd found but not patchelf
  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
						echo  "ERROR: ldd (Linux?) found but not patchelf, please install patchelf"  >& 2;  exit  1 
 
			
		
	
		
		
			
				
					
					e n d i f  
			
		
	
		
		
			
				
					
					e l s e  # ldd not found
  
			
		
	
		
		
			
				
					
					i f n e q  ( $( OTOOL ) , n o ) i f n e q  ( $( OTOOL ) , n o )  
			
		
	
		
		
			
				
					
					i f n e q  ( $( INSTALL_NAME_TOOL ) , n o ) i f n e q  ( $( INSTALL_NAME_TOOL ) , n o )  
			
		
	
		
		
			
				
					
					#	this sort of assumes osx
 #	this sort of assumes osx
  
			
		
	
		
		
			
				
					
					#	figure out where libgmp and libmpfr are using otool
  
			
		
	
		
		
			
				
					
						set  -e;  \
 
 
			
		
	
		
		
			
				
					
						set  -x;  \
 
 
			
		
	
		
		
			
				
					
						for  lib in $$ ( $( OTOOL)  -L $( INFER_BIN)  \
 
 
			
		
	
		
		
			
				
					
						              |  cut -d ' '  -f 1  |  tr -d '\t'  \
 
 
			
		
	
		
		
			
				
					
						              |  grep -e 'lib\(gmp\|mpfr\)' ) ;  do  \
 
 
			
		
	
		
		
			
				
					
						  $( INSTALL_PROGRAM)  -C " $$ lib "  '$(DESTDIR)$(libdir)' /infer/infer/libso/;  \
 
 
			
		
	
		
		
			
				
					
						done 
 
			
		
	
		
		
			
				
					
						set  -x;  \
 
	set  -x;  \
 
 
			
		
	
		
		
			
				
					
						for  sofile in '$(DESTDIR)$(libdir)' /infer/infer/libso/*.{ so,dylib} ;  do  \
 
	for  sofile in '$(DESTDIR)$(libdir)' /infer/infer/libso/*.{ so,dylib} ;  do  \
 
 
			
		
	
		
		
			
				
					
						  $( INSTALL_NAME_TOOL)  -add_rpath "@executable_path"  " $$ sofile "  2> /dev/null ||  true;  \
 
	  $( INSTALL_NAME_TOOL)  -add_rpath "@executable_path"  " $$ sofile "  2> /dev/null ||  true;  \
 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -690,14 +707,14 @@ ifeq ($(IS_FACEBOOK_TREE),yes)
 
			
		
	
		
		
			
				
					
						scripts/set_libso_path.sh '$(DESTDIR)$(libdir)' /infer/infer/libso '$(DESTDIR)$(libdir)' /infer/infer/bin/InferCreateTraceViewLinks
	scripts/set_libso_path.sh '$(DESTDIR)$(libdir)' /infer/infer/libso '$(DESTDIR)$(libdir)' /infer/infer/bin/InferCreateTraceViewLinks
 
			
		
	
		
		
			
				
					
					e n d i f e n d i f  
			
		
	
		
		
			
				
					
					e l s e  # install_name_tool not found
 e l s e  # install_name_tool not found
  
			
		
	
		
		
			
				
					
						echo  "ERROR:  need patchelf (Linux) or otool + install_name_tool (OSX) available " >& 2;  exit  1 
	echo  "ERROR:  otool (OSX?) found but not install_name_tool, please install install_name_tool " >& 2;  exit  1 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					e n d i f e n d i f  
			
		
	
		
		
			
				
					
					e l s e  # otool not found
 e l s e  # otool not found
  
			
		
	
		
		
			
				
					
						echo  "ERROR: need  patchelf (Linux) or otool + install_name_tool (OSX) available" >& 2;  exit  1 
	echo  "ERROR: need  ldd +  patchelf (Linux) or otool + install_name_tool (OSX) available" >& 2;  exit  1 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					e n d i f e n d i f  
			
		
	
		
		
			
				
					
					e n d i f  #  patchelf 
e n d i f  #  ldd 
 
			
				
				
			
		
	
		
		
			
				
					
					e l s e  # opam  not found 
e l s e  # opam 
 
			
				
				
			
		
	
		
		
			
				
					
						echo  "ERROR: n on-opam installations not supported " >& 2;  exit  1 
	echo  "ERROR: n eed opam " >& 2;  exit  1 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					e n d i f e n d i f  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					# Nuke objects built from OCaml. Useful when changing the OCaml compiler, for instance.
 # Nuke objects built from OCaml. Useful when changing the OCaml compiler, for instance.