Next: , Previous: , Up: Build Infrastructure Files   [Contents][Index]


20.2 Utilities for Makefiles

These programs can be used in Makefiles. Some of them are also described in https://www.gnu.org/software/automake/manual/html_node/Auxiliary-Programs.html.

build-aux/ar-lib
build-aux/compile

These two scripts are necessary for supporting portability to native Windows with the MSVC compiler. compile is a wrapper script that invokes the compiler and provides a command-line interface compatible with Unix compilers. Similarly, ar-lib is a wrapper script that provides a command-line interface compatible with Unix ar.

build-aux/depcomp

This is a helper script, used by Makefile rules generated by GNU Automake. It generates Makefile dependencies while compiling a file.

build-aux/install-sh

This is a helper script, used by Makefile rules generated by GNU Automake. It installs files during the make install phase. In the Makefile, don’t use this file directly; always use $(INSTALL_PROGRAM) or $(INSTALL_DATA) instead.

build-aux/mdate-sh

This script determines the modification time of a file and pretty-prints it. The typical use is to add a “Last modified” line to the documentation.

build-aux/mkinstalldirs

This is a helper script, used by Makefile rules generated by GNU Automake. It creates directories during the make install phase. It is roughly equivalent to ‘mkdir -p’ (except that the latter is not portable). In the Makefile, don’t use this file directly; always use $(MKDIR_P) instead.

build-aux/mktempd

This script creates a temporary directory. It is roughly equivalent to ‘mktemp -d’ (except that the latter is not portable).

build-aux/move-if-change

This script moves a freshly generated file to a destination file, with a special optimization for the case that both files are identical. In this case the freshly generated file is deleted, and the time stamp of the destination file is not changed. This is useful when updating a file that rarely actually changes and which many Makefile targets depend upon.


Next: Programs for developing in Git checkouts, Previous: Recognizing platforms, Up: Build Infrastructure Files   [Contents][Index]