www.delorie.com/gnu/docs/autoconf/autoconf_22.html   search  
Buy the book!


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.7 Substitutions in Makefiles

Each subdirectory in a distribution that contains something to be compiled or installed should come with a file `Makefile.in', from which configure will create a `Makefile' in that directory. To create a `Makefile', configure performs a simple variable substitution, replacing occurrences of `@variable@' in `Makefile.in' with the value that configure has determined for that variable. Variables that are substituted into output files in this way are called output variables. They are ordinary shell variables that are set in configure. To make configure substitute a particular variable into the output files, the macro AC_SUBST must be called with that variable name as an argument. Any occurrences of `@variable@' for other variables are left unchanged. See section 7.2 Setting Output Variables, for more information on creating output variables with AC_SUBST.

A software package that uses a configure script should be distributed with a file `Makefile.in', but no `Makefile'; that way, the user has to properly configure the package for the local system before compiling it.

See section `Makefile Conventions' in The GNU Coding Standards, for more information on what to put in `Makefile's.

4.7.1 Preset Output Variables  Output variables that are always set
4.7.2 Installation Directory Variables  Other preset output variables
4.7.3 Build Directories  Supporting multiple concurrent compiles
4.7.4 Automatic Remaking  Makefile rules for configuring

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003