Changeset 2570 for trunk/kBuild


Ignore:
Timestamp:
Mar 23, 2012, 2:47:32 PM (13 years ago)
Author:
bird
Message:

dtrace.kmk: Added DTRACE_DEPEND and DTRACE_DEPORD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/units/dtrace.kmk

    r2569 r2570  
    9090
    9191##
    92 # Generates the rule for creating a DTrace object file from a D source file 
     92# Generates the rule for creating a DTrace object file from a D source file
    9393# and a bunch of object files.
    9494#
     
    126126# Handler for .d files listed in the SOURCES properties.
    127127#
    128 # .d files are transformed into .h that is used when compiling, thus needing 
     128# .d files are transformed into .h that is used when compiling, thus needing
    129129# to be generated before anything is compiled, and into object files that needs
    130 # to go into the linking.  Mac does not create object files. 
    131 #
    132 # The step producing the object file requires all the object files with dtrace 
    133 # probes in them as input/output as well, because it adjusts the dtrace symbols 
    134 # from UNDEF to IGNORE.  This is really ugly and cannot be expressed in make 
    135 # syntax (prerequisite object files being modified).  Fortunately, it works 
     130# to go into the linking.  Mac does not create object files.
     131#
     132# The step producing the object file requires all the object files with dtrace
     133# probes in them as input/output as well, because it adjusts the dtrace symbols
     134# from UNDEF to IGNORE.  This is really ugly and cannot be expressed in make
     135# syntax (prerequisite object files being modified).  Fortunately, it works
    136136# fine because the object files won't be used by anyone else before the dtrace
    137137# object file exists.
     
    180180# call the tool
    181181local cmds := $(TOOL_$(tool)_DTRACE_HDR_CMDS)
    182 local deps += $(source)
    183 local orderdeps += $(dirdep)
     182local deps += $(TOOL_$(tool)_DTRACE_DEPEND) $(source)
     183local orderdeps += $(TOOL_$(tool)_DTRACE_DEPORD) $(dirdep)
    184184
    185185# generate the rule.
     
    201201 local tmp := $(kb-src-prop ORDERDEPS,orderdeps,left-to-right,$(defpath))
    202202 local dirdep := $(call DIRDEP,$(dir $(out)))
    203  
     203
    204204 # Adjust paths if we got a default path.
    205205 ifneq ($(defpath),)
    206206  local source := $(abspathex $(source),$(defpath))
    207207 endif
    208  
     208
    209209 # dependency file.
    210210 local dep := $(out)$(SUFF_DEP)
     
    213213  $(eval includedep $(dep))
    214214 endif
    215  
     215
    216216 # call the tool
    217217 local cmds := $(TOOL_$(tool)_DTRACE_OBJ_CMDS)
    218  local deps += $(source)
    219  local orderdeps += $(dirdep)
    220  
     218 local deps += $(TOOL_$(tool)_DTRACE_DEPEND) $(source)
     219 local orderdeps += $(TOOL_$(tool)_DTRACE_DEPORD) $(dirdep)
     220
    221221 # generate the rule.
    222222 $(eval $(def_dtrace_obj_rule))
Note: See TracChangeset for help on using the changeset viewer.