build: nicer display of command type for prototypes and generators
authorAndrew Tridgell <tridge@samba.org>
Fri, 2 Apr 2010 02:06:35 +0000 (13:06 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:22 +0000 (20:27 +1000)
buildtools/wafsamba/samba_autoproto.py
buildtools/wafsamba/wafsamba.py

index ae2eb41a93ed549dba33a07a33c28f4a69d81581..5a6460c89ab61a7c678eecbbfb84d6c674552ccd 100644 (file)
@@ -8,6 +8,7 @@ def HEIMDAL_AUTOPROTO(bld, header, source, options=None, group='prototypes'):
     bld.SET_BUILD_GROUP(group)
     if options is None:
         options='-q -P comment -o'
+    SET_TARGET_TYPE(bld, header, 'PROTOTYPE')
     t = bld(rule='${PERL} ../heimdal/cf/make-proto.pl ${OPTIONS} ${TGT[0].abspath(env)} ${SRC}',
             source=source,
             target=header,
@@ -27,6 +28,7 @@ Build.BuildContext.HEIMDAL_AUTOPROTO_PRIVATE = HEIMDAL_AUTOPROTO_PRIVATE
 def SAMBA_AUTOPROTO(bld, header, source):
     '''rule for samba prototype generation'''
     bld.SET_BUILD_GROUP('prototypes')
+    SET_TARGET_TYPE(bld, header, 'PROTOTYPE')
     bld(
         source = source,
         target = header,
index dc91336c903821c2abe66503251dce13ee3917bc..63d657f3709c3e505a414012b52f0192b11c4a72 100644 (file)
@@ -681,6 +681,16 @@ Task.TaskBase.classes['cc_link'].display = link_display
 def samba_display(self):
     if Options.options.progress_bar != 0:
         return Task.Task.old_display(self)
+
+    targets    = LOCAL_CACHE(self, 'TARGET_TYPE')
+    if self.name in targets:
+        target_type = targets[self.name]
+        type_map = { 'GENERATOR' : 'Generating',
+                     'PROTOTYPE' : 'Generating'
+                     }
+        if target_type in type_map:
+            return progress_display(self, type_map[target_type], self.name)
+
     fname = self.inputs[0].bldpath(self.env)
     if fname[0:3] == '../':
         fname = fname[3:]