This repository has been archived on 2024-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
2013-10-11 23:07:35 +00:00
|
|
|
include $(top_srcdir)/Makefile.decl
|
|
|
|
|
2013-10-14 12:08:06 +00:00
|
|
|
PARSER = $(top_srcdir)/sql/sql-parser.c
|
2013-10-11 23:07:35 +00:00
|
|
|
|
|
|
|
DIR = $(top_srcdir)/sql/parser
|
|
|
|
TMPL = $(DIR)/lempar-tmpl.c
|
|
|
|
SCAN = scan.rl
|
|
|
|
GRAM = gram.y
|
|
|
|
|
|
|
|
all: $(PARSER)
|
|
|
|
$(PARSER): $(SCAN) gram.c gram.h
|
|
|
|
$(ragel_v)$(RAGEL) -C -G2 -o $(PARSER) $<
|
|
|
|
|
|
|
|
gram.h: gram.c
|
|
|
|
gram.c: $(GRAM) lemon $(TMPL)
|
|
|
|
ln -fs $(TMPL) $(top_builddir)/sql/parser/lempar.c
|
|
|
|
$(lemon_v)./lemon -q $<
|
|
|
|
|
|
|
|
lemon: $(DIR)/lemon.c
|
|
|
|
$(CC) -o lemon $<
|
|
|
|
|
|
|
|
EXTRA_DIST = gram.y scan.rl lemon.c lempar-tmpl.c
|
|
|
|
|
|
|
|
CLEANFILES = $(DIR)/gram.c $(DIR)/gram.h $(PARSER)
|
|
|
|
|
|
|
|
DISTCLEANFILES = lemon lempar.c
|
|
|
|
|
|
|
|
ragel_v = $(ragel_v_@AM_V@)
|
|
|
|
ragel_v_ = $(ragel_v_@AM_DEFAULT_V@)
|
|
|
|
ragel_v_0 = @echo " RAGEL $@";
|
|
|
|
|
|
|
|
lemon_v = $(lemon_v_@AM_V@)
|
|
|
|
lemon_v_ = $(lemon_v_@AM_DEFAULT_V@)
|
|
|
|
lemon_v_0 = @echo " LEMON $(subst y,c,$(GRAM)) $(subst y,h,$(GRAM))";
|