1 chuck 1.2 ROOT = ../../..
2
3 DIR = Pegasus/CQL
4
5 include $(ROOT)/mak/config.mak
6
7 LOCAL_DEFINES = -DPEGASUS_CQL_INTERNAL -DPEGASUS_INTERNALONLY -DCQLINPUT
8
9 # Next line can be used to debug CQL.y
10 #LOCAL_DEFINES = -DPEGASUS_CQL_INTERNAL -DPEGASUS_INTERNALONLY -DCQL_DEBUG_GRAMMAR -DCQLINPUT
11
12 ifneq ($(OS), HPUX)
13 EXTRA_INCLUDES = -Int_includes
14 endif
15
16 LIBRARY = pegcql
17
18 LIBRARIES = \
19 pegquerycommon \
20 pegcommon
21
22 chuck 1.2 SOURCES = \
23 CQLYACC.cpp \
24 CQLLEX.cpp \
25 CQLChainedIdentifier.cpp \
26 CQLChainedIdentifierRep.cpp \
27 CQLIdentifier.cpp \
28 CQLIdentifierRep.cpp \
29 CQLParser.cpp \
30 CQLParserState.cpp \
31 CQLSimplePredicate.cpp \
32 CQLSimplePredicateRep.cpp \
33 CQLPredicate.cpp \
34 CQLPredicateRep.cpp \
35 CQLTerm.cpp \
36 CQLTermRep.cpp \
37 CQLFunction.cpp \
38 CQLFunctionRep.cpp \
39 CQLExpression.cpp \
40 CQLExpressionRep.cpp \
41 CQLFactor.cpp \
42 CQLFactorRep.cpp \
43 chuck 1.2 CQLFactory.cpp \
44 CQLSelectStatement.cpp \
45 CQLSelectStatementRep.cpp \
46 CQLValue.cpp \
47 CQLValueRep.cpp \
48 CQLRegularExpression.cpp \
49 CQLUtilities.cpp \
50 Cql2Dnf.cpp
51
52 include $(ROOT)/mak/library.mak
53 include $(ROOT)/mak/install.mak
54
55
56 ##-----------------------------------------------------------------------------
57 ##
58 ## Rules to build LEX AND YACC sources:
59 ##
60 ## To make these files type: "make grammar"
61 ##
62 ##------------------------------------------------------------------------------
63
64 chuck 1.2
65 ##
66 ## This pushes BISON_SIMPLE into the environment so that bison will use this
67 ## rather than looking for /usr/local/share/bison.simple.
68 ##
69
70 grammar: yacc_rule lex_rule
71
72 export BISON_SIMPLE = bison.simple
73 #YACC = bison
74 ##
75 ## Lex rule:
76 ##
77 lex_rule:
78 $(LEX) -PCQL_ CQL.l
79 $(COPY) lex.CQL_.c CQLLEX.cpp
80 $(RM) lex.CQL_.c
81 $(TOUCH) CQLLEX.cpp
82
83 ##
84 ## Yacc rule:
85 chuck 1.2 ##
86 yacc_rule:
87 ifeq ($(YACC),yacc)
88 $(YACC) -vd -p CQL_ CQL.y
89 $(COPY) y.tab.c CQLYACC.cpp
90 $(COPY) y.tab.h CQLYACC.h
91 $(RM) y.tab.c y.tab.h
92 $(TOUCH) CQLYACC.cpp
93 else
94 $(YACC) -vd -oCQLtemp -p CQL_ CQL.y
95 $(COPY) CQLtemp CQLYACC.cpp
96 $(COPY) CQLtemp.h CQLYACC.h
97 $(RM) CQLtemp CQLtemp.h
98 $(TOUCH) CQLYACC.cpp CQLYACC.h
99 endif
100
|