Changeset 2224 for trunk/kBuild/units


Ignore:
Timestamp:
Jan 8, 2009, 2:19:16 AM (17 years ago)
Author:
bird
Message:

kBuild: Implemented flex and yacc/bison support. Fixes #18.

Location:
trunk/kBuild/units
Files:
1 added
1 edited

Legend:

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

    r2018 r2224  
    55
    66#
    7 # Copyright (c) 2008 knut st. osmundsen <bird-src-spam@anduin.net>
     7# Copyright (c) 2008-2009 knut st. osmundsen <bird-src-spam@anduin.net>
    88#
    99# This file is part of kBuild.
     
    3232#
    3333
     34ifdef UNIT_lex
     35 $(error kBuild: The lex unit was included twice!)
     36endif
    3437UNIT_lex = lex
     38
     39# Add our target properties.
     40PROPS_TOOLS += LEXTOOL
     41PROPS_SINGLE += LEXTOOL
     42PROPS_ACCUMULATE_R += LEXFLAGS
    3543
    3644# Add ourselves to the default source handlers.
     
    7381_OUT_FILES += $(out) $(output_extra) $(output_maybe)
    7482$(target)_GEN_SOURCES_ += $(out)
     83$(target)_INTERMEDIATES += $(intermediates)
    7584
    7685endef # def_lex_rule
     
    125134local output_maybe := $(TOOL_$(tool)_LEX_OUTPUT_MAYBE)
    126135local deps += $(TOOL_$(tool)_LEX_DEPEND) $(source)
    127 local orderdeps += $(TOOL_$(tool)_LEX_DEPORD)
     136local orderdeps += $(TOOL_$(tool)_LEX_DEPORD) $(dirdep)
     137
     138# Whether it generates a header file depends on the tool / flags.
     139local intermediates := $(filter %.h %.hpp %.h++ %.H,$(output_extra))
    128140
    129141# generate the rule.
Note: See TracChangeset for help on using the changeset viewer.