GNU Make

October 9th, 1997    (updated November 6th, 2022)


GNU Make is the implementation of make written for the Free Software Foundation’s GNU Operating System. The make utility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them.

GNU Make conforms to section 6.2 of IEEE Standard 1003.2-1992 (POSIX.2), and in addition provides a wealth of very sophisticated features for creating modern build environments.

Release Information

The latest release of GNU Make is version 4.4.

You can download the source code for it from the GNU FTP site or any of its many mirror sites. GNU Make is extremely portable and should be simple to compile for any supported system (you do need a C compiler, though).

In general, pre-compiled versions aren’t available. Eli Zaretskii makes pre-compiled Windows versions availabe; try https://sourceforge.net/projects/ezwinports/files/?source=navbar and search for the make-....zip files. The DJGPP project makes pre-compiled DOS versions available; try ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/ and look for the makNNNb.zip files.

GNU Make development is managed via the FSF’s Savannah project. You can visit the GNU Make development resource site for Web-based technical support, bug tracking, patch management, mailing list management, a link to the FTP download site, and information on obtaining the up-to-the-minute version of GNU Make via Git.

In order to build GNU Make from Git, you will also need to install a plethora of GNU development tools, such as GNU automake, GNU autoconf, and GNU gettext. In order to use these you will need other software, such as GNU m4 and Perl. The full details are in the README.git file in the Git version of the distribution. Please note carefully! These requirements are only for building the Git version of GNU Make. You need nothing but a vanilla C compiler to build the version of GNU Make contained in a release tarfile.

Mailing Lists

There are three mailing lists specifically for GNU Make. They are sponsored by the FSF and are managed using GNU Mailman.

The first is bug-make@gnu.org. This list is for discussing bugs or potential bugs in the program. To subscribe, unsubscribe, or view the mailing list archives see the Bug-make Info Page.

The second is help-make@gnu.org. This list is for asking questions about ways to use make, or how it works, or how to apply it to resolve some build issue you may be having. To subscribe, unsubscribe, or view the mailing list archives see the Help-make Info Page.

The third is make-w32@gnu.org. This list is specifically for questions and help with using GNU Make on Microsoft platforms, both Windows and (despite the mailing list title) DOS. If you have a problem that you feel is Windows/DOS-specific, you will very likely get more knowledgeable responses here than on the other two lists. To subscribe, unsubscribe, or view the mailing list archives see the Make-w32 Info Page.

Reporting Problems

If you find a problem you believe is a bug, first please double-check the manual. In particular, since make variants differ widely in the functionality they offer, you should examine the chapter Incompatibilities and Missing Features to determine if this is a known incompatibility with another version of make.

If you still believe it’s a bug, you should next consult the bug list on the GNU Make Savannah project page. See if it’s been reported already; often patches for problems are provided in the bug resolution. If you don’t find it reported already, you can submit a new problem report there. Or, if you like, you can send the problem report via email to bug-make@gnu.org.

When reporting bugs, it is crucial that you provide all relevant information needed to understand the bug: what version of GNU Make you’re using (use make --version), what version of which operating system you’re using, the exact error or incorrect output you received (cut and paste, please, no paraphrasing!), and what you expected to happen. Reproduce the problem with a small a sample makefile as possible, if you can. Please have your sample makefile use only standard UNIX tools; avoid Fortran or Java compilers, for example. You can always synthesize the operations the compiler would perform with touch or other simple tools. See the section Problems and Bugs for more details.

Do not send your entire makefile environment; we do not have the resources to debug your makefiles! All such requests will be ignored.

Getting Help

If you aren’t sure if you have a bug, or really just want some help, you can contact various GNU Make knowledgeable people at help-make@gnu.org.

Even when only asking for help, you’ll get the best results if you provide all the same information described above for reporting bugs.

GNU Make Manual

The GNU Make Manual is provided with the GNU Make distribution. It is distributed both in its original Texinfo format, and in Info format.

It can be converted into TeX (and subsequently into printable formats on a variety of devices) and into HTML using the GNU Texinfo package.

The GNU Project now makes many of its manuals available in various formats at their site. In particular, the GNU Make manual is available here in various forms of HTML, Info, ASCII text, TeX DVI, PostScript, and original Texinfo source.

If you don’t use Emacs and want a nice graphical Info manual browser, try tkInfo, which is a very useful Tcl/TK-based Info reader.

Resources

  • Whitepapers
  • FSF’s GNU Make page
  • GNU Make Standard Library is a complete suite of typical standard library functions (written in GNU Make syntax), including list manipulators, set manipulators, string manipulators, logical operators, and even arithmetic operators, as well as a few other things. A hugely valuable resource! Created by John Graham-Cumming (also see his book, referenced below).
  • Remake is an enhanced version of GNU Make that gives the ability to debug makefiles. Think of remake as “GDB for makefiles”.
  • The GNU Make Book (John Graham-Cumming) is chock full of really useful tricks for writing, debugging, and maintaining GNU Make makefiles. You will definitely learn some new things from this book… I certainly did!  (Full Disclosure: I was a technical reviewer for this book.)
  • Managing Projects with GNU Make (Third Edition) (Robert Mecklenburg) is an update to O’Reilly’s popular Managing Projects with Make. The new edition focuses on GNU Make in particular, and provides discussion and examples of more advanced uses of GNU Make.
  • GNU Make Unleashed (John Graham-Cumming) is a collection of John’s monthly articles on using GNU Make. Topics are wide-ranging and well-covered.
  • VPATH+ Patch (OBSOLETE)