build-modules-c.awk revision 141b1a93f508248cbc0e9a124cc38041eb3e2562
06b6cb227bb560084b5f87b30fa0023440abf369manojBEGIN {
06b6cb227bb560084b5f87b30fa0023440abf369manoj RS = " "
141b1a93f508248cbc0e9a124cc38041eb3e2562rbb modules[n++] = "core"
141b1a93f508248cbc0e9a124cc38041eb3e2562rbb pmodules[pn++] = "core"
06b6cb227bb560084b5f87b30fa0023440abf369manoj}
d59bcf65a7217a26e765ab07cb6bbf5b427ad9e3ben{
d59bcf65a7217a26e765ab07cb6bbf5b427ad9e3ben modules[n] = $1;
d59bcf65a7217a26e765ab07cb6bbf5b427ad9e3ben pmodules[pn] = $1;
d59bcf65a7217a26e765ab07cb6bbf5b427ad9e3ben gsub("\n","",modules[n]);
d59bcf65a7217a26e765ab07cb6bbf5b427ad9e3ben gsub("\n","",pmodules[pn]);
d59bcf65a7217a26e765ab07cb6bbf5b427ad9e3ben ++n;
d59bcf65a7217a26e765ab07cb6bbf5b427ad9e3ben ++pn;
d59bcf65a7217a26e765ab07cb6bbf5b427ad9e3ben}
06b6cb227bb560084b5f87b30fa0023440abf369manojEND {
06b6cb227bb560084b5f87b30fa0023440abf369manoj print "/*"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * modules.c --- automatically generated by Apache"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * configuration script. DO NOT HAND EDIT!!!!!"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " */"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print ""
2d71630471d1c23f0137309e3c3957c633ecbfd6rbb print "#include \"ap_config.h\""
06b6cb227bb560084b5f87b30fa0023440abf369manoj print "#include \"httpd.h\""
06b6cb227bb560084b5f87b30fa0023440abf369manoj print "#include \"http_config.h\""
06b6cb227bb560084b5f87b30fa0023440abf369manoj print ""
141b1a93f508248cbc0e9a124cc38041eb3e2562rbb for (i = 0; i < pn; ++i) {
06b6cb227bb560084b5f87b30fa0023440abf369manoj printf ("extern module %s_module;\n", pmodules[i])
06b6cb227bb560084b5f87b30fa0023440abf369manoj }
06b6cb227bb560084b5f87b30fa0023440abf369manoj print ""
06b6cb227bb560084b5f87b30fa0023440abf369manoj print "/*"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * Modules which implicitly form the"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * list of activated modules on startup,"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * i.e. these are the modules which are"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * initially linked into the Apache processing"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * [extendable under run-time via AddModule]"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " */"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print "module *ap_prelinked_modules[] = {"
141b1a93f508248cbc0e9a124cc38041eb3e2562rbb for (i = 0 ; i < n; ++i) {
06b6cb227bb560084b5f87b30fa0023440abf369manoj printf " &%s_module,\n", modules[i]
06b6cb227bb560084b5f87b30fa0023440abf369manoj }
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " NULL"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print "};"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print ""
06b6cb227bb560084b5f87b30fa0023440abf369manoj print "/*"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * Modules which initially form the"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * list of available modules on startup,"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * i.e. these are the modules which are"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * initially loaded into the Apache process"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " * [extendable under run-time via LoadModule]"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " */"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print "module *ap_preloaded_modules[] = {"
141b1a93f508248cbc0e9a124cc38041eb3e2562rbb for (i = 0; i < pn; ++i) {
06b6cb227bb560084b5f87b30fa0023440abf369manoj printf " &%s_module,\n", pmodules[i]
06b6cb227bb560084b5f87b30fa0023440abf369manoj }
06b6cb227bb560084b5f87b30fa0023440abf369manoj print " NULL"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print "};"
06b6cb227bb560084b5f87b30fa0023440abf369manoj print ""
06b6cb227bb560084b5f87b30fa0023440abf369manoj}