Revert "Fix bug #9222 - smbd ignores the "server signing = no" setting for SMB2."
[Samba/gebeck_regimport.git] / buildtools / wafadmin / Tools / ar.py
blobaf9b17fd6e99e2a9ea2a2c84c07ce08bef2d902f
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # Thomas Nagy, 2006-2008 (ita)
4 # Ralf Habacker, 2006 (rh)
6 "ar and ranlib"
8 import os, sys
9 import Task, Utils
10 from Configure import conftest
12 ar_str = '${AR} ${ARFLAGS} ${AR_TGT_F}${TGT} ${AR_SRC_F}${SRC}'
13 cls = Task.simple_task_type('static_link', ar_str, color='YELLOW', ext_in='.o', ext_out='.bin', shell=False)
14 cls.maxjobs = 1
15 cls.install = Utils.nada
17 # remove the output in case it already exists
18 old = cls.run
19 def wrap(self):
20 try: os.remove(self.outputs[0].abspath(self.env))
21 except OSError: pass
22 return old(self)
23 setattr(cls, 'run', wrap)
25 def detect(conf):
26 conf.find_program('ar', var='AR')
27 conf.find_program('ranlib', var='RANLIB')
28 conf.env.ARFLAGS = 'rcs'
30 @conftest
31 def find_ar(conf):
32 v = conf.env
33 conf.check_tool('ar')
34 if not v['AR']: conf.fatal('ar is required for static libraries - not found')