mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
build: nicer display of command type for prototypes and generators
This commit is contained in:
parent
865e478e25
commit
31a88f266c
@ -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,
|
||||
|
@ -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:]
|
||||
|
Loading…
x
Reference in New Issue
Block a user