VirtualBox

Changeset 1623 in kBuild


Ignore:
Timestamp:
May 12, 2008 9:32:21 PM (17 years ago)
Author:
bird
Message:

some fixes.

File:
1 edited

Legend:

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

    r1621 r1623  
    8686$(error kBuild: $(target) / $(sources) does not a (lex) tool defined!)
    8787endif
     88ifndef TOOL_$(tool)_LEX_CMDS
     89$(error kBuild: TOOL_$(tool)_LEX_CMDS isn't defined! target=$(target) source=$(source) )
     90endif
    8891local out := $(kb-obj-base outbase).c
    8992local tmp := $(kb-src-prop LEXFLAGS,flags,left-to-right,)
    9093local tmp := $(kb-src-prop DEPS,deps,left-to-right,$(defpath))
    9194local tmp := $(kb-src-prop ORDERDEPS,orderdeps,left-to-right,$(defpath))
     95ifdef TOOL_$(tool)_LEX_OUT_FILE # .c/.cpp output depends on flags.
     96 local out := $(strip $(TOOL_$(tool)_LEX_OUT_FILE))
     97 ifeq ($(out),)
     98  local out := $(outbase).c
     99 endif
     100endif
    92101local dirdep := $(call DIRDEP,$(dir $(out)))
    93 
    94 # workaround for bug in kb-src-prop - remove when it has been fixed.
    95 flags := $(patsubst /%,%,$(flags))
    96102
    97103# Adjust paths if we got a default path.
    98104ifneq ($(defpath),)
    99  deps      := $(abspathex $(deps),$(defpath))
    100  orderdeps := $(abspathex $(orderdeps),$(defpath))
    101  source    := $(abspathex $(source),$(defpath))
     105 local source := $(abspathex $(source),$(defpath))
    102106endif
    103107
     
    109113endif
    110114
    111 # check that the tool is defined.
    112 ifndef TOOL_$(tool)_LEX_CMDS
    113 $(error kBuild: TOOL_$(tool)_LEX_CMDS isn't defined! target=$(target) source=$(source) )
    114 endif
    115 
    116115# call the tool
    117116local cmds := $(TOOL_$(tool)_LEX_CMDS)
    118117local output_extra := $(TOOL_$(tool)_LEX_OUTPUT)
    119118local output_maybe := $(TOOL_$(tool)_LEX_OUTPUT_MAYBE)
    120 deps += $(TOOL_$(tool)_DEPEND) $(source)
    121 orderdeps += $(TOOL_$(tool)_DEPORD)
     119local deps += $(TOOL_$(tool)_LEX_DEPEND) $(source)
     120local orderdeps += $(TOOL_$(tool)_LEX_DEPORD)
    122121
    123122# generate the rule.
    124123$(eval $(def_lex_rule))
    125 
    126 # cleanup (non-localized stuff)
    127 tool :=
    128 outbase :=
    129 flags :=
    130 deps :=
    131 orderdeps :=
    132124
    133125endef # def_src_handler_lex_ctx
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette