2010-12-07 Patrick Gansterer <paroga@webkit.org>
authorparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2010 11:11:37 +0000 (11:11 +0000)
committerparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2010 11:11:37 +0000 (11:11 +0000)
        Reviewed by Andreas Kling.

        [CMake] Remove WebKitGenerators
        https://bugs.webkit.org/show_bug.cgi?id=50445

        * CMakeLists.txt:
        * cmake/WebKitGenerators.cmake: Removed.
2010-12-07  Patrick Gansterer  <paroga@webkit.org>

        Reviewed by Andreas Kling.

        [CMake] Remove WebKitGenerators
        https://bugs.webkit.org/show_bug.cgi?id=50445

        Move remaining logic into main CMakeLists.txt.

        * CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73434 268f45cc-cd09-0410-ab3c-d52691b4dbfc

CMakeLists.txt
ChangeLog
WebCore/CMakeLists.txt
WebCore/ChangeLog
cmake/WebKitGenerators.cmake [deleted file]

index 159d99c..ca8dcf9 100644 (file)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)\r
-PROJECT(WebKit)\r
-\r
-# Set a default build type if and only if user did not define one as command\r
-# line options and he did not give custom CFLAGS or CXXFLAGS. Otherwise, flags\r
-# from default build type would overwrite user-defined ones.\r
-IF (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)\r
-    SET(CMAKE_BUILD_TYPE Release)\r
-ENDIF ()\r
-SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")\r
-\r
-SET(JAVASCRIPTCORE_DIR "${CMAKE_SOURCE_DIR}/JavaScriptCore")\r
-SET(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/WebCore")\r
-SET(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/WebKit")\r
-SET(WEBKITTOOLS_DIR "${CMAKE_SOURCE_DIR}/WebKitTools")\r
-SET(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")\r
-\r
-INCLUDE(WebKitMacros)\r
-INCLUDE(WebKitGenerators)\r
-INCLUDE(WebKitHelpers)\r
-INCLUDE(WebKitFeatures)\r
-\r
-# -----------------------------------------------------------------------------\r
-# Determine which port will be built\r
-# -----------------------------------------------------------------------------\r
-SET(ALL_PORTS Efl)\r
-OPTION(PORT "choose which WebKit port to build (one of ${ALL_PORTS})" "NOPORT")\r
-\r
-# -----------------------------------------------------------------------------\r
-# Find common packages (used by all ports)\r
-# -----------------------------------------------------------------------------\r
-FIND_PACKAGE(BISON REQUIRED)\r
-FIND_PACKAGE(FLEX REQUIRED)\r
-FIND_PACKAGE(Gperf REQUIRED)\r
-FIND_PACKAGE(Perl REQUIRED)\r
-FIND_PACKAGE(PythonInterp REQUIRED)\r
-\r
-# -----------------------------------------------------------------------------\r
-# Determine the target processor\r
-# -----------------------------------------------------------------------------\r
-STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)\r
-IF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")\r
-    SET(WTF_CPU_ARM 1)\r
-ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)")\r
-    SET(WTF_CPU_X86_64 1)\r
-ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")\r
-    SET(WTF_CPU_X86 1)\r
-ELSE ()\r
-    MESSAGE(FATAL_ERROR "Unknown CPU '${CMAKE_SYSTEM_PROCESSOR}'")\r
-ENDIF ()\r
-\r
-# -----------------------------------------------------------------------------\r
-# Determine the operating system\r
-# -----------------------------------------------------------------------------\r
-IF (CMAKE_SYSTEM_NAME MATCHES "Linux")\r
-    SET(WTF_OS_UNIX 1)\r
-\r
-    IF (APPLE)\r
-        SET(WTF_OS_MAC_OS_X 1)\r
-    ENDIF ()\r
-ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")\r
-    SET(WTF_OS_WINDOWS 1)\r
-ELSE ()\r
-    MESSAGE(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'")\r
-ENDIF ()\r
-\r
-# -----------------------------------------------------------------------------\r
-# Default target names (can be overrriden in Options${PORT}.cmake file)\r
-# -----------------------------------------------------------------------------\r
-SET(JSC_EXECUTABLE_NAME JSC)\r
-SET(WTF_LIBRARY_NAME WTF)\r
-SET(JavaScriptCore_LIBRARY_NAME JavaScriptCore)\r
-SET(WebCore_LIBRARY_NAME WebCore)\r
-SET(WebKit_LIBRARY_NAME WebKit)\r
-\r
-# -----------------------------------------------------------------------------\r
-# Default library types\r
-# -----------------------------------------------------------------------------\r
-OPTION(SHARED_CORE "build WTF, JavaScriptCore and WebCore as shared libraries")\r
-\r
-IF (SHARED_CORE)\r
-    SET(WTF_LIBRARY_TYPE SHARED)\r
-    SET(JavaScriptCore_LIBRARY_TYPE SHARED)\r
-    SET(WebCore_LIBRARY_TYPE SHARED)\r
-ELSE ()\r
-    SET(WTF_LIBRARY_TYPE STATIC)\r
-    SET(JavaScriptCore_LIBRARY_TYPE STATIC)\r
-    SET(WebCore_LIBRARY_TYPE STATIC)\r
-ENDIF ()\r
-\r
-SET(WebKit_LIBRARY_TYPE SHARED)\r
-\r
-# -----------------------------------------------------------------------------\r
-# Port-specific options\r
-# -----------------------------------------------------------------------------\r
-INCLUDE(OptionsCommon)\r
-INCLUDE(Options${PORT})\r
-\r
-# -----------------------------------------------------------------------------\r
-# Define packaging\r
-# -----------------------------------------------------------------------------\r
-INCLUDE(WebKitPackaging)\r
-\r
-# -----------------------------------------------------------------------------\r
-# Add module directories\r
-# -----------------------------------------------------------------------------\r
-ADD_SUBDIRECTORY(JavaScriptCore)\r
-ADD_SUBDIRECTORY(WebCore)\r
-ADD_SUBDIRECTORY(WebKit)\r
-\r
-# -----------------------------------------------------------------------------\r
-# Add test browser if exists\r
-# -----------------------------------------------------------------------------\r
-INCLUDE_IF_EXISTS(${WEBKITTOOLS_DIR}/CMakeLists${PORT}.txt)\r
-\r
-# -----------------------------------------------------------------------------\r
-# Set compiler flags for all targets\r
-# -----------------------------------------------------------------------------\r
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME})\r
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(${JavaScriptCore_LIBRARY_NAME})\r
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME})\r
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit_LIBRARY_NAME})\r
-\r
-# -----------------------------------------------------------------------------\r
-# Create the configuration file\r
-# -----------------------------------------------------------------------------\r
-CONFIGURE_FILE(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)\r
-\r
-# -----------------------------------------------------------------------------\r
-# Prints a summary of all enabled/disabled features\r
-# -----------------------------------------------------------------------------\r
-WEBKIT_PRINT_FEATURES()\r
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+PROJECT(WebKit)
+
+# Set a default build type if and only if user did not define one as command
+# line options and he did not give custom CFLAGS or CXXFLAGS. Otherwise, flags
+# from default build type would overwrite user-defined ones.
+IF (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
+    SET(CMAKE_BUILD_TYPE Release)
+ENDIF ()
+SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
+
+SET(JAVASCRIPTCORE_DIR "${CMAKE_SOURCE_DIR}/JavaScriptCore")
+SET(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/WebCore")
+SET(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/WebKit")
+SET(WEBKITTOOLS_DIR "${CMAKE_SOURCE_DIR}/WebKitTools")
+SET(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")
+
+INCLUDE(WebKitMacros)
+INCLUDE(WebKitFS)
+INCLUDE(WebKitHelpers)
+INCLUDE(WebKitFeatures)
+
+# -----------------------------------------------------------------------------
+# Determine which port will be built
+# -----------------------------------------------------------------------------
+SET(ALL_PORTS Efl)
+OPTION(PORT "choose which WebKit port to build (one of ${ALL_PORTS})" "NOPORT")
+
+# -----------------------------------------------------------------------------
+# Find common packages (used by all ports)
+# -----------------------------------------------------------------------------
+FIND_PACKAGE(BISON REQUIRED)
+FIND_PACKAGE(FLEX REQUIRED)
+FIND_PACKAGE(Gperf REQUIRED)
+FIND_PACKAGE(Perl REQUIRED)
+FIND_PACKAGE(PythonInterp REQUIRED)
+
+# -----------------------------------------------------------------------------
+# Determine the target processor
+# -----------------------------------------------------------------------------
+STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
+IF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
+    SET(WTF_CPU_ARM 1)
+ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)")
+    SET(WTF_CPU_X86_64 1)
+ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
+    SET(WTF_CPU_X86 1)
+ELSE ()
+    MESSAGE(FATAL_ERROR "Unknown CPU '${CMAKE_SYSTEM_PROCESSOR}'")
+ENDIF ()
+
+# -----------------------------------------------------------------------------
+# Determine the operating system
+# -----------------------------------------------------------------------------
+IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
+    SET(WTF_OS_UNIX 1)
+
+    IF (APPLE)
+        SET(WTF_OS_MAC_OS_X 1)
+    ENDIF ()
+ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
+    SET(WTF_OS_WINDOWS 1)
+ELSE ()
+    MESSAGE(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'")
+ENDIF ()
+
+# -----------------------------------------------------------------------------
+# Default target names (can be overrriden in Options${PORT}.cmake file)
+# -----------------------------------------------------------------------------
+SET(JSC_EXECUTABLE_NAME JSC)
+SET(WTF_LIBRARY_NAME WTF)
+SET(JavaScriptCore_LIBRARY_NAME JavaScriptCore)
+SET(WebCore_LIBRARY_NAME WebCore)
+SET(WebKit_LIBRARY_NAME WebKit)
+
+# -----------------------------------------------------------------------------
+# Default library types
+# -----------------------------------------------------------------------------
+OPTION(SHARED_CORE "build WTF, JavaScriptCore and WebCore as shared libraries")
+
+IF (SHARED_CORE)
+    SET(WTF_LIBRARY_TYPE SHARED)
+    SET(JavaScriptCore_LIBRARY_TYPE SHARED)
+    SET(WebCore_LIBRARY_TYPE SHARED)
+ELSE ()
+    SET(WTF_LIBRARY_TYPE STATIC)
+    SET(JavaScriptCore_LIBRARY_TYPE STATIC)
+    SET(WebCore_LIBRARY_TYPE STATIC)
+ENDIF ()
+
+SET(WebKit_LIBRARY_TYPE SHARED)
+
+# -----------------------------------------------------------------------------
+# Port-specific options
+# -----------------------------------------------------------------------------
+INCLUDE(OptionsCommon)
+INCLUDE(Options${PORT})
+
+# -----------------------------------------------------------------------------
+# Define packaging
+# -----------------------------------------------------------------------------
+INCLUDE(WebKitPackaging)
+
+# -----------------------------------------------------------------------------
+# Add module directories
+# -----------------------------------------------------------------------------
+ADD_SUBDIRECTORY(JavaScriptCore)
+ADD_SUBDIRECTORY(WebCore)
+ADD_SUBDIRECTORY(WebKit)
+
+# -----------------------------------------------------------------------------
+# Add test browser if exists
+# -----------------------------------------------------------------------------
+INCLUDE_IF_EXISTS(${WEBKITTOOLS_DIR}/CMakeLists${PORT}.txt)
+
+# -----------------------------------------------------------------------------
+# Set compiler flags for all targets
+# -----------------------------------------------------------------------------
+WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME})
+WEBKIT_SET_EXTRA_COMPILER_FLAGS(${JavaScriptCore_LIBRARY_NAME})
+WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME})
+WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit_LIBRARY_NAME})
+
+# -----------------------------------------------------------------------------
+# Create the configuration file
+# -----------------------------------------------------------------------------
+CONFIGURE_FILE(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)
+
+# -----------------------------------------------------------------------------
+# Prints a summary of all enabled/disabled features
+# -----------------------------------------------------------------------------
+WEBKIT_PRINT_FEATURES()
index 6429180..3276c03 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-07  Patrick Gansterer  <paroga@webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        [CMake] Remove WebKitGenerators
+        https://bugs.webkit.org/show_bug.cgi?id=50445
+
+        * CMakeLists.txt:
+        * cmake/WebKitGenerators.cmake: Removed.
+
 2010-12-06  Patrick Gansterer  <paroga@webkit.org>
 
         Reviewed by Andreas Kling.
