removed some of the debug logging and added author details
[httpd-crcsyncproxy.git] / build / build-modules-c.awk
blob8dc4aa1c2bca3b8c578ed16a0a20017c3ba4e3c1
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 BEGIN {
16 RS = " "
17 modules[n++] = "core"
18 pmodules[pn++] = "core"
21 modules[n] = $1;
22 pmodules[pn] = $1;
23 gsub("\n","",modules[n]);
24 gsub("\n","",pmodules[pn]);
25 ++n;
26 ++pn;
28 END {
29 print "/*"
30 print " * modules.c --- automatically generated by Apache"
31 print " * configuration script. DO NOT HAND EDIT!!!!!"
32 print " */"
33 print ""
34 print "#include \"ap_config.h\""
35 print "#include \"httpd.h\""
36 print "#include \"http_config.h\""
37 print ""
38 for (i = 0; i < pn; ++i) {
39 printf ("extern module %s_module;\n", pmodules[i])
41 print ""
42 print "/*"
43 print " * Modules which implicitly form the"
44 print " * list of activated modules on startup,"
45 print " * i.e. these are the modules which are"
46 print " * initially linked into the Apache processing"
47 print " * [extendable under run-time via AddModule]"
48 print " */"
49 print "module *ap_prelinked_modules[] = {"
50 for (i = 0 ; i < n; ++i) {
51 printf " &%s_module,\n", modules[i]
53 print " NULL"
54 print "};"
55 print ""
56 print "/*"
57 print " * We need the symbols as strings for <IfModule> containers"
58 print " */"
59 print ""
60 print "ap_module_symbol_t ap_prelinked_module_symbols[] = {"
61 for (i = 0; i < n; ++i) {
62 printf (" {\"%s_module\", &%s_module},\n", modules[i], modules[i])
64 print " {NULL, NULL}"
65 print "};"
66 print ""
67 print "/*"
68 print " * Modules which initially form the"
69 print " * list of available modules on startup,"
70 print " * i.e. these are the modules which are"
71 print " * initially loaded into the Apache process"
72 print " * [extendable under run-time via LoadModule]"
73 print " */"
74 print "module *ap_preloaded_modules[] = {"
75 for (i = 0; i < pn; ++i) {
76 printf " &%s_module,\n", pmodules[i]
78 print " NULL"
79 print "};"
80 print ""