install make command without already having make (mac os 10.5)
Asked Answered
J

4

11

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.

Juline answered 31/3, 2010 at 21:4 Comment(0)
T
17

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!

Transformation answered 1/4, 2010 at 15:59 Comment(2)
I was trying to install gcc compiler. It requires Make. Make installation (configure step) requires gcc, however. Any idea how to proceed? Appreciate your help.Lyndsaylyndsey
I think you'll find configuring and building Make requires a C compiler, but not GCC specifically.Transformation
U
3

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.

Ullman answered 1/4, 2010 at 0:24 Comment(4)
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.)"Juline
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?Ullman
Yeah, its unfortunate they make you download the whole package just to get one thing that you want.Juline
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.Photothermic
L
3

How about using a precompiled make binary?

See:

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

Lackluster answered 1/4, 2010 at 12:13 Comment(0)
W
1

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

Winifredwinikka answered 1/4, 2010 at 0:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.