Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Make is so simple that it can actually build you single file project without a makefile with less characters to type:

make tool

Et voilà.



sort by: page size:

I disagree. Make is more than a build system, it's also an automation tool. It gives you a fairly flexible format for managing different tasks with shared variables and autocompletion and more.

You can do it with a bunch of shell scripts too but I prefer having everything in a single file.


You can whip up a makefile in seconds to do simple stuff, too. That's not the problem I'm talking about; it's not that make is hard, it's that it is incomplete (and kinda hard, for advanced stuff).

If your needs aren't trivial, just use GNU make if you're using make.

Make is a much the lingua franca of build systems as C is for programming, so there's no reason not to provide a (simple) makefile. The alternative they suggest is worse anyway.

I had a similar epiphany a year or so ago. After cursing make files and their syntax for so long, I had arrived at a moment in which the project I was working on truly called for make. The project assumed no other dependencies than a standard *nix OS and needed some simple compilation. So I sat down with the make documentation and in an hour had basically figured out what I needed. Almost no pain, super speedy, little trouble.

Admittedly the syntax is /unique/ to makefiles, which I think is the biggest downside. There is a huge benefit to not having to learn one more way of doing things. And I think that's the big appeal of tools like rake (as well as the ability to easily leverage, libraries, and other higher order programming concepts). But for the simple tasks of compilation, and minor project management. Give me Make.


There's something to be said for relatively simple tool like make. It can be a lot easier to understand what's going on with Make because it eliminates the layers of stuff between the build script and the actual commands that are run. That's not to say that it's possible to write inscrutable Makefiles.

Makefiles, once you have learned the syntax, are very simple to write, as they can be naturally decomposed into individual steps, and rules are easily generalized for similar file types.

Their reputation has been tarnished by autotools, but in that case you're using autotools as your build system, not make.


I am glad, that make exists. Guess what would happen, if every open source tool would use its own build environment. Open Source Software would be much more difficult to build from sources (sometimes, I can't do without).

So it is rather straight forward. Type make, sometimes autoconf and most of the time you are done.

Also in my own projects I prefer make to many other build tools. In software development, command line still rules (if you want to be really productive)!


I certainly like it when I encounter a new project, type make, and it just works.

This is rare these days.. honestly at this point there's so much tooling already around that one can't really ever take that for granted. Almost always, I need to look for some readme or look around and figure out what build system is in use (sometimes it's a common system plus custom stuff so just seeing a name you recognize isn't automatically going to mean the standard invocation will work).

In this case, it hardly matters whether I'm going to run make or ./build or make help or ./build help. A simple script, which I'm advocating for simple projects, can double as a form of README just as a Makefile can.


The author wanted a build system which does not ultimately generate a bunch of Makefiles. CMake and GNU Autotools both rely on Make to do real work.

make is portable efficient versatile and simple. unlike imake, cmake, scons, waf, automake, autoconf, ... ad NAUSEAM.

Make is an absolutely wonderful, wonderful tool.

Most of the common criticisms of Make are actually criticisms of autoconf, which I agree is a hideous tool. (On the other hand, autoconf is a tool intended to address a hideous problem, so perhaps that's inevitable).

A lot of the more recent build tools I see are largely reinventions of Make. Make is very widely supported (most basic projects can make do[0] with portable Makefiles, though GNU Make is also available for most systems), and its syntax is actually very easy to grasp and manipulate[1].

[0] no pun intended

[1] Most projects only need a very small subset of what Make has to offer, anyway, and that can be learned in a matter of minutes.


Preach to the choir! :)

Make does so many things correctly:

- it gives user total freedom to modify the built

- yet it has excellent defaults for most situations

- it is full blown programming language,

- yet it's syntax is extremely specialized for the purpose and familiar at the same time (it's bash)

- it's basic assumptions/structure are extremely simple (timestamps, dependencies)

- yet it's extremely powerful and can take into account most situations.

It's be extremely Unix-style tool with very simple building blocks that combine together in extremely powerful way. Its fast to learn and easy to master and as such, the best kind of design.

Sometimes making a build with it is a small programming project, yet after using all kinds of built tools, I end up just wishing that I could use make instead.


Make shares a fundamental property with C and C++: they are not meant to be simple; they are meant to be powerful!

In the purest Unix tradition, Make was designed to be tool-agnostic: you can choose which editor to code in, which (if any) preprocessor to use, which compiler and which linker to invoke and with which arguments, and what else to do aside.

And, all of this is controlled by a bunch of text files, which means grep and sed are your friends when you want to change a linker option for several projects.

Make comes from a philosophy which is the opposite of the IDE's ground. Not that the IDE concept is wrong per se, but if you are only used to have the same monolithic behemoth from code typing to binary output, your critics of make sound the same as an industrial fast food cook complaining that artisan patisserie is too complex.


Everybody seems to be missing the fact that he's not talking about building a big software project. He's talking about scripting a simple workflow around a few files. Make is probably better than anything else for this, because under these circumstances it's so simple it's hard to get it wrong.

Something like Rake is obviously better when you need to really program your builds.


I can't tell you how many projects I've shelved for months and when I returned thought, "Damn it. How do I build this again? Oh look a Makefile. Thank you Past Eric."

Even for projects that use more sophisticated build tools like rebar, leiningen or npm I write a Makefile so I don't have to remember those tools. Make provides a universal interface to those tools.


You avoid all the complications of make. Extra syntax, variable substitution, lack of functions and loops, ...

How?

Visual Studio isn't available for my OS, and Makefiles just don't cut it anymore. (I typically use CMake, but I'll use anything that gives me fast build times and gets out of the way. Make typically isn't that.)¹

1. I can do a build in one command. 2. It doesn't take forever. 3. It's easy to set up & modify.

¹Although, CMake generates makefiles. Does that count?


Man I love Make. But recently started a new job and we decided to use Just* and it's been fantastic. I doubt I would use Make again unless I was planning to use it as a real build system (which has been the minority use case of my use cases in the last 5 or so years).

* https://github.com/casey/just

next

Legal | privacy