How does Macport work?

Michael Crawford mdcrawford at gmail.com
Wed Jun 10 16:14:00 PDT 2009


On Wed, Jun 10, 2009 at 4:06 PM, Fon Vitale<fonvitale at gmail.com> wrote:
> Coming back whit the C compiler example, if Macports installs the compiler
> when I run it what compiler is being running: Macports installed or prior
> Macports one?

That depends on the value of your PATH environment variable.  Give the
following command in the Terminal:

   echo $PATH

You'll see a list of directories.  If /opt/local comes before
/usr/bin, then the MacPorts version will be run; otherwise the
previously installed one will be run.

You can also do:

  which gcc

... and it will give you the pathname of the gcc that will actually be
run if you simply give the "gcc" command.  Which does its work by
examining each of the directories in your PATH.

If you're not hip to PATH and other environment variables, try the
following Google search:

   UNIX shell tutorial

There's lots of good ones, and if you're going to be working with the
command line on Mac OS X, you would do well to read one or two.

Mike
\
-- 
Michael David Crawford
mdcrawford at gmail dot com

   GoingWare's Bag of Programming Tricks
      http://www.goingware.com/tips/


More information about the macports-users mailing list