index 5db4c8a..54b1f89 100644 (file)
@@ -2048,12 +2048,19 @@ FOREACH (_feature ${FEATURE_DEFINES})
     SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} ${_feature}")
 ENDFOREACH ()
 
+
+# Create JavaScript C++ code given an IDL input
 FOREACH (_file ${WebCore_IDL_FILES})
-    GENERATE_JS_FROM_IDL(${_file})
+    GET_FILENAME_COMPONENT (_name ${_file} NAME_WE)
+    ADD_CUSTOM_COMMAND(
+        OUTPUT  ${DERIVED_SOURCES_DIR}/JS${_name}.cpp ${DERIVED_SOURCES_DIR}/JS${_name}.h
+        MAIN_DEPENDENCY ${_file}
+        DEPENDS ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl ${SCRIPTS_BINDINGS} ${_file}
+        COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --generator JS ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_DIR}" ${WEBCORE_DIR}/${_file}
+        VERBATIM)
+    LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/JS${_name}.cpp)
 ENDFOREACH ()
 
-LIST(APPEND WebCore_SOURCES ${JS_IDL_FILES})
-
  
 # All Web Inspector generated files are created with this one call to CodeGeneratorInspector.pm
 ADD_CUSTOM_COMMAND(
index 036fab0..4fbeb71 100644 (file)
@@ -1,3 +1,14 @@
+2010-12-07  Patrick Gansterer  <paroga@webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        [CMake] Remove WebKitGenerators
+        https://bugs.webkit.org/show_bug.cgi?id=50445
+
+        Move remaining logic into main CMakeLists.txt.
+
+        * CMakeLists.txt:
+
 2010-12-07  Justin Schuh  <jschuh@chromium.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/cmake/WebKitGenerators.cmake b/cmake/WebKitGenerators.cmake
deleted file mode 100644 (file)
index dd4a44d..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-# This file provides various generators used by webkit.
-# It will check for the programs and define the given executables:
-#    PERL_EXECUTABLE
-#    BISON_EXECUTABLE
-#    GPERF_EXECUTABLE
-#    FLEX_EXECUTABLE
-
-INCLUDE (WebKitFS)
-
-# Modules that the bindings generator scripts may use
-SET(SCRIPTS_BINDINGS
-  ${WEBCORE_DIR}/bindings/scripts/CodeGenerator.pm
-  ${WEBCORE_DIR}/bindings/scripts/IDLParser.pm
-  ${WEBCORE_DIR}/bindings/scripts/IDLStructure.pm
-  ${WEBCORE_DIR}/bindings/scripts/InFilesParser.pm)
-SET(BINDING_CODE_GENERATOR ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl)
-SET(JS_IDL_FILES "")
-SET(Inspector_IDL_FILES "")
-
-# - Create JS C++ code given an IDL input
-# GENERATE_FROM_IDL(generator idl_source)
-#
-# The generated files (.cpp, .h) lives in ${DERIVED_SOURCES_DIR}.
-#
-# This function also appends the generated cpp file to JS_IDL_FILES list.
-MACRO(GENERATE_JS_FROM_IDL _source)
-  SET(FEATURE_DEFINES_STR "")
-  FOREACH (f ${FEATURE_DEFINES})
-    SET(FEATURE_DEFINES_STR "${FEATURE_DEFINES_STR} ${f}")
-  ENDFOREACH ()
-
-  GET_FILENAME_COMPONENT(_name ${_source} NAME_WE)
-  ADD_CUSTOM_COMMAND(
-    OUTPUT  ${DERIVED_SOURCES_DIR}/JS${_name}.cpp ${DERIVED_SOURCES_DIR}/JS${_name}.h
-    DEPENDS ${BINDING_CODE_GENERATOR} ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/${_source}
-    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${BINDING_CODE_GENERATOR} ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_DIR}" --defines "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_STR}" --generator JS ${WEBCORE_DIR}/${_source}
-    VERBATIM)
-  LIST(APPEND JS_IDL_FILES ${DERIVED_SOURCES_DIR}/JS${_name}.cpp)
-  UNSET(_name)
-  UNSET(_defines)
-ENDMACRO()
-
-
-# - Create Inspector C++ code given an IDL input
-# GENERATE_FROM_IDL(generator idl_source)
-#
-# The generated files (.cpp, .h) lives in ${DERIVED_SOURCES_DIR}.
-#
-# This function also appends the generated cpp file to Inspector_IDL_FILES list.
-MACRO(GENERATE_INSPECTOR_FROM_IDL _source)
-  SET(FEATURE_DEFINES_STR "")
-  FOREACH (f ${FEATURE_DEFINES})
-    SET(FEATURE_DEFINES_STR "${FEATURE_DEFINES_STR} ${f}")
-  ENDFOREACH ()
-
-  GET_FILENAME_COMPONENT(_name ${_source} NAME_WE)
-  ADD_CUSTOM_COMMAND(
-    OUTPUT  ${DERIVED_SOURCES_DIR}/${_name}Frontend.cpp ${DERIVED_SOURCES_DIR}/${_name}Frontend.h ${DERIVED_SOURCES_DIR}/${_name}BackendDispatcher.cpp ${DERIVED_SOURCES_DIR}/${_name}BackendDispatcher.h
-    DEPENDS ${BINDING_CODE_GENERATOR} ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/${_source}
-    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts -I${WEBCORE_DIR}/inspector ${BINDING_CODE_GENERATOR} ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_DIR}" --defines "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_STR}" --generator Inspector ${WEBCORE_DIR}/${_source}
-    VERBATIM)
-  LIST(APPEND Inspector_IDL_FILES ${DERIVED_SOURCES_DIR}/${_name}Frontend.cpp)
-  UNSET(_name)
-  UNSET(_defines)
-ENDMACRO()
-
-
-
-# - Create pure JavaScript functions (does nothing so far)
-MACRO(GENERATE_JS_FROM_IDL_PURE _source)
-   GET_FILENAME_COMPONENT(_name ${_source} NAME_WE)
-   ADD_CUSTOM_COMMAND(
-     OUTPUT  ${DERIVED_SOURCES_DIR}/JS${_name}.cpp ${DERIVED_SOURCES_DIR}/JS${_name}.h
-     DEPENDS ${BINDING_CODE_GENERATOR} ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/${_source}
-     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${BINDING_CODE_GENERATOR} ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_DIR}" --defines "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_STR}" --generator JS ${WEBCORE_DIR}/${_source}
-     VERBATIM)
-   UNSET(_name)
-ENDMACRO()
-
-SET(NAMES_GENERATOR ${WEBCORE_DIR}/dom/make_names.pl)
-# - Create DOM names and factory given tags and attributes as source.
-# GENERATE_DOM_NAMES_FACTORY(namespace tags_source attributes_source [defines])
-#
-# The generated files lives in ${DERIVED_SOURCES_DIR}. The files will
-# be named using the given namespace, such as:
-#   - ${namespace}Names.cpp, ${namespace}Names.h;
-#   - ${namespace}ElementFactory.cpp, ${namespace}ElementFactory.h;
-#   - ${namespace}ElementWrapperFactory.cpp; ${namespace}ElementWrapperFactory.h
-#
-# If optional defines are given, then they will be speficied using
-# --extraDefines directive to the generator script.
-MACRO(GENERATE_DOM_NAMES_FACTORY _namespace _tags _attrs)
-  UNSET(_extradef)
-  FOREACH (f ${ARGN})
-    SET(_extradef "${_extradef} ${f}")
-  ENDFOREACH ()
-  IF (_extradef)
-    SET(_extradef --extraDefines=${_extradef})
-  ENDIF ()
-  ADD_CUSTOM_COMMAND(
-    OUTPUT ${DERIVED_SOURCES_DIR}/${_namespace}Names.cpp ${DERIVED_SOURCES_DIR}/${_namespace}Names.h ${DERIVED_SOURCES_DIR}/${_namespace}ElementFactory.cpp ${DERIVED_SOURCES_DIR}/${_namespace}ElementFactory.h ${DERIVED_SOURCES_DIR}/JS${_namespace}ElementWrapperFactory.cpp ${DERIVED_SOURCES_DIR}/JS${_namespace}ElementWrapperFactory.h
-    DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS} ${_tags} ${_attrs}
-    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --tags ${_tags} --attrs ${_attrs} ${_extradef} --factory --wrapperFactory --outputDir ${DERIVED_SOURCES_DIR}
-    VERBATIM)
-  UNSET(_extradef)
-ENDMACRO ()
-
-# - Create DOM names only (no factories)
-# GENERATE_DOM_NAMES_ONLY(namespace attributes_source)
-#
-# The generated files lives in ${DERIVED_SOURCES_DIR}. The files will
-# be named using the given namespace, such as:
-#   - ${namespace}Names.cpp, ${namespace}Names.h;
-MACRO(GENERATE_DOM_NAMES_ONLY _namespace _attrs)
-  ADD_CUSTOM_COMMAND(
-    OUTPUT ${DERIVED_SOURCES_DIR}/${_namespace}Names.cpp ${DERIVED_SOURCES_DIR}/${_namespace}Names.h
-    DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS} ${_attrs}
-    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --attrs ${_attrs} --outputDir ${DERIVED_SOURCES_DIR}
-    VERBATIM)
-ENDMACRO()
-
-# - Create ${CMAKE_BINARY_DIR}/JavaScriptCore/pcre/chartables.c
-# GENERATE_DFTABLES()
-MACRO(GENERATE_DFTABLES)
-  ADD_CUSTOM_COMMAND(
-    OUTPUT  ${CMAKE_BINARY_DIR}/JavaScriptCore/pcre/chartables.c
-    DEPENDS ${JAVASCRIPTCORE_DIR}/pcre/dftables
-    COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/pcre/dftables ${CMAKE_BINARY_DIR}/JavaScriptCore/pcre/chartables.c
-    VERBATIM)
-ENDMACRO()
-
-
-SET(MAKE_TOKENIZER ${WEBCORE_DIR}/css/maketokenizer)
-# - Create ${DERIVED_SOURCES_DIR}/tokenizer.cpp
-# GENERATE_TOKENIZER()
-MACRO(GENERATE_TOKENIZER)
-  ADD_CUSTOM_COMMAND(
-    OUTPUT ${DERIVED_SOURCES_DIR}/tokenizer.cpp
-    DEPENDS ${WEBCORE_DIR}/css/tokenizer.flex ${MAKE_TOKENIZER}
-    COMMAND ${FLEX_EXECUTABLE} -t ${WEBCORE_DIR}/css/tokenizer.flex | ${PERL_EXECUTABLE} ${MAKE_TOKENIZER} > ${DERIVED_SOURCES_DIR}/tokenizer.cpp
-    VERBATIM)
-ENDMACRO()
-
-
-SET(USER_AGENT_STYLE_SHEETS
-  ${WEBCORE_DIR}/css/html.css
-  ${WEBCORE_DIR}/css/mathml.css
-  ${WEBCORE_DIR}/css/quirks.css
-  ${WEBCORE_DIR}/css/view-source.css
-  ${WEBCORE_DIR}/css/svg.css
-  ${WEBCORE_DIR}/css/wml.css
-  ${WEBCORE_DIR}/css/mediaControls.css)
-SET(USER_AGENT_STYLE_SHEETS_GENERATOR ${WEBCORE_DIR}/css/make-css-file-arrays.pl)
-# - Create ${DERIVED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp and
-#   ${DERIVED_SOURCES_DIR}/UserAgentStyleSheets.h
-# GENERATE_USER_AGENT_STYLES()
-MACRO(GENERATE_USER_AGENT_STYLES)
-  ADD_CUSTOM_COMMAND(
-    OUTPUT ${DERIVED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp ${DERIVED_SOURCES_DIR}/UserAgentStyleSheets.h
-    DEPENDS ${USER_AGENT_STYLE_SHEETS_GENERATOR} ${USER_AGENT_STYLE_SHEETS}
-    COMMAND ${PERL_EXECUTABLE} ${USER_AGENT_STYLE_SHEETS_GENERATOR} ${DERIVED_SOURCES_DIR}/UserAgentStyleSheets.h ${DERIVED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp ${USER_AGENT_STYLE_SHEETS}
-    VERBATIM)
-ENDMACRO ()
-
-
-SET(CSS_VALUE_KEYWORDS
-  ${WEBCORE_DIR}/css/CSSValueKeywords.in
-  ${WEBCORE_DIR}/css/SVGCSSValueKeywords.in)
-SET(CSS_VALUE_GENERATOR ${WEBCORE_DIR}/css/makevalues.pl)
-# - Create ${DERIVED_SOURCES_DIR}/CSSValueKeywords.*
-# GENERATE_CSS_VALUE_KEYWORDS()
-MACRO(GENERATE_CSS_VALUE_KEYWORDS)
-  ADD_CUSTOM_COMMAND(
-    OUTPUT ${DERIVED_SOURCES_DIR}/CSSValueKeywords.h ${DERIVED_SOURCES_DIR}/CSSValueKeywords.cpp ${DERIVED_SOURCES_DIR}/CSSValueKeywords.in ${DERIVED_SOURCES_DIR}/CSSValueKeywords.gperf
-    DEPENDS ${CSS_VALUE_KEYWORDS} ${CSS_VALUE_GENERATOR}
-    WORKING_DIRECTORY ${DERIVED_SOURCES_DIR}
-    COMMAND ${PERL_EXECUTABLE} -ne "print lc" ${CSS_VALUE_KEYWORDS} > ${DERIVED_SOURCES_DIR}/CSSValueKeywords.in
-    COMMAND ${PERL_EXECUTABLE} ${CSS_VALUE_GENERATOR}
-    VERBATIM)
-ENDMACRO ()
-
-SET(CSS_PROPERTY_NAMES
-  ${WEBCORE_DIR}/css/CSSPropertyNames.in
-  ${WEBCORE_DIR}/css/SVGCSSPropertyNames.in)
-SET(MAKE_CSS_PROP ${WEBCORE_DIR}/css/makeprop.pl)
-# - Create ${DERIVED_SOURCES_DIR}/CSSPropertyNames.*
-# GENERATE_CSS_PROPERTY_NAMES()
-MACRO(GENERATE_CSS_PROPERTY_NAMES)
-  ADD_CUSTOM_COMMAND(
-    OUTPUT ${DERIVED_SOURCES_DIR}/CSSPropertyNames.h ${DERIVED_SOURCES_DIR}/CSSPropertyNames.cpp ${DERIVED_SOURCES_DIR}/CSSPropertyNames.in ${DERIVED_SOURCES_DIR}/CSSPropertyNames.gperf
-    DEPENDS ${MAKE_CSS_PROP} ${CSS_PROPERTY_NAMES}
-    WORKING_DIRECTORY ${DERIVED_SOURCES_DIR}
-    COMMAND cat ${CSS_PROPERTY_NAMES} > ${DERIVED_SOURCES_DIR}/CSSPropertyNames.in
-    COMMAND ${PERL_EXECUTABLE} ${MAKE_CSS_PROP}
-    VERBATIM)
-ENDMACRO ()