Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it worth learning GNU Make?

Tags:

I'm lately feeling the need to learn a build tool. I'm looking through StackOverflow for recommendations and Gnu Make gets barely mentioned. Instead I see Ant, Maven, CMake, Scon and many others. However, when I look at the little "rogue sources" (as in not-in-the-repo) that I sometimes have to compile, they all require the make && make install steps.

Is learning Make a worse investment of my time than learning another tool?

If so why is Make still so popular?

like image 641
Michael Ekoka Avatar asked Aug 27 '09 13:08

Michael Ekoka


People also ask

Do people still use make?

Make is a venerable expert system for building software. It is still used heavily and extensively, so yes it is worth learning.

Should I use make?

There are some words that go together with “make” and others that go together with “do.” In other words, there are fixed expressions in English with both of these verbs, and you just have to learn them. But there are general rules you can follow: Use “make” for when you create or produce something.

Is GNU make open source?

GNU Make in Detail for Beginners | Open Source For You.


2 Answers

Make is the standard build tool for everything C/C++. Many others have stepped to the plate, but even when they were useful and successful, they never achieved the ubiquity of make.

Make is installed on virtually every Unix-like machine out there. No matter if you're working with AIX, Solaris, Irix, BSD, or Linux, if there's a compiler installed, there's also make.

Some of the "replacements" (like Automake, CMake) even create Makefiles, which are in turn executed by make.

I would definitely recommend becoming familiar with make. If handled by someone who took the time to learn about make, it is a powerful tool, which can be used in a number of ways not even necessarily related to software development.

Even if you end up using a different build tool in the end, you will be able to "recycle" the lessons learned with make, as the underlying concepts are quite similar. And the sheer number of make-built projects means that there will always be the chance that you have to figure out an existing Makefile.

One thing, though. Get it right from the beginning.

like image 167
DevSolar Avatar answered Oct 21 '22 05:10

DevSolar


I think the reason you don't see (GNU) make mentioned is that it's often the default; if you have a GNU toolchain, you will have make already. Thus, most people that start talking about build tools, talk about something else.

In my experience, make is fine, but it can be kind of tricky to get it to do exactly what you want to. It's maybe slightly arcane, but it's proven and works.

like image 33
unwind Avatar answered Oct 21 '22 05:10

unwind