summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/build-modules-c.cmake66
-rw-r--r--build/modules.c.in41
2 files changed, 46 insertions, 61 deletions
diff --git a/build/build-modules-c.cmake b/build/build-modules-c.cmake
index 9d4ac6cc2d..1d005bd9b1 100644
--- a/build/build-modules-c.cmake
+++ b/build/build-modules-c.cmake
@@ -16,68 +16,12 @@
function(generate_builtin_modules_c output_filename module_list)
list(PREPEND module_list "core")
- set(content "")
-
- string(APPEND content "/*\n")
- string(APPEND content " * modules.c --- automatically generated by Apache\n")
- string(APPEND content " * configuration script. DO NOT HAND EDIT!!!!!\n")
- string(APPEND content " */\n")
- string(APPEND content "\n")
- string(APPEND content "#include \"ap_config.h\"\n")
- string(APPEND content "#include \"httpd.h\"\n")
- string(APPEND content "#include \"http_config.h\"\n")
- string(APPEND content "\n")
-
- foreach(module ${module_list})
- string(APPEND content "extern module ${module}_module\;\n")
- endforeach()
-
- string(APPEND content "\n")
- string(APPEND content "/*\n")
- string(APPEND content " * Modules which implicitly form the\n")
- string(APPEND content " * list of activated modules on startup,\n")
- string(APPEND content " * i.e. these are the modules which are\n")
- string(APPEND content " * initially linked into the Apache processing\n")
- string(APPEND content " * [extendable under run-time via AddModule]\n")
- string(APPEND content " */\n")
-
- string(APPEND content "AP_DECLARE_DATA module *ap_prelinked_modules[] = {\n")
foreach(module ${module_list})
- string(APPEND content " &${module}_module,\n")
+ string(APPEND MODULES_EXTERN "extern module ${module}_module;\n")
+ string(APPEND MODULES_PRELINK " &${module}_module,\n")
+ string(APPEND MODULES_SYNMBOLS " {\"${module}_module\", &${module}_module},\n")
+ string(APPEND MODULES_PRELOAD " &${module}_module,\n")
endforeach()
- string(APPEND content " NULL\n")
- string(APPEND content "}\;\n")
-
- string(APPEND content "\n")
- string(APPEND content "/*\n")
- string(APPEND content " * We need the symbols as strings for <IfModule> containers\n")
- string(APPEND content " */\n")
- string(APPEND content "\n")
- string(APPEND content "ap_module_symbol_t ap_prelinked_module_symbols[] = {\n")
-
- foreach(module ${module_list})
- string(APPEND content " {\"${module}_module\", &${module}_module},\n")
- endforeach()
-
- string(APPEND content " {NULL, NULL}\n")
- string(APPEND content "}\;\n")
- string(APPEND content "\n")
- string(APPEND content "/*\n")
- string(APPEND content " * Modules which initially form the\n")
- string(APPEND content " * list of available modules on startup,\n")
- string(APPEND content " * i.e. these are the modules which are\n")
- string(APPEND content " * initially loaded into the Apache process\n")
- string(APPEND content " * [extendable under run-time via LoadModule]\n")
- string(APPEND content " */\n")
- string(APPEND content "module *ap_preloaded_modules[] = {\n")
-
- foreach(module ${module_list})
- string(APPEND content " &${module}_module,\n")
- endforeach()
-
- string(APPEND content " NULL\n")
- string(APPEND content "}\;\n")
- string(APPEND content "\n")
- file(WRITE ${output_filename} ${content})
+ configure_file("build/modules.c.in" ${output_filename})
endfunction()
diff --git a/build/modules.c.in b/build/modules.c.in
new file mode 100644
index 0000000000..c811d0d444
--- /dev/null
+++ b/build/modules.c.in
@@ -0,0 +1,41 @@
+/*
+ * modules.c --- automatically generated by Apache
+ * configuration script. DO NOT HAND EDIT!!!!!
+ */
+
+#include "ap_config.h"
+#include "httpd.h"
+#include "http_config.h"
+
+@MODULES_EXTERN@
+/*
+ * Modules which implicitly form the
+ * list of activated modules on startup,
+ * i.e. these are the modules which are
+ * initially linked into the Apache processing
+ * [extendable under run-time via AddModule]
+ */
+AP_DECLARE_DATA module *ap_prelinked_modules[] = {
+@MODULES_PRELINK@
+ NULL
+};
+
+/*
+ * We need the symbols as strings for <IfModule> containers
+ */
+ap_module_symbol_t ap_prelinked_module_symbols[] = {
+@MODULES_SYNMBOLS@
+ {NULL, NULL}
+};
+
+/*
+ * Modules which initially form the
+ * list of available modules on startup,
+ * i.e. these are the modules which are
+ * initially loaded into the Apache process
+ * [extendable under run-time via LoadModule]
+ */
+module *ap_preloaded_modules[] = {
+@MODULES_PRELOAD@
+ NULL
+};