source: webkit/trunk/JavaScriptCore/JavaScriptCore.pri@ 43287

Last change on this file since 43287 was 43287, checked in by [email protected], 16 years ago

[Qt] Use $$GENERATED_SOURCES_DIR as output when running bison

A couple of the generators left the bison output file in the source
tree, and then moved it into $$GENERATED_SOURCES_DIR, which did not
work well when building release and debug configurations in parallel.

File size: 7.4 KB
Line 
1# JavaScriptCore - Qt4 build info
2VPATH += $$PWD
3
4INCLUDEPATH += tmp
5INCLUDEPATH += $$PWD $$PWD/parser $$PWD/bytecompiler $$PWD/debugger $$PWD/runtime $$PWD/wtf $$PWD/wtf/unicode $$PWD/interpreter $$PWD/jit $$PWD/profiler $$PWD/wrec $$PWD/API $$PWD/.. \
6 $$PWD/ForwardingHeaders $$PWD/bytecode $$PWD/assembler
7DEFINES += BUILDING_QT__
8
9isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
10GENERATED_SOURCES_DIR_SLASH = $$GENERATED_SOURCES_DIR/
11win32-* {
12 GENERATED_SOURCES_DIR_SLASH ~= s|/|\|
13 LIBS += -lwinmm
14}
15
16# Default rules to turn JIT on/off
17!contains(DEFINES, ENABLE_JIT=.) {
18 CONFIG(release):isEqual(QT_ARCH,i386) {
19 # Require gcc >= 4.1
20 linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
21 DEFINES += ENABLE_JIT=1
22 }
23 win32-msvc* {
24 DEFINES += ENABLE_JIT=1
25 }
26 }
27}
28
29# Rules when JIT enabled
30contains(DEFINES, ENABLE_JIT=1) {
31 !contains(DEFINES, WREC=.): DEFINES += ENABLE_WREC=1
32 !contains(DEFINES, ENABLE_JIT_OPTIMIZE_CALL=.): DEFINES += ENABLE_JIT_OPTIMIZE_CALL=1
33 !contains(DEFINES, ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=.): DEFINES += ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=1
34 !contains(DEFINES, ENABLE_JIT_OPTIMIZE_ARITHMETIC=.): DEFINES += ENABLE_JIT_OPTIMIZE_ARITHMETIC=1
35 linux-g++* {
36 !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=1
37 QMAKE_CXXFLAGS += -fno-stack-protector
38 QMAKE_CFLAGS += -fno-stack-protector
39 }
40 win32-msvc* {
41 !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_REGISTER=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_REGISTER=1
42 }
43}
44
45include(pcre/pcre.pri)
46
47LUT_FILES += \
48 runtime/DatePrototype.cpp \
49 runtime/NumberConstructor.cpp \
50 runtime/StringPrototype.cpp \
51 runtime/ArrayPrototype.cpp \
52 runtime/MathObject.cpp \
53 runtime/RegExpConstructor.cpp \
54 runtime/RegExpObject.cpp
55
56KEYWORDLUT_FILES += \
57 parser/Keywords.table
58
59JSCBISON += \
60 parser/Grammar.y
61
62SOURCES += \
63 wtf/Assertions.cpp \
64 wtf/ByteArray.cpp \
65 wtf/HashTable.cpp \
66 wtf/MainThread.cpp \
67 wtf/RandomNumber.cpp \
68 wtf/RefCountedLeakCounter.cpp \
69 wtf/TypeTraits.cpp \
70 wtf/unicode/CollatorDefault.cpp \
71 wtf/unicode/icu/CollatorICU.cpp \
72 wtf/unicode/UTF8.cpp \
73 API/JSBase.cpp \
74 API/JSCallbackConstructor.cpp \
75 API/JSCallbackFunction.cpp \
76 API/JSCallbackObject.cpp \
77 API/JSClassRef.cpp \
78 API/JSContextRef.cpp \
79 API/JSObjectRef.cpp \
80 API/JSStringRef.cpp \
81 API/JSValueRef.cpp \
82 API/OpaqueJSString.cpp \
83 runtime/InitializeThreading.cpp \
84 runtime/JSGlobalData.cpp \
85 runtime/JSGlobalObject.cpp \
86 runtime/JSStaticScopeObject.cpp \
87 runtime/JSVariableObject.cpp \
88 runtime/JSActivation.cpp \
89 runtime/JSNotAnObject.cpp \
90 runtime/TimeoutChecker.cpp \
91 bytecode/CodeBlock.cpp \
92 bytecode/StructureStubInfo.cpp \
93 bytecode/JumpTable.cpp \
94 jit/JIT.cpp \
95 jit/JITCall.cpp \
96 jit/JITArithmetic.cpp \
97 jit/JITPropertyAccess.cpp \
98 jit/ExecutableAllocator.cpp \
99 jit/JITStubs.cpp \
100 bytecompiler/BytecodeGenerator.cpp \
101 runtime/ExceptionHelpers.cpp \
102 runtime/JSPropertyNameIterator.cpp \
103 interpreter/Interpreter.cpp \
104 bytecode/Opcode.cpp \
105 bytecode/SamplingTool.cpp \
106 wrec/CharacterClass.cpp \
107 wrec/CharacterClassConstructor.cpp \
108 wrec/WREC.cpp \
109 wrec/WRECFunctors.cpp \
110 wrec/WRECGenerator.cpp \
111 wrec/WRECParser.cpp \
112 interpreter/RegisterFile.cpp
113
114win32-*: SOURCES += jit/ExecutableAllocatorWin.cpp
115else: SOURCES += jit/ExecutableAllocatorPosix.cpp
116
117# AllInOneFile.cpp helps gcc analize and optimize code
118# Other compilers may be able to do this at link time
119SOURCES += \
120 runtime/ArgList.cpp \
121 runtime/Arguments.cpp \
122 runtime/ArrayConstructor.cpp \
123 runtime/ArrayPrototype.cpp \
124 runtime/BooleanConstructor.cpp \
125 runtime/BooleanObject.cpp \
126 runtime/BooleanPrototype.cpp \
127 runtime/CallData.cpp \
128 runtime/Collector.cpp \
129 runtime/CommonIdentifiers.cpp \
130 runtime/ConstructData.cpp \
131 wtf/CurrentTime.cpp \
132 runtime/DateConstructor.cpp \
133 runtime/DateInstance.cpp \
134 runtime/DateMath.cpp \
135 runtime/DatePrototype.cpp \
136 debugger/Debugger.cpp \
137 debugger/DebuggerCallFrame.cpp \
138 debugger/DebuggerActivation.cpp \
139 wtf/dtoa.cpp \
140 runtime/Error.cpp \
141 runtime/ErrorConstructor.cpp \
142 runtime/ErrorInstance.cpp \
143 runtime/ErrorPrototype.cpp \
144 interpreter/CallFrame.cpp \
145 runtime/FunctionConstructor.cpp \
146 runtime/FunctionPrototype.cpp \
147 runtime/GetterSetter.cpp \
148 runtime/GlobalEvalFunction.cpp \
149 runtime/Identifier.cpp \
150 runtime/InternalFunction.cpp \
151 runtime/Completion.cpp \
152 runtime/JSArray.cpp \
153 runtime/JSByteArray.cpp \
154 runtime/JSCell.cpp \
155 runtime/JSFunction.cpp \
156 runtime/JSGlobalObjectFunctions.cpp \
157 runtime/JSImmediate.cpp \
158 runtime/JSLock.cpp \
159 runtime/JSNumberCell.cpp \
160 runtime/JSObject.cpp \
161 runtime/JSString.cpp \
162 runtime/JSValue.cpp \
163 runtime/JSWrapperObject.cpp \
164 parser/Lexer.cpp \
165 runtime/Lookup.cpp \
166 runtime/MathObject.cpp \
167 runtime/NativeErrorConstructor.cpp \
168 runtime/NativeErrorPrototype.cpp \
169 parser/Nodes.cpp \
170 runtime/NumberConstructor.cpp \
171 runtime/NumberObject.cpp \
172 runtime/NumberPrototype.cpp \
173 runtime/ObjectConstructor.cpp \
174 runtime/ObjectPrototype.cpp \
175 runtime/Operations.cpp \
176 parser/Parser.cpp \
177 runtime/PropertyNameArray.cpp \
178 runtime/PropertySlot.cpp \
179 runtime/PrototypeFunction.cpp \
180 runtime/RegExp.cpp \
181 runtime/RegExpConstructor.cpp \
182 runtime/RegExpObject.cpp \
183 runtime/RegExpPrototype.cpp \
184 runtime/ScopeChain.cpp \
185 runtime/SmallStrings.cpp \
186 runtime/StringConstructor.cpp \
187 runtime/StringObject.cpp \
188 runtime/StringPrototype.cpp \
189 runtime/Structure.cpp \
190 runtime/StructureChain.cpp \
191 runtime/UString.cpp \
192 profiler/HeavyProfile.cpp \
193 profiler/Profile.cpp \
194 profiler/ProfileGenerator.cpp \
195 profiler/ProfileNode.cpp \
196 profiler/Profiler.cpp \
197 profiler/TreeProfile.cpp \
198 wtf/FastMalloc.cpp \
199 wtf/Threading.cpp \
200 wtf/qt/ThreadingQt.cpp \
201 wtf/qt/MainThreadQt.cpp
202
203# GENERATOR 1-A: LUT creator
204lut.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.lut.h
205lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
206lut.depend = ${QMAKE_FILE_NAME}
207lut.input = LUT_FILES
208lut.CONFIG += no_link
209addExtraCompiler(lut)
210
211# GENERATOR 1-B: particular LUT creator (for 1 file only)
212keywordlut.output = $$GENERATED_SOURCES_DIR/Lexer.lut.h
213keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
214keywordlut.depend = ${QMAKE_FILE_NAME}
215keywordlut.input = KEYWORDLUT_FILES
216keywordlut.CONFIG += no_link
217addExtraCompiler(keywordlut)
218
219# GENERATOR 2: bison grammar
220jscbison.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.cpp
221jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.tab.c && $(MOVE) $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.tab.h $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.h
222jscbison.depend = ${QMAKE_FILE_NAME}
223jscbison.input = JSCBISON
224jscbison.variable_out = GENERATED_SOURCES
225jscbison.dependency_type = TYPE_C
226jscbison.CONFIG = target_predeps
227addExtraCompilerWithHeader(jscbison)
228
Note: See TracBrowser for help on using the repository browser.