blob: 31cfbc1c3a373ad79ea52f87e7ec1b796130928e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
include $(top_srcdir)/kexi/Makefile.global
lib_LTLIBRARIES = libkexidbparser.la
libkexidbparser_la_SOURCES = sqlscanner.cpp sqlparser.cpp parser.cpp parser_p.cpp
libkexidbparser_la_LIBADD = $(LIB_KPARTS) $(LIB_KDEUI) ../libkexidb.la
libkexidbparser_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(VER_INFO)
noinst_HEADERS = parser_p.h
INCLUDES = -I$(top_srcdir)/kexi -I$(top_srcdir)/kexi/kexidb $(all_includes)
METASOURCES = AUTO
parser:
cd $(srcdir); \
lex -osqlscanner.cpp sqlscanner.l; \
bison -dv sqlparser.y; \
echo '#ifndef _SQLPARSER_H_' > sqlparser.h; \
echo '#define _SQLPARSER_H_' >> sqlparser.h; \
echo '#include "field.h"' >> sqlparser.h; \
echo '#include "parser.h"' >> sqlparser.h; \
echo '#include "sqltypes.h"' >> sqlparser.h; \
echo '' >> sqlparser.h; \
echo 'bool parseData(KexiDB::Parser *p, const char *data);' >> sqlparser.h; \
cat sqlparser.tab.h >> sqlparser.h; \
echo '#endif' >> sqlparser.h; \
cat sqlparser.tab.c > sqlparser.cpp; \
echo "const char * const tname(int offset) { return yytname[offset]; }" >> sqlparser.cpp; \
./extract_tokens.sh > tokens.cpp; \
rm -f sqlparser.tab.h sqlparser.tab.c
coffie:
echo 'making coffie...'
sleep 5
KDE_OPTIONS=nofinal
KDE_CXXFLAGS += -DYYERROR_VERBOSE=1
.PHONY: parser coffie
|