Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

laura74

macrumors newbie
Original poster
Hello all,

Sorry if the question if stupid but I have no big experience with programming.
I am trying to set a path to be used in a makefile.in, for installation of a Fortran code. The makefile.in contains the string

$(CODE_NAME)

Now, when I type in the bash shell

export CODE_NAME=/Users/laura/code_folder

the compiling starts regularly. In order to automatize the process, I copied the line above in the .bash_profile (I have done this in the past for aliases and it worked). However in this case it does not work. Anybody can tell me what's wrong?

Thanks in advance!
 
I'm no bash expert, so I can't help much there, but since you're trying to set up a global environment variable, you might find this helpful:

Code:
defaults write ~/.MacOSX/environment CODE_NAME /Users/laura/code_folder

Then log out and log back in again. It's now part of your environment, regardless the shell being used.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.