s4-waf: removed the unused installdir= option to SAMBA_BINARY()
[kai/samba.git] / buildtools / wafsamba / wafsamba.py
1 # a waf tool to add autoconf-like macros to the configure section
2 # and for SAMBA_ macros for building libraries, binaries etc
3
4 import Build, os, Options, Task, Utils, cc, TaskGen, fnmatch, re, shutil, Logs, Constants
5 from Configure import conf
6 from Logs import debug
7 from samba_utils import SUBST_VARS_RECURSIVE
8
9 # bring in the other samba modules
10 from samba_optimisation import *
11 from samba_utils import *
12 from samba_autoconf import *
13 from samba_patterns import *
14 from samba_pidl import *
15 from samba_errtable import *
16 from samba_asn1 import *
17 from samba_autoproto import *
18 from samba_python import *
19 from samba_deps import *
20 from samba_bundled import *
21 import samba_install
22 import samba_conftests
23 import samba_abi
24 import tru64cc
25 import irixcc
26 import generic_cc
27 import samba_dist
28
29 O644 = 420
30
31 # some systems have broken threading in python
32 if os.environ.get('WAF_NOTHREADS') == '1':
33     import nothreads
34
35 LIB_PATH="shared"
36
37 os.putenv('PYTHONUNBUFFERED', '1')
38
39
40 if Constants.HEXVERSION < 0x105016:
41     Logs.error('''
42 Please use the version of waf that comes with Samba, not
43 a system installed version. See http://wiki.samba.org/index.php/Waf
44 for details.
45
46 Alternatively, please use ./autogen-waf.sh, and then
47 run ./configure and make as usual. That will call the right version of waf.
48 ''')
49     sys.exit(1)
50
51
52 @conf
53 def SAMBA_BUILD_ENV(conf):
54     '''create the samba build environment'''
55     conf.env.BUILD_DIRECTORY = conf.blddir
56     mkdir_p(os.path.join(conf.blddir, LIB_PATH))
57     mkdir_p(os.path.join(conf.blddir, 'python/samba/dcerpc'))
58     # this allows all of the bin/shared and bin/python targets
59     # to be expressed in terms of build directory paths
60     for p in ['python','shared']:
61         link_target = os.path.join(conf.blddir, 'default/' + p)
62         if not os.path.lexists(link_target):
63             os.symlink('../' + p, link_target)
64
65     # get perl to put the blib files in the build directory
66     blib_bld = os.path.join(conf.blddir, 'default/pidl/blib')
67     blib_src = os.path.join(conf.srcdir, 'pidl/blib')
68     mkdir_p(blib_bld + '/man1')
69     mkdir_p(blib_bld + '/man3')
70     if os.path.islink(blib_src):
71         os.unlink(blib_src)
72     elif os.path.exists(blib_src):
73         shutil.rmtree(blib_src)
74
75
76 def ADD_INIT_FUNCTION(bld, subsystem, target, init_function):
77     '''add an init_function to the list for a subsystem'''
78     if init_function is None:
79         return
80     bld.ASSERT(subsystem is not None, "You must specify a subsystem for init_function '%s'" % init_function)
81     cache = LOCAL_CACHE(bld, 'INIT_FUNCTIONS')
82     if not subsystem in cache:
83         cache[subsystem] = []
84     cache[subsystem].append( { 'TARGET':target, 'INIT_FUNCTION':init_function } )
85 Build.BuildContext.ADD_INIT_FUNCTION = ADD_INIT_FUNCTION
86
87
88
89 #################################################################
90 def SAMBA_LIBRARY(bld, libname, source,
91                   deps='',
92                   public_deps='',
93                   includes='',
94                   public_headers=None,
95                   header_path=None,
96                   pc_files=None,
97                   vnum=None,
98                   cflags='',
99                   external_library=False,
100                   realname=None,
101                   autoproto=None,
102                   group='main',
103                   depends_on='',
104                   local_include=True,
105                   vars=None,
106                   install_path=None,
107                   install=True,
108                   needs_python=False,
109                   target_type='LIBRARY',
110                   bundled_extension=True,
111                   link_name=None,
112                   abi_file=None,
113                   abi_match=None,
114                   hide_symbols=False,
115                   enabled=True):
116     '''define a Samba library'''
117
118     if not enabled:
119         SET_TARGET_TYPE(bld, libname, 'DISABLED')
120         return
121
122     source = bld.EXPAND_VARIABLES(source, vars=vars)
123
124     # remember empty libraries, so we can strip the dependencies
125     if (source == '') or (source == []):
126         SET_TARGET_TYPE(bld, libname, 'EMPTY')
127         return
128
129     if target_type != 'PYTHON' and BUILTIN_LIBRARY(bld, libname):
130         obj_target = libname
131     else:
132         obj_target = libname + '.objlist'
133
134     # first create a target for building the object files for this library
135     # by separating in this way, we avoid recompiling the C files
136     # separately for the install library and the build library
137     bld.SAMBA_SUBSYSTEM(obj_target,
138                         source         = source,
139                         deps           = deps,
140                         public_deps    = public_deps,
141                         includes       = includes,
142                         public_headers = public_headers,
143                         header_path    = header_path,
144                         cflags         = cflags,
145                         group          = group,
146                         autoproto      = autoproto,
147                         depends_on     = depends_on,
148                         needs_python   = needs_python,
149                         hide_symbols   = hide_symbols,
150                         local_include  = local_include)
151
152     if libname == obj_target:
153         return
154
155     if not SET_TARGET_TYPE(bld, libname, target_type):
156         return
157
158     # the library itself will depend on that object target
159     deps += ' ' + public_deps
160     deps = TO_LIST(deps)
161     deps.append(obj_target)
162
163     if target_type == 'PYTHON':
164         bundled_name = libname
165     else:
166         bundled_name = BUNDLED_NAME(bld, libname, bundled_extension)
167
168     features = 'cc cshlib symlink_lib install_lib'
169     if target_type == 'PYTHON':
170         features += ' pyext'
171     elif needs_python:
172         features += ' pyembed'
173     if abi_file:
174         features += ' abi_check'
175
176     if abi_file:
177         abi_file = os.path.join(bld.curdir, abi_file)
178
179     bld.SET_BUILD_GROUP(group)
180     t = bld(
181         features        = features,
182         source          = [],
183         target          = bundled_name,
184         samba_cflags    = CURRENT_CFLAGS(bld, libname, cflags),
185         depends_on      = depends_on,
186         samba_deps      = deps,
187         samba_includes  = includes,
188         local_include   = local_include,
189         vnum            = vnum,
190         install_path    = None,
191         samba_inst_path = install_path,
192         name            = libname,
193         samba_realname  = realname,
194         samba_install   = install,
195         abi_file        = abi_file,
196         abi_match       = abi_match
197         )
198
199     if link_name:
200         t.link_name = link_name
201
202     if pc_files is not None:
203         bld.PKG_CONFIG_FILES(pc_files, vnum=vnum)
204
205 Build.BuildContext.SAMBA_LIBRARY = SAMBA_LIBRARY
206
207
208 #################################################################
209 def SAMBA_BINARY(bld, binname, source,
210                  deps='',
211                  includes='',
212                  public_headers=None,
213                  header_path=None,
214                  modules=None,
215                  ldflags=None,
216                  cflags='',
217                  autoproto=None,
218                  use_hostcc=False,
219                  use_global_deps=True,
220                  compiler=None,
221                  group='binaries',
222                  manpages=None,
223                  local_include=True,
224                  subsystem_name=None,
225                  needs_python=False,
226                  vars=None,
227                  install=True,
228                  install_path=None):
229     '''define a Samba binary'''
230
231     if not SET_TARGET_TYPE(bld, binname, 'BINARY'):
232         return
233
234     features = 'cc cprogram symlink_bin install_bin'
235     if needs_python:
236         features += ' pyembed'
237
238     obj_target = binname + '.objlist'
239
240     source = bld.EXPAND_VARIABLES(source, vars=vars)
241
242     # first create a target for building the object files for this binary
243     # by separating in this way, we avoid recompiling the C files
244     # separately for the install binary and the build binary
245     bld.SAMBA_SUBSYSTEM(obj_target,
246                         source         = source,
247                         deps           = deps,
248                         includes       = includes,
249                         cflags         = cflags,
250                         group          = group,
251                         autoproto      = autoproto,
252                         subsystem_name = subsystem_name,
253                         needs_python   = needs_python,
254                         local_include  = local_include,
255                         use_hostcc     = use_hostcc,
256                         use_global_deps= use_global_deps)
257
258     bld.SET_BUILD_GROUP(group)
259
260     # the binary itself will depend on that object target
261     deps = TO_LIST(deps)
262     deps.append(obj_target)
263
264     t = bld(
265         features       = features,
266         source         = [],
267         target         = binname,
268         samba_cflags   = CURRENT_CFLAGS(bld, binname, cflags),
269         samba_deps     = deps,
270         samba_includes = includes,
271         local_include  = local_include,
272         samba_modules  = modules,
273         top            = True,
274         samba_subsystem= subsystem_name,
275         install_path   = None,
276         samba_inst_path= install_path,
277         samba_install  = install
278         )
279
280     # setup the subsystem_name as an alias for the real
281     # binary name, so it can be found when expanding
282     # subsystem dependencies
283     if subsystem_name is not None:
284         bld.TARGET_ALIAS(subsystem_name, binname)
285
286 Build.BuildContext.SAMBA_BINARY = SAMBA_BINARY
287
288
289 #################################################################
290 def SAMBA_MODULE(bld, modname, source,
291                  deps='',
292                  includes='',
293                  subsystem=None,
294                  init_function=None,
295                  autoproto=None,
296                  autoproto_extra_source='',
297                  aliases=None,
298                  cflags='',
299                  internal_module=True,
300                  local_include=True,
301                  vars=None,
302                  enabled=True):
303     '''define a Samba module.'''
304
305     # we add the init function regardless of whether the module
306     # is enabled or not, as we need to generate a null list if
307     # all disabled
308     bld.ADD_INIT_FUNCTION(subsystem, modname, init_function)
309
310     if internal_module or BUILTIN_LIBRARY(bld, modname):
311         # treat internal modules as subsystems for now
312         SAMBA_SUBSYSTEM(bld, modname, source,
313                         deps=deps,
314                         includes=includes,
315                         autoproto=autoproto,
316                         autoproto_extra_source=autoproto_extra_source,
317                         cflags=cflags,
318                         local_include=local_include,
319                         enabled=enabled)
320         return
321
322     if not enabled:
323         SET_TARGET_TYPE(bld, modname, 'DISABLED')
324         return
325
326     source = bld.EXPAND_VARIABLES(source, vars=vars)
327
328     # remember empty modules, so we can strip the dependencies
329     if (source == '') or (source == []):
330         SET_TARGET_TYPE(bld, modname, 'EMPTY')
331         return
332
333     if not SET_TARGET_TYPE(bld, modname, 'MODULE'):
334         return
335
336     if subsystem is not None:
337         deps += ' ' + subsystem
338
339     bld.SET_BUILD_GROUP('main')
340     bld(
341         features       = 'cc',
342         source         = source,
343         target         = modname,
344         samba_cflags   = CURRENT_CFLAGS(bld, modname, cflags),
345         samba_includes = includes,
346         local_include  = local_include,
347         samba_deps     = TO_LIST(deps)
348         )
349
350     if autoproto is not None:
351         bld.SAMBA_AUTOPROTO(autoproto, source + ' ' + autoproto_extra_source)
352
353 Build.BuildContext.SAMBA_MODULE = SAMBA_MODULE
354
355
356 #################################################################
357 def SAMBA_SUBSYSTEM(bld, modname, source,
358                     deps='',
359                     public_deps='',
360                     includes='',
361                     public_headers=None,
362                     header_path=None,
363                     cflags='',
364                     cflags_end=None,
365                     group='main',
366                     init_function_sentinal=None,
367                     heimdal_autoproto=None,
368                     heimdal_autoproto_options=None,
369                     heimdal_autoproto_private=None,
370                     autoproto=None,
371                     autoproto_extra_source='',
372                     depends_on='',
373                     local_include=True,
374                     local_include_first=True,
375                     subsystem_name=None,
376                     enabled=True,
377                     use_hostcc=False,
378                     use_global_deps=True,
379                     vars=None,
380                     hide_symbols=False,
381                     needs_python=False):
382     '''define a Samba subsystem'''
383
384     if not enabled:
385         SET_TARGET_TYPE(bld, modname, 'DISABLED')
386         return
387
388     # remember empty subsystems, so we can strip the dependencies
389     if (source == '') or (source == []):
390         SET_TARGET_TYPE(bld, modname, 'EMPTY')
391         return
392
393     if not SET_TARGET_TYPE(bld, modname, 'SUBSYSTEM'):
394         return
395
396     source = bld.EXPAND_VARIABLES(source, vars=vars)
397
398     deps += ' ' + public_deps
399
400     bld.SET_BUILD_GROUP(group)
401
402     features = 'cc'
403     if needs_python:
404         features += ' pyext'
405
406     t = bld(
407         features       = features,
408         source         = source,
409         target         = modname,
410         samba_cflags   = CURRENT_CFLAGS(bld, modname, cflags, hide_symbols=hide_symbols),
411         depends_on     = depends_on,
412         samba_deps     = TO_LIST(deps),
413         samba_includes = includes,
414         local_include  = local_include,
415         local_include_first  = local_include_first,
416         samba_subsystem= subsystem_name,
417         samba_use_hostcc = use_hostcc,
418         samba_use_global_deps = use_global_deps
419         )
420
421     if cflags_end is not None:
422         t.samba_cflags.extend(TO_LIST(cflags_end))
423
424     if heimdal_autoproto is not None:
425         bld.HEIMDAL_AUTOPROTO(heimdal_autoproto, source, options=heimdal_autoproto_options)
426     if heimdal_autoproto_private is not None:
427         bld.HEIMDAL_AUTOPROTO_PRIVATE(heimdal_autoproto_private, source)
428     if autoproto is not None:
429         bld.SAMBA_AUTOPROTO(autoproto, source + ' ' + autoproto_extra_source)
430     if public_headers is not None:
431         bld.PUBLIC_HEADERS(public_headers, header_path=header_path)
432     return t
433
434
435 Build.BuildContext.SAMBA_SUBSYSTEM = SAMBA_SUBSYSTEM
436
437
438 def SAMBA_GENERATOR(bld, name, rule, source='', target='',
439                     group='generators', enabled=True,
440                     public_headers=None,
441                     header_path=None,
442                     vars=None):
443     '''A generic source generator target'''
444
445     if not SET_TARGET_TYPE(bld, name, 'GENERATOR'):
446         return
447
448     if not enabled:
449         return
450
451     bld.SET_BUILD_GROUP(group)
452     t = bld(
453         rule=rule,
454         source=bld.EXPAND_VARIABLES(source, vars=vars),
455         target=target,
456         shell=isinstance(rule, str),
457         on_results=True,
458         before='cc',
459         ext_out='.c',
460         name=name)
461
462     if public_headers is not None:
463         bld.PUBLIC_HEADERS(public_headers, header_path=header_path)
464     return t
465 Build.BuildContext.SAMBA_GENERATOR = SAMBA_GENERATOR
466
467
468
469 @runonce
470 def SETUP_BUILD_GROUPS(bld):
471     '''setup build groups used to ensure that the different build
472     phases happen consecutively'''
473     bld.p_ln = bld.srcnode # we do want to see all targets!
474     bld.env['USING_BUILD_GROUPS'] = True
475     bld.add_group('setup')
476     bld.add_group('build_compiler_source')
477     bld.add_group('base_libraries')
478     bld.add_group('generators')
479     bld.add_group('compiler_prototypes')
480     bld.add_group('compiler_libraries')
481     bld.add_group('build_compilers')
482     bld.add_group('build_source')
483     bld.add_group('prototypes')
484     bld.add_group('main')
485     bld.add_group('binaries')
486     bld.add_group('final')
487 Build.BuildContext.SETUP_BUILD_GROUPS = SETUP_BUILD_GROUPS
488
489
490 def SET_BUILD_GROUP(bld, group):
491     '''set the current build group'''
492     if not 'USING_BUILD_GROUPS' in bld.env:
493         return
494     bld.set_group(group)
495 Build.BuildContext.SET_BUILD_GROUP = SET_BUILD_GROUP
496
497
498
499 @conf
500 def ENABLE_TIMESTAMP_DEPENDENCIES(conf):
501     """use timestamps instead of file contents for deps
502     this currently doesn't work"""
503     def h_file(filename):
504         import stat
505         st = os.stat(filename)
506         if stat.S_ISDIR(st[stat.ST_MODE]): raise IOError('not a file')
507         m = Utils.md5()
508         m.update(str(st.st_mtime))
509         m.update(str(st.st_size))
510         m.update(filename)
511         return m.digest()
512     Utils.h_file = h_file
513
514
515
516 t = Task.simple_task_type('copy_script', 'rm -f ${LINK_TARGET} && ln -s ${SRC[0].abspath(env)} ${LINK_TARGET}',
517                           shell=True, color='PINK', ext_in='.bin')
518 t.quiet = True
519
520 @feature('copy_script')
521 @before('apply_link')
522 def copy_script(self):
523     tsk = self.create_task('copy_script', self.allnodes[0])
524     tsk.env.TARGET = self.target
525
526 def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None):
527     '''used to copy scripts from the source tree into the build directory
528        for use by selftest'''
529
530     source = bld.path.ant_glob(pattern)
531
532     bld.SET_BUILD_GROUP('build_source')
533     for s in TO_LIST(source):
534         iname = s
535         if installname != None:
536             iname = installname
537         target = os.path.join(installdir, iname)
538         tgtdir = os.path.dirname(os.path.join(bld.srcnode.abspath(bld.env), '..', target))
539         mkdir_p(tgtdir)
540         t = bld(features='copy_script',
541                 source       = s,
542                 target       = target,
543                 always       = True,
544                 install_path = None)
545         t.env.LINK_TARGET = target
546
547 Build.BuildContext.SAMBA_SCRIPT = SAMBA_SCRIPT
548
549
550 def install_file(bld, destdir, file, chmod=O644, flat=False,
551                  python_fixup=False, destname=None, base_name=None):
552     '''install a file'''
553     destdir = bld.EXPAND_VARIABLES(destdir)
554     if not destname:
555         destname = file
556         if flat:
557             destname = os.path.basename(destname)
558     dest = os.path.join(destdir, destname)
559     if python_fixup:
560         # fixup the python path it will use to find Samba modules
561         inst_file = file + '.inst'
562         bld.SAMBA_GENERATOR('python_%s' % destname,
563                             rule="sed 's|\(sys.path.insert.*\)bin/python\(.*\)$|\\1${PYTHONDIR}\\2|g' < ${SRC} > ${TGT}",
564                             source=file,
565                             target=inst_file)
566         file = inst_file
567     if base_name:
568         file = os.path.join(base_name, file)
569     bld.install_as(dest, file, chmod=chmod)
570
571
572 def INSTALL_FILES(bld, destdir, files, chmod=O644, flat=False,
573                   python_fixup=False, destname=None, base_name=None):
574     '''install a set of files'''
575     for f in TO_LIST(files):
576         install_file(bld, destdir, f, chmod=chmod, flat=flat,
577                      python_fixup=python_fixup, destname=destname,
578                      base_name=base_name)
579 Build.BuildContext.INSTALL_FILES = INSTALL_FILES
580
581
582 def INSTALL_WILDCARD(bld, destdir, pattern, chmod=O644, flat=False,
583                      python_fixup=False, exclude=None, trim_path=None):
584     '''install a set of files matching a wildcard pattern'''
585     files=TO_LIST(bld.path.ant_glob(pattern))
586     if trim_path:
587         files2 = []
588         for f in files:
589             files2.append(os_path_relpath(f, trim_path))
590         files = files2
591
592     if exclude:
593         for f in files[:]:
594             if fnmatch.fnmatch(f, exclude):
595                 files.remove(f)
596     INSTALL_FILES(bld, destdir, files, chmod=chmod, flat=flat,
597                   python_fixup=python_fixup, base_name=trim_path)
598 Build.BuildContext.INSTALL_WILDCARD = INSTALL_WILDCARD
599
600
601 def PUBLIC_HEADERS(bld, public_headers, header_path=None):
602     '''install some headers
603
604     header_path may either be a string that is added to the INCLUDEDIR,
605     or it can be a dictionary of wildcard patterns which map to destination
606     directories relative to INCLUDEDIR
607     '''
608     dest = '${INCLUDEDIR}'
609     if isinstance(header_path, str):
610         dest += '/' + header_path
611     for h in TO_LIST(public_headers):
612         hdest = dest
613         if isinstance(header_path, list):
614             for (p1, dir) in header_path:
615                 found_match=False
616                 lst = TO_LIST(p1)
617                 for p2 in lst:
618                     if fnmatch.fnmatch(h, p2):
619                         if dir:
620                             hdest = os.path.join(hdest, dir)
621                         found_match=True
622                         break
623                 if found_match: break
624         if h.find(':') != -1:
625             hs=h.split(':')
626             INSTALL_FILES(bld, hdest, hs[0], flat=True, destname=hs[1])
627         else:
628             INSTALL_FILES(bld, hdest, h, flat=True)
629 Build.BuildContext.PUBLIC_HEADERS = PUBLIC_HEADERS
630
631
632 def subst_at_vars(task):
633     '''substiture @VAR@ style variables in a file'''
634     src = task.inputs[0].srcpath(task.env)
635     tgt = task.outputs[0].bldpath(task.env)
636
637     f = open(src, 'r')
638     s = f.read()
639     f.close()
640     # split on the vars
641     a = re.split('(@\w+@)', s)
642     out = []
643     back_sub = [ ('PREFIX', '${prefix}'), ('EXEC_PREFIX', '${exec_prefix}')]
644     for v in a:
645         if re.match('@\w+@', v):
646             vname = v[1:-1]
647             if not vname in task.env and vname.upper() in task.env:
648                 vname = vname.upper()
649             if not vname in task.env:
650                 Logs.error("Unknown substitution %s in %s" % (v, task.name))
651                 sys.exit(1)
652             v = SUBST_VARS_RECURSIVE(task.env[vname], task.env)
653             # now we back substitute the allowed pc vars
654             for (b, m) in back_sub:
655                 s = task.env[b]
656                 if s == v[0:len(s)]:
657                     v = m + v[len(s):]
658         out.append(v)
659     contents = ''.join(out)
660     f = open(tgt, 'w')
661     s = f.write(contents)
662     f.close()
663     return 0
664
665
666
667 def PKG_CONFIG_FILES(bld, pc_files, vnum=None):
668     '''install some pkg_config pc files'''
669     dest = '${PKGCONFIGDIR}'
670     dest = bld.EXPAND_VARIABLES(dest)
671     for f in TO_LIST(pc_files):
672         base=os.path.basename(f)
673         t = bld.SAMBA_GENERATOR('PKGCONFIG_%s' % base,
674                                 rule=subst_at_vars,
675                                 source=f+'.in',
676                                 target=f)
677         if vnum:
678             t.env.PACKAGE_VERSION = vnum
679         INSTALL_FILES(bld, dest, f, flat=True, destname=base)
680 Build.BuildContext.PKG_CONFIG_FILES = PKG_CONFIG_FILES
681
682
683
684 #############################################################
685 # give a nicer display when building different types of files
686 def progress_display(self, msg, fname):
687     col1 = Logs.colors(self.color)
688     col2 = Logs.colors.NORMAL
689     total = self.position[1]
690     n = len(str(total))
691     fs = '[%%%dd/%%%dd] %s %%s%%s%%s\n' % (n, n, msg)
692     return fs % (self.position[0], self.position[1], col1, fname, col2)
693
694 def link_display(self):
695     if Options.options.progress_bar != 0:
696         return Task.Task.old_display(self)
697     fname = self.outputs[0].bldpath(self.env)
698     return progress_display(self, 'Linking', fname)
699 Task.TaskBase.classes['cc_link'].display = link_display
700
701 def samba_display(self):
702     if Options.options.progress_bar != 0:
703         return Task.Task.old_display(self)
704
705     targets    = LOCAL_CACHE(self, 'TARGET_TYPE')
706     if self.name in targets:
707         target_type = targets[self.name]
708         type_map = { 'GENERATOR' : 'Generating',
709                      'PROTOTYPE' : 'Generating'
710                      }
711         if target_type in type_map:
712             return progress_display(self, type_map[target_type], self.name)
713
714     fname = self.inputs[0].bldpath(self.env)
715     if fname[0:3] == '../':
716         fname = fname[3:]
717     ext_loc = fname.rfind('.')
718     if ext_loc == -1:
719         return Task.Task.old_display(self)
720     ext = fname[ext_loc:]
721
722     ext_map = { '.idl' : 'Compiling IDL',
723                 '.et'  : 'Compiling ERRTABLE',
724                 '.asn1': 'Compiling ASN1',
725                 '.c'   : 'Compiling' }
726     if ext in ext_map:
727         return progress_display(self, ext_map[ext], fname)
728     return Task.Task.old_display(self)
729
730 Task.TaskBase.classes['Task'].old_display = Task.TaskBase.classes['Task'].display
731 Task.TaskBase.classes['Task'].display = samba_display