package=
lexflags=
lex=lex $(lexflags)

$(src)$(package)Lex.c : $(src)$(package)Lex.l
	@cd $(src); $(lex) $(package)Lex.l; \
	sed 's/yy/$(package)YY/g' lex.yy.c  | \
	sed 's/ = {stdin}//' | \
	sed 's/ = {stdout}//'> lex.yy.c.tmp; \
	${CMTROOT}/mgr/cmt check_files lex.yy.c.tmp $(package)Lex.c; \
	/bin/rm -f lex.yy.c

