tags:

views:

273

answers:

4

I'm trying to write a script that uses the make command, but Mac os 10.5 doesn't come with make installed by default, and when you download the make source code from gnu's website, you have to use make itself to compile and install it. which is hard if you don't have it in the first place. How can I install make?
(I know you can get make by installing Xcode and the developer tools that come with mac os, but I don't want people to have to go find their mac os install dvds to be able to use the script.)

It doesn't even have to be make, i'm just looking for a utility that you can easily download in a script (using ftp or curl) and use to compile source code.

+1  A: 

Have you tried looking at the fink project? It looks like they have a make package. http://pdb.finkproject.org/pdb/browse.php?name=make&sec=devel

amertune
+2  A: 

The Developer Tools are included on the OS X install disk under "Optional Installs".

Edit:

You can download Xcode if you're registered as an Apple Developer.

Dennis Williamson
In my question, I said:"(I know you can get make by installing Xcode and the developer tools that come with mac os, but I don't want people to have to go find their mac os install dvds to be able to use the script.)"
adam n
Sorry, I missed that. It looks like it's a choice of finding their DVD or downloading and possibly building it. Which is the most trouble? What is Apple's policy toward redistributing individual files?
Dennis Williamson
Yeah, its unfortunate they make you download the whole package just to get one thing that you want.
adam n
Note that Macs often have the Developer Tools installer already in /Applications/Installers, so you don't even need to find your DVDs. Of course it won't be the latest version (Xcode 3.2.1 currently) but if should be good enough if you just need `make`.
Paul R
+1  A: 

How about using a precompiled make binary?

See:

http://rudix.org/packages-mn.html#make

errno
+1  A: 

A GNU Make source tarball contains a build.sh script to resolve this chicken-and-egg situation. From the README:

If you need to build GNU Make and have no other make program to use, you can use the shell script build.sh instead. To do this, first run configure as described in INSTALL. Then, instead of typing make to build the program, type sh build.sh. This should compile the program in the current directory. Then you will have a Make program that you can use for ./make install, or whatever else.

Yes, they thought of this problem!

John Marshall