1 # DerivedSources - qmake build info
3 CONFIG -= debug_and_release
8 QMAKE_EXTRA_TARGETS += generated_files
10 CONFIG(standalone_package) {
11 isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/generated
13 isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated
17 runtime/ArrayPrototype.cpp \
18 runtime/DatePrototype.cpp \
19 runtime/JSONObject.cpp \
20 runtime/MathObject.cpp \
21 runtime/NumberConstructor.cpp \
22 runtime/RegExpConstructor.cpp \
23 runtime/RegExpObject.cpp \
24 runtime/StringPrototype.cpp
35 defineTest(addExtraCompiler) {
36 eval($${1}.CONFIG = target_predeps no_link)
37 eval($${1}.variable_out =)
38 eval($${1}.dependency_type = TYPE_C)
40 wkScript = $$eval($${1}.wkScript)
41 eval($${1}.depends += $$wkScript)
44 export($${1}.variable_out)
45 export($${1}.dependency_type)
48 QMAKE_EXTRA_COMPILERS += $$1
49 generated_files.depends += compiler_$${1}_make_all
50 export(QMAKE_EXTRA_COMPILERS)
51 export(generated_files.depends)
55 # GENERATOR 1-A: LUT creator
56 lut.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
58 lut.wkScript = $$PWD/create_hash_table
59 lut.commands = perl $$lut.wkScript ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
60 lut.depends = ${QMAKE_FILE_NAME}
63 # GENERATOR 1-B: particular LUT creator (for 1 file only)
64 keywordlut.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
65 keywordlut.input = KEYWORDLUT_FILES
66 keywordlut.wkScript = $$PWD/create_hash_table
67 keywordlut.commands = perl $$keywordlut.wkScript ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
68 keywordlut.depends = ${QMAKE_FILE_NAME}
69 addExtraCompiler(keywordlut)
71 # GENERATOR 2: bison grammar
72 jscbison.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
73 jscbison.input = JSCBISON
74 jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
75 jscbison.depends = ${QMAKE_FILE_NAME}
76 addExtraCompiler(jscbison)
78 # GENERATOR 3: JIT Stub functions for RVCT
79 rvctstubs.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Generated${QMAKE_FILE_BASE}_RVCT.h
80 rvctstubs.wkScript = $$PWD/create_jit_stubs
81 rvctstubs.commands = perl -i $$rvctstubs.wkScript --prefix RVCT ${QMAKE_FILE_NAME} > ${QMAKE_FILE_OUT}
82 rvctstubs.depends = ${QMAKE_FILE_NAME}
83 rvctstubs.input = RVCT_STUB_FILES
84 rvctstubs.CONFIG += no_link
85 addExtraCompiler(rvctstubs)
87 # GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
88 win32-msvc*|wince*: PREPROCESSOR = "--preprocessor=\"$$QMAKE_CC /E\""
89 ctgen.output = $$JSC_GENERATED_SOURCES_DIR/chartables.c
90 ctgen.wkScript = $$PWD/pcre/dftables
91 ctgen.input = ctgen.wkScript
92 ctgen.commands = perl $$ctgen.wkScript ${QMAKE_FILE_OUT} $$PREPROCESSOR
93 ctgen.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_JSC_GENERATED_SOURCES_DIR}${QMAKE_FILE_BASE}
94 addExtraCompiler(ctgen)
96 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
97 retgen.output = $$JSC_GENERATED_SOURCES_DIR/RegExpJitTables.h
98 retgen.wkScript = $$PWD/create_regex_tables
99 retgen.input = retgen.wkScript
100 retgen.commands = python $$retgen.wkScript > ${QMAKE_FILE_OUT}
101 addExtraCompiler(retgen)