Changeset 1623 in kBuild
- Timestamp:
- May 12, 2008 9:32:21 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/units/lex.kmk
r1621 r1623 86 86 $(error kBuild: $(target) / $(sources) does not a (lex) tool defined!) 87 87 endif 88 ifndef TOOL_$(tool)_LEX_CMDS 89 $(error kBuild: TOOL_$(tool)_LEX_CMDS isn't defined! target=$(target) source=$(source) ) 90 endif 88 91 local out := $(kb-obj-base outbase).c 89 92 local tmp := $(kb-src-prop LEXFLAGS,flags,left-to-right,) 90 93 local tmp := $(kb-src-prop DEPS,deps,left-to-right,$(defpath)) 91 94 local tmp := $(kb-src-prop ORDERDEPS,orderdeps,left-to-right,$(defpath)) 95 ifdef 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 100 endif 92 101 local dirdep := $(call DIRDEP,$(dir $(out))) 93 94 # workaround for bug in kb-src-prop - remove when it has been fixed.95 flags := $(patsubst /%,%,$(flags))96 102 97 103 # Adjust paths if we got a default path. 98 104 ifneq ($(defpath),) 99 deps := $(abspathex $(deps),$(defpath)) 100 orderdeps := $(abspathex $(orderdeps),$(defpath)) 101 source := $(abspathex $(source),$(defpath)) 105 local source := $(abspathex $(source),$(defpath)) 102 106 endif 103 107 … … 109 113 endif 110 114 111 # check that the tool is defined.112 ifndef TOOL_$(tool)_LEX_CMDS113 $(error kBuild: TOOL_$(tool)_LEX_CMDS isn't defined! target=$(target) source=$(source) )114 endif115 116 115 # call the tool 117 116 local cmds := $(TOOL_$(tool)_LEX_CMDS) 118 117 local output_extra := $(TOOL_$(tool)_LEX_OUTPUT) 119 118 local output_maybe := $(TOOL_$(tool)_LEX_OUTPUT_MAYBE) 120 deps += $(TOOL_$(tool)_DEPEND) $(source)121 orderdeps += $(TOOL_$(tool)_DEPORD)119 local deps += $(TOOL_$(tool)_LEX_DEPEND) $(source) 120 local orderdeps += $(TOOL_$(tool)_LEX_DEPORD) 122 121 123 122 # generate the rule. 124 123 $(eval $(def_lex_rule)) 125 126 # cleanup (non-localized stuff)127 tool :=128 outbase :=129 flags :=130 deps :=131 orderdeps :=132 124 133 125 endef # def_src_handler_lex_ctx
Note:
See TracChangeset
for help on using the changeset viewer.