linux - Libraries paths defined by Master bash script, but having to run it in every terminal session, how to make more efficient? -


i have build set of libraries , many of fortran programs use them. creates problem in if ever need change location of libraries need individually update path directories in each make file.

how overcome? have planned instead have each make file read path single master path file in home or root directory (this files location never change). within file path each library , if path changes file needs updated.

so wrote bash script file, called master_library_paths:

export library1_name = {library1_name_path} echo $library1_name export library2_name = {library2_name_path} echo $library2_name export library3_name = {library3_name_path} echo $library3_name 

and placed in home directory. in make files, have line:

$(shell . {path master_library_paths} ) \ 

and load libraries:

-i$(library1_name) -i$(library2_name) -i$(library3_name) 

this works great if run ./master_library_paths in terminal session first , go directory compile program, quite time consuming, how can fix these arguments library1_name, library2_name ect known throughout system?

new system wide ld_library_path´s can added in /etc/ld.so.conf , /etc/ld.so.conf.d/

or may in /etc/profile.d/

-


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -