<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>waflib.Tools.ar — Waf 1.7.11 documentation</title> <link rel="stylesheet" href="../../../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../../', VERSION: '1.7.11', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../../../_static/jquery.js"></script> <script type="text/javascript" src="../../../_static/underscore.js"></script> <script type="text/javascript" src="../../../_static/doctools.js"></script> <link rel="author" title="About these documents" href="../../../about.html" /> <link rel="copyright" title="Copyright" href="../../../copyright.html" /> <link rel="top" title="Waf 1.7.11 documentation" href="../../../index.html" /> <link rel="up" title="Module code" href="../../index.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li><a href="../../../index.html">Waf 1.7.11 documentation</a> »</li> <li><a href="../../index.html" accesskey="U">Module code</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <h1>Source code for waflib.Tools.ar</h1><div class="highlight"><pre> <span class="c">#!/usr/bin/env python</span> <span class="c"># encoding: utf-8</span> <span class="c"># Thomas Nagy, 2006-2010 (ita)</span> <span class="c"># Ralf Habacker, 2006 (rh)</span> <span class="sd">"""</span> <span class="sd">The **ar** program creates static libraries. This tool is almost always loaded</span> <span class="sd">from others (C, C++, D, etc) for static library support.</span> <span class="sd">"""</span> <span class="kn">from</span> <span class="nn">waflib.Configure</span> <span class="kn">import</span> <span class="n">conf</span> <span class="nd">@conf</span> <div class="viewcode-block" id="find_ar"><a class="viewcode-back" href="../../../tools/ar.html#waflib.Tools.ar.find_ar">[docs]</a><span class="k">def</span> <span class="nf">find_ar</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span> <span class="sd">"""Configuration helper used by C/C++ tools to enable the support for static libraries"""</span> <span class="n">conf</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="s">'ar'</span><span class="p">)</span> </div> <div class="viewcode-block" id="configure"><a class="viewcode-back" href="../../../tools/ar.html#waflib.Tools.ar.configure">[docs]</a><span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span> <span class="sd">"""Find the ar program and set the default flags in ``conf.env.ARFLAGS``"""</span> <span class="n">conf</span><span class="o">.</span><span class="n">find_program</span><span class="p">(</span><span class="s">'ar'</span><span class="p">,</span> <span class="n">var</span><span class="o">=</span><span class="s">'AR'</span><span class="p">)</span> <span class="n">conf</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">ARFLAGS</span> <span class="o">=</span> <span class="s">'rcs'</span> </pre></div></div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../../../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li><a href="../../../index.html">Waf 1.7.11 documentation</a> »</li> <li><a href="../../index.html" >Module code</a> »</li> </ul> </div> <div class="footer"> © <a href="../../../copyright.html">Copyright</a> 2010, Thomas Nagy. </div> </body> </html>