1 karl 1.1 #//%LICENSE////////////////////////////////////////////////////////////////
2 #//
3 #// Licensed to The Open Group (TOG) under one or more contributor license
4 #// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 #// this work for additional information regarding copyright ownership.
6 #// Each contributor licenses this file to you under the OpenPegasus Open
7 #// Source License; you may not use this file except in compliance with the
8 #// License.
9 #//
10 #// Permission is hereby granted, free of charge, to any person obtaining a
11 #// copy of this software and associated documentation files (the "Software"),
12 #// to deal in the Software without restriction, including without limitation
13 #// the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 #// and/or sell copies of the Software, and to permit persons to whom the
15 #// Software is furnished to do so, subject to the following conditions:
16 #//
17 #// The above copyright notice and this permission notice shall be included
18 #// in all copies or substantial portions of the Software.
19 #//
20 #// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 #// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 karl 1.1 #// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 #// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 #// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 #// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 #// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #//
28 #//////////////////////////////////////////////////////////////////////////
29 ROOT = ../../..
30
31 DIR = Pegasus/FQL
32
33 include $(ROOT)/mak/config.mak
34
35 LOCAL_DEFINES = -DPEGASUS_FQL_INTERNAL -DPEGASUS_INTERNALONLY
36
37 ## Bison/yacc and FQL disgnostic displays
38 ## Enable by uncommenting the following
39 ##LOCAL_DEFINES += -DFQL_YYDEBUG
40 ##LOCAL_DEFINES += -DFQL_DOTRACE
41
42 ifneq ($(OS), HPUX)
43 karl 1.1 ifneq ($(OS), zos)
44 EXTRA_INCLUDES = -Int_includes
45 endif
46 endif
47
48 STATIC=1
49 LIBRARY = pegfql
50
51 #### TODO NOTE THAT THIS USES QUERY COMMON.
52 #### Need to figure out whether to use common or isolated one
53 LIBRARIES = \
54 pegcommon \
55 pegquerycommon
56
57 SOURCES = \
58 FQLQueryStatement.cpp \
59 FQLQueryStatementRep.cpp \
60 FQLYACC.cpp \
61 FQLLEX.cpp \
62 FQLPropertySource.cpp \
63 FQLInstancePropertySource.cpp \
64 karl 1.1 FQLParserState.cpp \
65 FQLOperation.cpp \
66 FQLOperand.cpp \
67 FQLParser.cpp \
68 FQLRegularExpression.cpp \
69 FQLQueryExpressionRep.cpp
70
71 SOURCES_X = \
72 FQLLEX.cpp \
73
74 include $(ROOT)/mak/library.mak
75
76 ##------------------------------------------------------------------------------
77 ##
78 ## Rules to build LEX AND YACC sources:
79 ##
80 ## To make these files type: "make grammar"
81 ##
82 ## NOTE: Normally developers should never need to compile the FQL grammar.
83 ## The generate source files are committed to CVS as part of any changes
84 ## to the lex or yacc defintions so only developers of the grammar itsel
85 karl 1.1 ## need execute the make grammar below.
86 ##
87 ##------------------------------------------------------------------------------
88
89
90 ##
91 ## This pushes BISON_SIMPLE into the environment so that bison will use this
92 ## rather than looking for /usr/local/share/bison.simple.
93 ##
94
95 grammar: yacc_rule lex_rule
96
97 export BISON_SIMPLE = bison.simple
98
99 ##LEX_DEBUG = -T
100 ##YACC_DEBUG = -t
101
102 ##
103 ## Lex rule:
104 ##
105 lex_rule:
106 karl 1.1 $(LEX) -oFQLLEX.cpp $(LEX_DEBUG) -PFQL_ FQL.l
107 $(TOUCH) FQLLEX.cpp
108 mu prepend ../nochksrc.txt FQLLEX.cpp
109
110 ##
111 ## Yacc rule:
112 ##
113 yacc_rule:
114 ifeq ($(YACC),yacc)
115 $(YACC) -vd -p FQL_ FQL.y
116 $(COPY) "y.tab.c" "FQLYACC.cpp"
117 $(COPY) "y.tab.h" "FQLYACC.h"
118 $(RM) y.tab.c y.tab.h
119 $(TOUCH) FQLYACC.cpp FQLYACC.h
120 else
121 $(YACC) -d -v -oFQLYACC $(YACC_DEBUG) --report=all -p FQL_ FQL.y
122 $(COPY) "FQLYACC" "FQLYACC.cpp"
123 $(RM) FQLYACC
124 endif
125 mu prepend ../nochksrc.txt FQLYACC.h
126 mu prepend ../nochksrc.txt FQLYACC.cpp
127 karl 1.1
128 ## bison --graph option. Prepare vcg graph output. No real display for vcg
129 ## --report=all. Note that we always did -vd
130 ## -v same as --report=state
131 ## -t should define YYDEBUG if it is not already defined
132 ## -v verbose extra output file.
|