GNU Make 4.1
Build and install programs from makefile
GNU Make gets its knowledge of how to build your program from a file called the makefile, which lists each of the non-source files and how to compute it from other files. When you write a program, you should write a makefile for it, so that it is possible to use GNU Make to build and install the program.
GNU Make enables the end user to build and install your package without knowing the details of how that is done -- because these details are recorded in the makefile that you supply.
GNU Make figures out automatically which files it needs to update, based on which source files have changed. It also automatically determines the proper order for updating files, in case one non-source file depends on another non-source file.
As a result, if you change a few source files and then run GNU Make, it does not need to recompile all of your program. It updates only those non-source files that depend directly or indirectly on the source files that you changed.
GNU Make is not limited to any particular language. For each non-source file in the program, the makefile specifies the shell commands to compute it. These shell commands can run a compiler to produce an object file, the linker to produce an executable, ar to update a library, or TeX or GNU Makeinfo to format documentation.
GNU Make is not limited to building a package. You can also use GNU Make to generate tags tables for it, control installing or deinstalling a package, or anything else you want to do often enough to make it worth while writing down how to do it.
In a hurry? Add it to your Download Basket!
What's New in This Release:
- New variables: $(MAKE_TERMOUT) and $(MAKE_TERMERR) are set to non-empty values if stdout or stderr, respectively, are believed to be writing to a terminal. These variables are exported by default.
- Allow a no-text-argument form of the $(file ...) function. Without a text argument nothing is written to the file: it is simply opened in the requested mode, then closed again.
- Change the fatal error for mixed explicit and implicit rules, that was introduced in GNU make 3.82, to a non-fatal error. However, this syntax is still deprecated and may return to being illegal in a future version of GNU make. Makefiles that rely on this syntax should be fixed.