summaryrefslogtreecommitdiff
path: root/devdocs/gnu_make/values.html
blob: b17308d00e44df29ba9059fff52d2d807a7412a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
  <h1 class="section">How Variables Get Their Values</h1>   <p>Variables can get values in several different ways: </p> <ul> <li> You can specify an overriding value when you run <code>make</code>. See <a href="overriding">Overriding Variables</a>. </li>
<li> You can specify a value in the makefile, either with an assignment (see <a href="setting">Setting Variables</a>) or with a verbatim definition (see <a href="multi_002dline">Defining Multi-Line Variables</a>). </li>
<li> You can specify a short-lived value with the <code>let</code> function (see <a href="let-function">Let Function</a>) or with the <code>foreach</code> function (see <a href="foreach-function">Foreach Function</a>). </li>
<li> Variables in the environment become <code>make</code> variables. See <a href="environment">Variables from the Environment</a>. </li>
<li> Several <em>automatic</em> variables are given new values for each rule. Each of these has a single conventional use. See <a href="automatic-variables">Automatic Variables</a>. </li>
<li> Several variables have constant initial values. See <a href="implicit-variables">Variables Used by Implicit Rules</a>. </li>
</ul><div class="_attribution">
  <p class="_attribution-p">
    Copyright © 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc. <br>Licensed under the GNU Free Documentation License.<br>
    <a href="https://www.gnu.org/software/make/manual/html_node/Values.html" class="_attribution-link">https://www.gnu.org/software/make/manual/html_node/Values.html</a>
  </p>
</div>