setting a path in bash shell

Discussion in 'Mac Programming' started by laura74, Mar 20, 2010.

  1. laura74 macrumors newbie

    Joined:
    Mar 20, 2010
    #1
    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!
     
  2. Detrius macrumors 68000

    Joined:
    Sep 10, 2008
    Location:
    Asheville, NC
    #2
    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.
     

Share This Page