-clean-local::
- -$(Verb) $(RM) -f $(INCFiles)
-
-endif
-
-###############################################################################
-# LEX AND YACC: Provide rules for generating sources with lex and yacc
-###############################################################################
-
-#---------------------------------------------------------
-# Provide rules for generating a .cpp source file from
-# (f)lex input sources.
-#---------------------------------------------------------
-
-LexFiles := $(filter %.l,$(Sources))
-
-ifneq ($(LexFiles),)
-
-# Cancel built-in rules for lex
-%.c: %.l
-%.cpp: %.l
-
-all:: $(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs)
-
-# Note the extra sed filtering here, used to cut down on the warnings emited
-# by GCC. The last line is a gross hack to work around flex aparently not
-# being able to resize the buffer on a large token input. Currently, for
-# uninitialized string buffers in LLVM we can generate very long tokens, so
-# this is a hack around it.
-# FIXME. (f.e. char Buffer[10000] )
-$(PROJ_SRC_DIR)/%.cpp: $(PROJ_SRC_DIR)/%.l
- $(Echo) Flexing $*.l
- $(Verb) $(FLEX) -t $(PROJ_SRC_DIR)/$*.l | \
- $(SED) 's/void yyunput/inline void yyunput/' | \
- $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
- $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
- > $(PROJ_SRC_DIR)/$*.cpp
-
-# IFF the .l file has changed since it was last checked into SVN, copy the .l
-# file to .l.cvs and the generated .cpp file to .cpp.cvs. We use this mechanism
-# so that people without flex can build LLVM by copying the .cvs files to the
-# source location and building them.
-$(LexFiles:%.l=$(PROJ_SRC_DIR)/%.cpp.cvs): \
-$(PROJ_SRC_DIR)/%.cpp.cvs: $(PROJ_SRC_DIR)/%.cpp
- $(Verb) $(CMP) -s $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs || \
- ($(CP) $< $@; $(CP) $(PROJ_SRC_DIR)/$*.l $(PROJ_SRC_DIR)/$*.l.cvs)
-
-$(LexFiles:%.l=$(ObjDir)/%.o) : \
-$(ObjDir)/%.o : $(PROJ_SRC_DIR)/%.cpp