1
2
3
4
5
6
7
8
|
<h1 class="subsection">Interfaces from Guile to make</h1> <p>In addition to the <code>guile</code> function available in makefiles, <code>make</code> exposes some procedures for use in your Guile scripts. At startup <code>make</code> creates a new Guile module, <code>gnu make</code>, and exports these procedures as public interfaces from that module: </p> <dl compact> <dt id="gmk-expand"><code>gmk-expand</code></dt> <dd>
<p>This procedure takes a single argument which is converted into a string. The string is expanded by <code>make</code> using normal <code>make</code> expansion rules. The result of the expansion is converted into a Guile string and provided as the result of the procedure. </p> </dd> <dt id="gmk-eval"><code>gmk-eval</code></dt> <dd>
<p>This procedure takes a single argument which is converted into a string. The string is evaluated by <code>make</code> as if it were a makefile. This is the same capability available via the <code>eval</code> function (see <a href="eval-function">Eval Function</a>). The result of the <code>gmk-eval</code> procedure is always the empty string. </p> <p>Note that <code>gmk-eval</code> is not quite the same as using <code>gmk-expand</code> with the <code>eval</code> function: in the latter case the evaluated string will be expanded <em>twice</em>; first by <code>gmk-expand</code>, then again by the <code>eval</code> function. </p> </dd> </dl><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/Guile-Interface.html" class="_attribution-link">https://www.gnu.org/software/make/manual/html_node/Guile-Interface.html</a>
</p>
</div>
|