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