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.
Developers need to install Xcode Command Line Tools before they can develop software on a Mac. Apple provides a complete development environment for programmers named Xcode. If you are developing software for macOS, iOS, tvOS, and watchOS, you must install the full Xcode application.
To install Xcode Command Line Tools, navigate to your device's Terminal app again through Spotlight Search. Then, type “xcode-select –install” into your terminal and hit Enter. Instead of clicking “Get Xcode” like before, find and click Install at the bottom-right-hand corner of the new window.
Go to Terminal in /Applications/Utilities/. In the same way when you are downloading new software and apps, a popup update window will appear asking you: “The xcode-select command requires the command line developer tools. Would you like to install the tools now?” Select confirm by clicking Install.
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 typingmake
to build the program, typesh 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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With