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

Harun

macrumors member
Original poster
Sep 6, 2007
31
0
I am new to programming on OSX but not new to programming. I needed GNU indent for a project. The version of indent that ships with OSX wasn't what I was used to. I downloaded GNU's version and after a few hiccups got the build to work. You can download the fixed version that will build from source here:

http://tiny.cc/GbHc6

To build it you need the GNU compiler that Apple provides in the XCode download. If you have all that taken care of, unpack the archive, go in to that directory and do this:

$ autoconf
$ ./configure
$ make
$ sudo make install

You will still have the systems old indent in "/usr/bin/indent/". The new one you just built will be in "/usr/local/bin/indent/". You can resolve this however you wish. I just added the line:

alias indent="/usr/local/bin/indent"

To my .bash_profile.

Enjoy
 
Thanks Harun, this is exactly what I was looking for! Have you tried getting your changes merged back into the official code base?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.