thirdparty:waf: New files for waf 1.9.10
[sfrench/samba-autobuild/.git] / third_party / waf / waflib / Tools / ar.py
1 #! /usr/bin/env python
2 # encoding: utf-8
3 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
4
5 #!/usr/bin/env python
6 # encoding: utf-8
7 # Thomas Nagy, 2006-2016 (ita)
8 # Ralf Habacker, 2006 (rh)
9
10 """
11 The **ar** program creates static libraries. This tool is almost always loaded
12 from others (C, C++, D, etc) for static library support.
13 """
14
15 from waflib.Configure import conf
16
17 @conf
18 def find_ar(conf):
19         """Configuration helper used by C/C++ tools to enable the support for static libraries"""
20         conf.load('ar')
21
22 def configure(conf):
23         """Finds the ar program and sets the default flags in ``conf.env.ARFLAGS``"""
24         conf.find_program('ar', var='AR')
25         conf.add_os_flags('ARFLAGS')
26         if not conf.env.ARFLAGS:
27                 conf.env.ARFLAGS = ['rcs']