Changeset 27958 in webkit
- Timestamp:
- Nov 22, 2007 2:10:07 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r27954 r27958 1 2007-11-22 Simon Hausmann <hausmann@kde.org> 2 3 Reviewed by George. 4 5 Centralize the setup for all the extra compilers in a addExtraCompiler function. 6 7 This allows adding a "generated_files" target that builds all generated files using "make generated_files". 8 For the build inside Qt we do not generate actual rules for the extra compilers but instead 9 do the variable substitution of compiler.output manually and add the generated sources to SOURCES. 10 11 * JavaScriptCore.pri: 12 * pcre/pcre.pri: 13 1 14 2007-11-20 Mark Rowe <mrowe@apple.com> 2 15 -
trunk/JavaScriptCore/JavaScriptCore.pri
r27746 r27958 101 101 bindings/qt/qt_runtime.cpp 102 102 103 !CONFIG(QTDIR_build) { 104 defineTest(addExtraCompiler) { 105 QMAKE_EXTRA_COMPILERS += $$1 106 generated_files.depends += compiler_$${1}_make_all 107 export(QMAKE_EXTRA_COMPILERS) 108 export(generated_files.depends) 109 return(true) 110 } 111 } 103 112 104 113 # GENERATOR 1-A: LUT creator … … 108 117 lut.input = LUT_FILES 109 118 lut.CONFIG += no_link 110 QMAKE_EXTRA_COMPILERS += lut 119 addExtraCompiler(lut) 111 120 112 121 # GENERATOR 1-B: particular LUT creator (for 1 file only) … … 116 125 keywordlut.input = KEYWORDLUT_FILES 117 126 keywordlut.CONFIG += no_link 118 QMAKE_EXTRA_COMPILERS += keywordlut 127 addExtraCompiler(keywordlut) 119 128 120 129 # GENERATOR 2: bison grammar … … 127 136 kjsbison.CONFIG = target_predeps 128 137 kjsbison.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}${QMAKE_FILE_BASE}.h 129 QMAKE_EXTRA_COMPILERS += kjsbison 138 addExtraCompiler(kjsbison) -
trunk/JavaScriptCore/pcre/pcre.pri
r27686 r27958 15 15 dftables.cpp 16 16 17 !CONFIG(QTDIR_build) { 18 defineTest(addExtraCompiler) { 19 QMAKE_EXTRA_COMPILERS += $$1 20 generated_files.depends += compiler_$${1}_make_all 21 export(QMAKE_EXTRA_COMPILERS) 22 export(generated_files.depends) 23 return(true) 24 } 25 } 26 17 27 # GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources) 18 28 ctgen.output = tmp/chartables.c … … 23 33 ctgen.dependency_type = TYPE_C 24 34 ctgen.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}${QMAKE_FILE_BASE} 25 QMAKE_EXTRA_COMPILERS += ctgen 35 addExtraCompiler(ctgen) -
trunk/WebCore/ChangeLog
r27953 r27958 1 2007-11-22 Simon Hausmann <hausmann@kde.org> 2 3 Reviewed by George. 4 5 Centralize the setup for all the extra compilers in a addExtraCompiler function. 6 7 This allows adding a "generated_files" target that builds all generated files using "make generated_files". 8 For the build inside Qt we do not generate actual rules for the extra compilers but instead 9 do the variable substitution of compiler.output manually and add the generated sources to SOURCES. 10 11 WARNING: NO TEST CASES ADDED OR CHANGED 12 13 * WebCore.pro: 14 1 15 2007-11-21 Timothy Hatcher <timothy@apple.com> 2 16 -
trunk/WebCore/WebCore.pro
r27925 r27958 63 63 64 64 DEFINES += WTF_CHANGES=1 65 66 # 67 # For builds inside Qt we interpret the output rule and the input of each extra compiler manually 68 # and add the resulting sources to the SOURCES variable, because the build inside Qt contains already 69 # all the generated files. We do not need to generate any extra compiler rules in that case. 70 # 71 # In addition this function adds a new target called 'generated_files' that allows manually calling 72 # all the extra compilers to generate all the necessary files for the build using 'make generated_files' 73 # 74 defineTest(addExtraCompiler) { 75 CONFIG(QTDIR_build) { 76 outputRule = $$eval($${1}.output) 77 78 input = $$eval($${1}.input) 79 input = $$eval($$input) 80 81 for(file,input) { 82 base = $$basename(file) 83 base ~= s/\..+// 84 newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base) 85 SOURCES += $$newfile 86 } 87 88 export(SOURCES) 89 } else { 90 QMAKE_EXTRA_COMPILERS += $$1 91 generated_files.depends += compiler_$${1}_make_all 92 export(QMAKE_EXTRA_COMPILERS) 93 export(generated_files.depends) 94 } 95 return(true) 96 } 65 97 66 98 include($$PWD/../JavaScriptCore/JavaScriptCore.pri) … … 151 183 152 184 QT += network xml 185 186 QMAKE_EXTRA_TARGETS += generated_files 153 187 154 188 FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1 … … 1424 1458 svgnames_a.variable_out = GENERATED_SOURCES 1425 1459 svgnames_a.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}SVGNames.h 1426 QMAKE_EXTRA_COMPILERS += svgnames_a1460 addExtraCompiler(svgnames_a) 1427 1461 svgnames_b.output = tmp/SVGElementFactory.cpp 1428 1462 svgnames_b.commands = @echo -n '' … … 1432 1466 svgnames_b.variable_out = GENERATED_SOURCES 1433 1467 svgnames_b.clean += ${QMAKE_VAR_OBJECTS_DIR_WTR}SVGElementFactory.h ${QMAKE_FILE_OUT} 1434 QMAKE_EXTRA_COMPILERS += svgnames_b1468 addExtraCompiler(svgnames_b) 1435 1469 1436 1470 # GENERATOR 5-D: … … 1442 1476 xlinknames.variable_out = GENERATED_SOURCES 1443 1477 xlinknames.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}XLinkNames.h 1444 QMAKE_EXTRA_COMPILERS += xlinknames1478 addExtraCompiler(xlinknames) 1445 1479 1446 1480 # GENERATOR 6-A: … … 1451 1485 cssprops.depend = ${QMAKE_FILE_NAME} SVGCSSPROPERTIES 1452 1486 cssprops.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}${QMAKE_FILE_BASE}.h 1453 QMAKE_EXTRA_COMPILERS += cssprops1487 addExtraCompiler(cssprops) 1454 1488 1455 1489 # GENERATOR 6-B: … … 1460 1494 cssvalues.depend = ${QMAKE_FILE_NAME} SVGCSSVALUES 1461 1495 cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}${QMAKE_FILE_BASE}.h 1462 QMAKE_EXTRA_COMPILERS += cssvalues1496 addExtraCompiler(cssvalues) 1463 1497 } else { 1464 1498 # GENERATOR 6-A: … … 1468 1502 cssprops.CONFIG = target_predeps no_link 1469 1503 cssprops.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}${QMAKE_FILE_BASE}.h 1470 QMAKE_EXTRA_COMPILERS += cssprops1504 addExtraCompiler(cssprops) 1471 1505 1472 1506 # GENERATOR 6-B: … … 1476 1510 cssvalues.CONFIG = target_predeps no_link 1477 1511 cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}${QMAKE_FILE_BASE}.h 1478 QMAKE_EXTRA_COMPILERS += cssvalues1512 addExtraCompiler(cssvalues) 1479 1513 } 1480 1514 … … 1487 1521 idl.CONFIG += target_predeps 1488 1522 idl.clean = ${QMAKE_VAR_OBJECTS_DIR_WTR}JS${QMAKE_FILE_BASE}.h ${QMAKE_FILE_OUT} 1489 QMAKE_EXTRA_COMPILERS += idl 1523 addExtraCompiler(idl) 1490 1524 1491 1525 # GENERATOR 2-A: LUT creator … … 1504 1538 luttable.CONFIG += no_link 1505 1539 luttable.dependency_type = TYPE_C 1506 QMAKE_EXTRA_COMPILERS += luttable 1540 addExtraCompiler(luttable) 1507 1541 1508 1542 # GENERATOR 3: tokenizer (flex) … … 1512 1546 tokenizer.input = TOKENIZER 1513 1547 tokenizer.CONFIG += target_predeps no_link 1514 QMAKE_EXTRA_COMPILERS += tokenizer 1548 addExtraCompiler(tokenizer) 1515 1549 1516 1550 # GENERATOR 4: CSS grammar … … 1523 1557 cssbison.variable_out = GENERATED_SOURCES 1524 1558 cssbison.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}${QMAKE_FILE_BASE}.h 1525 QMAKE_EXTRA_COMPILERS += cssbison 1559 addExtraCompiler(cssbison) 1526 1560 #PRE_TARGETDEPS += tmp/CSSGrammar.cpp 1527 1561 grammar_h_dep.target = tmp/CSSParser.o … … 1537 1571 htmlnames.variable_out = GENERATED_SOURCES 1538 1572 htmlnames.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}HTMLNames.h 1539 QMAKE_EXTRA_COMPILERS += htmlnames 1573 addExtraCompiler(htmlnames) 1540 1574 1541 1575 # GENERATOR 5-B: … … 1547 1581 xmlnames.variable_out = GENERATED_SOURCES 1548 1582 xmlnames.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}XMLNames.h 1549 QMAKE_EXTRA_COMPILERS += xmlnames 1550 1583 addExtraCompiler(xmlnames) 1551 1584 1552 1585 # GENERATOR 8-A: … … 1557 1590 entities.CONFIG = target_predeps no_link 1558 1591 entities.clean = ${QMAKE_FILE_OUT} 1559 QMAKE_EXTRA_COMPILERS += entities 1592 addExtraCompiler(entities) 1560 1593 1561 1594 # GENERATOR 8-B: … … 1566 1599 doctypestrings.CONFIG += target_predeps no_link 1567 1600 doctypestrings.clean = ${QMAKE_FILE_OUT} 1568 QMAKE_EXTRA_COMPILERS += doctypestrings 1601 addExtraCompiler(doctypestrings) 1569 1602 1570 1603 # GENERATOR 8-C: … … 1573 1606 colordata.input = COLORDAT_GPERF 1574 1607 colordata.CONFIG = target_predeps no_link 1575 QMAKE_EXTRA_COMPILERS += colordata 1608 addExtraCompiler(colordata) 1576 1609 1577 1610 # GENERATOR 9: … … 1582 1615 stylesheets.variable_out = GENERATED_SOURCES 1583 1616 stylesheets.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}UserAgentStyleSheets.h 1584 QMAKE_EXTRA_COMPILERS += stylesheets 1617 addExtraCompiler(stylesheets) 1585 1618 1586 1619 # GENERATOR 10: XPATH grammar … … 1593 1626 xpathbison.variable_out = GENERATED_SOURCES 1594 1627 xpathbison.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_OBJECTS_DIR_WTR}${QMAKE_FILE_BASE}.h 1595 QMAKE_EXTRA_COMPILERS += xpathbison 1628 addExtraCompiler(xpathbison) 1596 1629 1597 1630 qt-port {
Note: See TracChangeset
for help on using the changeset viewer.