Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 588 lines (543 sloc) 25.49 kB
044173c This commit was generated by cvs2svn to compensate for changes in r22,
sumikawa authored
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
6e1af5a Initial revision
sumikawa authored
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
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
16
17 ##
18 ## Makefile -- Apache Autoconf-style Interface (APACI)
19 ## top-level control Makefile for out-of-the-box
20 ## build and installation procedure.
21 ##
22 ## Written by Ralf S. Engelschall <rse@apache.org>
23 ##
24
25 ## ==================================================================
26 ## Options
27 ## ==================================================================
28
29 # safe environment
30 SHELL = @SHELL@
31
32 # what platform are we on
33 PLATFORM = @PLATFORM@
34
35 # paths to the source tree parts
36 TOP = .
37 SRC = @SRC@
38 MKF = @MKF@
39 AUX = @AUX@
40
41 # build tools
42 CP = cp
43 LN = ln
44 RM = rm -f
45 MKDIR = $(TOP)/$(AUX)/mkdir.sh
46 INSTALL = $(TOP)/$(AUX)/install.sh -c
47 IFLAGS_PROGRAM = @IFLAGS_PROGRAM@
48 IFLAGS_CORE = @IFLAGS_CORE@
49 IFLAGS_DSO = @IFLAGS_DSO@
50 IFLAGS_SCRIPT = @IFLAGS_SCRIPT@
51 IFLAGS_DATA = @IFLAGS_DATA@
52 INSTALL_PROGRAM = $(INSTALL) $(IFLAGS_PROGRAM)
53 INSTALL_CORE = $(INSTALL) $(IFLAGS_CORE)
54 INSTALL_DSO = $(INSTALL) $(IFLAGS_DSO)
55 INSTALL_SCRIPT = $(INSTALL) $(IFLAGS_SCRIPT)
56 INSTALL_DATA = $(INSTALL) $(IFLAGS_DATA)
57 PERL = @PERL@
58 TAR = @TAR@
59 TAROPT = @TAROPT@
60
61 # installation name of Apache webserver
62 TARGET = @TARGET@
63
64 # installation root
65 # (overrideable by package maintainers for
66 # rolling packages without bristling the system)
67 root =
68
69 # installation paths
70 prefix = @prefix@
71 exec_prefix = @exec_prefix@
72 bindir = @bindir@
73 sbindir = @sbindir@
74 libexecdir = @libexecdir@
75 mandir = @mandir@
76 sysconfdir = @sysconfdir@
77 datadir = @datadir@
78 iconsdir = @iconsdir@
79 htdocsdir = @htdocsdir@
80 manualdir = @manualdir@
81 cgidir = @cgidir@
82 includedir = @includedir@
83 localstatedir = @localstatedir@
84 runtimedir = @runtimedir@
85 logfiledir = @logfiledir@
86 proxycachedir = @proxycachedir@
87
88 libexecdir_relative = @libexecdir_relative@
89
90 # suexec details (optional)
91 suexec = @suexec@
92 suexec_caller = @suexec_caller@
93 suexec_docroot = @suexec_docroot@
94 suexec_logexec = @suexec_logexec@
95 suexec_userdir = @suexec_userdir@
96 suexec_uidmin = @suexec_uidmin@
97 suexec_gidmin = @suexec_gidmin@
98 suexec_safepath = @suexec_safepath@
99 suexec_umask = @suexec_umask@
100
101 # some substituted configuration parameters
102 conf_user = @conf_user@
103 conf_group = @conf_group@
104 conf_port = @conf_port@
105 conf_serveradmin = @conf_serveradmin@
106 conf_servername = @conf_servername@
107
108 # usage of src/support stuff
109 build-support = @build_support@
110 install-support = @install_support@
111 clean-support = @clean_support@
112 distclean-support = @distclean_support@
113
114 # forwarding arguments
115 MFWD = root=$(root)
116
117 ## ==================================================================
118 ## Targets
119 ## ==================================================================
120
121 # default target
122 all: build
123
124 ## ------------------------------------------------------------------
125 ## Build Target
126 ## ------------------------------------------------------------------
127
128 # build the package
129 build:
130 @echo "===> $(SRC)"
131 @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) build-std
132 @if [ "x$(build-support)" != "x" ]; then \
133 $(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) $(build-support); \
134 fi
135 @touch $(TOP)/$(SRC)/.apaci.build.ok
136 @echo "<=== $(SRC)"
137
138 # the non-verbose variant for package maintainers
139 build-quiet:
140 @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) QUIET=1 build
141
142 # build the standard stuff
143 build-std:
144 @case "x$(PLATFORM)" in \
145 x*390*) _C89_STEPS="0xffffffff"; export _C89_STEPS;; \
146 esac; \
147 cd $(TOP)/$(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ all
148
149 # build the additional support stuff
150 build-support:
151 @echo "===> $(SRC)/support"; \
152 case "x$(PLATFORM)" in \
153 x*390*) _C89_STEPS="0xffffffff"; export _C89_STEPS;; \
154 esac; \
155 cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) all || exit 1; \
156 if [ ".$(suexec)" = .1 ]; then \
157 $(MAKE) $(MFLAGS) \
158 EXTRA_CFLAGS='\
159 $(suexec_umask) \
160 -DHTTPD_USER=\"$(suexec_caller)\" \
161 -DUID_MIN=$(suexec_uidmin) \
162 -DGID_MIN=$(suexec_gidmin) \
163 -DUSERDIR_SUFFIX=\"$(suexec_userdir)\" \
164 -DLOG_EXEC=\"$(suexec_logexec)\" \
165 -DDOC_ROOT=\"$(suexec_docroot)\" \
166 -DSAFE_PATH=\"$(suexec_safepath)\"' \
167 suexec; \
168 fi
169 @echo "<=== $(SRC)/support"
170
171 ## ------------------------------------------------------------------
172 ## Installation Targets
173 ## ------------------------------------------------------------------
174
175 # indirection step to avoid conflict with INSTALL document
176 # on case-insenstive filesystems, for instance on OS/2
177 install: install-all
178
179 # the install target for installing the complete Apache
180 # package. This is implemented by running subtargets for the
181 # separate parts of the installation process.
182 install-all:
183 @if [ ! -f $(TOP)/$(SRC)/.apaci.build.ok ]; then \
184 $(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) build; \
185 else \
186 :; \
187 fi
188 @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) \
189 install-mktree install-programs $(install-support) \
190 install-include install-data install-config
191 -@$(RM) $(SRC)/.apaci.install.tmp
192 -@$(RM) $(SRC)/.apaci.install.conf
193 -@if [ ".$(QUIET)" != .1 ]; then \
194 if [ ".$(TARGET)" = .httpd ]; then \
195 apachectl='apachectl'; \
196 else \
197 apachectl="$(TARGET)ctl"; \
198 fi; \
199 echo "+--------------------------------------------------------+"; \
200 echo "| You now have successfully built and installed the |"; \
201 echo "| Apache 1.3 HTTP server. To verify that Apache actually |"; \
202 echo "| works correctly you now should first check the |"; \
203 echo "| (initially created or preserved) configuration files |"; \
204 echo "| |"; \
205 echo "| $(sysconfdir)/$(TARGET).conf"; \
206 echo "| |"; \
207 echo "| and then you should be able to immediately fire up |"; \
208 echo "| Apache the first time by running: |"; \
209 echo "| |"; \
210 echo "| $(sbindir)/$${apachectl} start"; \
211 echo "| |"; \
212 echo "| Thanks for using Apache. The Apache Group |"; \
213 echo "| http://www.apache.org/ |"; \
214 echo "+--------------------------------------------------------+"; \
215 fi
216
217 # the non-verbose variant for package maintainers
218 install-quiet:
219 @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) QUIET=1 install-all
220
221 # create the installation tree
222 install-mktree:
223 @echo "===> [mktree: Creating Apache installation tree]"
224 $(MKDIR) $(root)$(bindir)
225 $(MKDIR) $(root)$(sbindir)
226 $(MKDIR) $(root)$(libexecdir)
227 $(MKDIR) $(root)$(mandir)/man1
228 $(MKDIR) $(root)$(mandir)/man8
229 $(MKDIR) $(root)$(sysconfdir)
230 $(MKDIR) $(root)$(htdocsdir)
231 $(MKDIR) $(root)$(manualdir)
232 $(MKDIR) $(root)$(iconsdir)
233 $(MKDIR) $(root)$(cgidir)
234 $(MKDIR) $(root)$(includedir)
235 $(MKDIR) $(root)$(includedir)/xml
236 $(MKDIR) $(root)$(runtimedir)
237 $(MKDIR) $(root)$(logfiledir)
238 $(MKDIR) $(root)$(proxycachedir)
239 -@if [ "x`$(AUX)/getuid.sh`" = "x0" ]; then \
240 echo "chown $(conf_user) $(root)$(proxycachedir)"; \
241 chown $(conf_user) $(root)$(proxycachedir); \
242 echo "chgrp $(conf_group) $(root)$(proxycachedir)"; \
243 chgrp "$(conf_group)" $(root)$(proxycachedir); \
244 fi
245 @echo "<=== [mktree]"
246
247 # install the server program and optionally corresponding
248 # shared object files.
249 install-programs:
250 @echo "===> [programs: Installing Apache $(TARGET) program and shared objects]"
251 -@if [ ".`grep '^[ ]*AddModule.*mod_so\.o' $(TOP)/$(SRC)/Configuration.apaci`" != . ]; then \
252 echo "$(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
253 $(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
254 SHLIB_EXPORT_FILES="`grep '^SHLIB_EXPORT_FILES=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \
255 if [ ".$${SHLIB_EXPORT_FILES}" != . ]; then \
256 $(CP) $(TOP)/$(SRC)/support/httpd.exp $(root)$(libexecdir)/; \
257 chmod 644 $(root)$(libexecdir)/httpd.exp; \
258 fi; \
259 else \
260 echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
261 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
262 fi
263 -@if [ ".`grep 'SUBTARGET=target_shared' $(TOP)/$(SRC)/Makefile`" != . ]; then \
264 SHLIB_SUFFIX_NAME="`grep '^SHLIB_SUFFIX_NAME=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \
265 SHLIB_SUFFIX_LIST="`grep '^SHLIB_SUFFIX_LIST=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \
266 echo "$(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep"; \
267 $(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep; \
268 echo "$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}"; \
269 $(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}; \
270 if [ ".$${SHLIB_SUFFIX_LIST}" != . ]; then \
271 echo "$(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*"; \
272 $(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*; \
273 for suffix in $${SHLIB_SUFFIX_LIST} ""; do \
274 [ ".$${suffix}" = . ] && continue; \
275 echo "$(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}"; \
276 $(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}; \
277 done; \
278 fi; \
279 fi
280 $(INSTALL_DATA) $(TOP)/$(SRC)/support/httpd.8 $(root)$(mandir)/man8/$(TARGET).8
281 -@$(RM) $(SRC)/.apaci.install.conf; touch $(SRC)/.apaci.install.conf
282 -@if [ ".`grep '^[ ]*SharedModule' $(TOP)/$(SRC)/Configuration.apaci`" != . ]; then \
283 for mod in `egrep '^[ ]*SharedModule' $(TOP)/$(SRC)/Configuration.apaci |\
284 sed -e 's/^[ ]*SharedModule[ ]*//'`; do \
285 file=`echo $${mod} | sed -e 's;^.*/\([^/]*\);\1;'`; \
286 echo "$(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}"; \
287 $(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}; \
288 name=`$(TOP)/$(AUX)/fmn.sh $(TOP)/$(SRC)/$${mod}`; \
289 echo dummy | awk '{ printf("LoadModule %-18s %s\n", modname, modpath); }' \
290 modname="$${name}" modpath="$(libexecdir_relative)$${file}" >>$(SRC)/.apaci.install.conf; \
291 done; \
292 echo "" >>$(SRC)/.apaci.install.conf; \
293 echo "# Reconstruction of the complete module list from all available modules" >>$(SRC)/.apaci.install.conf; \
294 echo "# (static and shared ones) to achieve correct module execution order." >>$(SRC)/.apaci.install.conf; \
295 echo "# [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]" >>$(SRC)/.apaci.install.conf; \
296 echo "ClearModuleList" >>$(SRC)/.apaci.install.conf; \
297 egrep "^[ ]*(Add|Shared)Module" $(SRC)/Configuration.apaci |\
298 sed -e 's:SharedModule:AddModule:' \
299 -e 's:modules/[^/]*/::' \
300 -e 's:[ ]lib: mod_:' \
301 -e 's:\.[dsoam].*$$:.c:' >>$(SRC)/.apaci.install.conf; \
302 fi
303 @echo "<=== [programs]"
304
305 # install the support programs and scripts
306 install-support:
307 @echo "===> [support: Installing Apache support programs and scripts]"
308 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/ab $(root)$(sbindir)/ab
309 $(INSTALL_DATA) $(TOP)/$(SRC)/support/ab.8 $(root)$(mandir)/man8/ab.8
310 @if [ ".$(TARGET)" = .httpd ]; then \
311 apachectl='apachectl'; \
312 else \
313 apachectl="$(TARGET)ctl"; \
314 fi; \
315 echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apachectl[*] $(root)$(sbindir)/$${apachectl}"; \
316 sed -e 's;PIDFILE=.*;PIDFILE=$(runtimedir)/$(TARGET).pid;' \
317 -e 's;HTTPD=.*;HTTPD=$(sbindir)/$(TARGET);' \
318 < $(TOP)/$(SRC)/support/apachectl > $(TOP)/$(SRC)/.apaci.install.tmp && \
319 $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/$${apachectl}; \
320 echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8"; \
321 $(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8
322 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/checkgid $(root)$(bindir)/checkgid
323 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htpasswd $(root)$(bindir)/htpasswd
324 $(INSTALL_DATA) $(TOP)/$(SRC)/support/htpasswd.1 $(root)$(mandir)/man1/htpasswd.1
325 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htdigest $(root)$(bindir)/htdigest
326 $(INSTALL_DATA) $(TOP)/$(SRC)/support/htdigest.1 $(root)$(mandir)/man1/htdigest.1
327 @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/dbmmanage[*] $(root)$(bindir)/dbmmanage"; \
328 sed -e 's;^#!/.*;#!$(PERL);' \
329 < $(TOP)/$(SRC)/support/dbmmanage > $(TOP)/$(SRC)/.apaci.install.tmp && \
330 $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(bindir)/dbmmanage
331 $(INSTALL_DATA) $(TOP)/$(SRC)/support/dbmmanage.1 $(root)$(mandir)/man1/dbmmanage.1
332 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/logresolve $(root)$(sbindir)/logresolve
333 $(INSTALL_DATA) $(TOP)/$(SRC)/support/logresolve.8 $(root)$(mandir)/man8/logresolve.8
334 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/rotatelogs $(root)$(sbindir)/rotatelogs
335 $(INSTALL_DATA) $(TOP)/$(SRC)/support/rotatelogs.8 $(root)$(mandir)/man8/rotatelogs.8
336 @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apxs[*] $(root)$(sbindir)/apxs"; \
337 sed -e 's;^#!/.*;#!$(PERL);' \
338 -e 's;\@prefix\@;$(prefix);' \
339 -e 's;\@sbindir\@;$(sbindir);' \
340 -e 's;\@libexecdir\@;$(libexecdir);' \
341 -e 's;\@includedir\@;$(includedir);' \
342 -e 's;\@sysconfdir\@;$(sysconfdir);' \
343 < $(TOP)/$(SRC)/support/apxs > $(TOP)/$(SRC)/.apaci.install.tmp && \
344 $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/apxs
345 $(INSTALL_DATA) $(TOP)/$(SRC)/support/apxs.8 $(root)$(mandir)/man8/apxs.8
346 -@if [ ".$(suexec)" = .1 ]; then \
347 echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec"; \
348 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec; \
349 echo "chown root $(root)$(sbindir)/suexec"; \
350 chown root $(root)$(sbindir)/suexec; \
351 echo "chmod 4711 $(root)$(sbindir)/suexec"; \
352 chmod 4711 $(root)$(sbindir)/suexec; \
353 echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8"; \
354 $(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8; \
355 fi
356 @echo "<=== [support]"
357
358 # install the support programs and scripts for binary distribution
359 install-binsupport:
360 @echo "===> [support: Installing Apache support programs and scripts for binary distribution]"
361 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/ab $(root)$(sbindir)/ab
362 $(INSTALL_DATA) $(TOP)/$(SRC)/support/ab.8 $(root)$(mandir)/man8/ab.8
363 @if [ ".$(TARGET)" = .httpd ]; then \
364 apachectl='apachectl'; \
365 else \
366 apachectl="$(TARGET)ctl"; \
367 fi; \
368 echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apachectl[*] $(root)$(sbindir)/$${apachectl}"; \
369 sed -e 's;PIDFILE=.*;PIDFILE=$(runtimedir)/$(TARGET).pid;' \
370 -e 's;HTTPD=.*;HTTPD=$(sbindir)/$(TARGET);' \
371 < $(TOP)/$(SRC)/support/apachectl > $(TOP)/$(SRC)/.apaci.install.tmp && \
372 $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/$${apachectl}; \
373 echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8"; \
374 $(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8
375 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/checkgid $(root)$(bindir)/checkgid
376 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htpasswd $(root)$(bindir)/htpasswd
377 $(INSTALL_DATA) $(TOP)/$(SRC)/support/htpasswd.1 $(root)$(mandir)/man1/htpasswd.1
378 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htdigest $(root)$(bindir)/htdigest
379 $(INSTALL_DATA) $(TOP)/$(SRC)/support/htdigest.1 $(root)$(mandir)/man1/htdigest.1
380 @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/dbmmanage[*] $(root)$(bindir)/dbmmanage"; \
381 $(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/dbmmanage $(root)$(bindir)/dbmmanage
382 $(INSTALL_DATA) $(TOP)/$(SRC)/support/dbmmanage.1 $(root)$(mandir)/man1/dbmmanage.1
383 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/logresolve $(root)$(sbindir)/logresolve
384 $(INSTALL_DATA) $(TOP)/$(SRC)/support/logresolve.8 $(root)$(mandir)/man8/logresolve.8
385 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/rotatelogs $(root)$(sbindir)/rotatelogs
386 $(INSTALL_DATA) $(TOP)/$(SRC)/support/rotatelogs.8 $(root)$(mandir)/man8/rotatelogs.8
387 @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apxs[*] $(root)$(sbindir)/apxs"; \
388 $(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apxs $(root)$(sbindir)/apxs
389 $(INSTALL_DATA) $(TOP)/$(SRC)/support/apxs.8 $(root)$(mandir)/man8/apxs.8
390 -@if [ ".$(suexec)" = .1 ]; then \
391 echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec"; \
392 $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec; \
393 echo "chown root $(root)$(sbindir)/suexec"; \
394 chown root $(root)$(sbindir)/suexec; \
395 echo "chmod 4711 $(root)$(sbindir)/suexec"; \
396 chmod 4711 $(root)$(sbindir)/suexec; \
397 echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8"; \
398 $(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8; \
399 fi
400 @echo "<=== [support]"
401
402 # install the Apache C header files
403 install-include:
404 @echo "===> [include: Installing Apache C header files]"
405 $(CP) $(TOP)/$(SRC)/include/*.h $(root)$(includedir)/
406 $(CP) $(TOP)/$(SRC)/lib/expat-lite/*.h $(root)$(includedir)/xml/
407 @osdir=`grep '^OSDIR=' $(TOP)/$(SRC)/Makefile.config | sed -e 's:^OSDIR=.*/os/:os/:'`; \
408 echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/"; \
409 $(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/; \
410 echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os-inline.c $(root)$(includedir)/"; \
411 $(CP) $(TOP)/$(SRC)/$${osdir}/os-inline.c $(root)$(includedir)/
412 chmod 644 $(root)$(includedir)/*.h $(root)$(includedir)/xml/*.h
413 @echo "<=== [include]"
414
415 # create an initial document root containing the Apache manual,
416 # icons and distributed CGI scripts.
417 install-data:
418 @echo "===> [data: Installing initial data files]"
419 -@if [ -f $(root)$(htdocsdir)/index.html ] || [ -f $(root)$(htdocsdir)/index.html.en ]; then \
420 echo "[PRESERVING EXISTING DATA SUBDIR: $(root)$(htdocsdir)/]"; \
421 else \
422 echo "Copying tree $(TOP)/htdocs/ -> $(root)$(htdocsdir)/"; \
423 (cd $(TOP)/htdocs/ && $(TAR) $(TAROPT) - index* apache_pb.* ) |\
424 (cd $(root)$(htdocsdir)/ && $(TAR) -xf -); \
425 find $(root)$(htdocsdir)/ -type d -exec chmod a+rx {} \; ; \
426 find $(root)$(htdocsdir)/ -type f -print | xargs chmod a+r ; \
427 fi
428 -@if [ -d $(TOP)/htdocs/manual ]; then \
429 echo "Copying tree $(TOP)/htdocs/manual -> $(root)/$(manualdir)/"; \
430 (cd $(TOP)/htdocs/manual/ && $(TAR) $(TAROPT) - *) |\
431 (cd $(root)$(manualdir)/ && $(TAR) -xf -); \
432 find $(root)$(manualdir)/ -type d -exec chmod a+rx {} \; ; \
433 find $(root)$(manualdir)/ -type f -print | xargs chmod a+r ; \
434 fi
435 -@if [ -f $(root)$(cgidir)/printenv ]; then \
436 echo "[PRESERVING EXISTING CGI SUBDIR: $(root)$(cgidir)/]"; \
437 else \
438 for script in printenv test-cgi; do \
439 cat $(TOP)/cgi-bin/$${script} |\
440 sed -e 's;^#!/.*perl;#!$(PERL);' \
441 > $(TOP)/$(SRC)/.apaci.install.tmp; \
442 echo "$(INSTALL_DATA) $(TOP)/conf/$${script}[*] $(root)$(cgidir)/$${script}"; \
443 $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(cgidir)/$${script}; \
444 done; \
445 fi
446 @echo "Copying tree $(TOP)/icons/ -> $(root)$(iconsdir)/"; \
447 (cd $(TOP)/icons/ && $(TAR) $(TAROPT) - *) |\
448 (cd $(root)$(iconsdir)/ && $(TAR) -xf -); \
449 find $(root)$(iconsdir)/ -type d -exec chmod a+rx {} \; ;\
450 find $(root)$(iconsdir)/ -type f -exec chmod a+r {} \;
451 @echo "<=== [data]"
452
453 # create the initial configuration by providing default files
454 # and initial config files while preserving existing ones.
455 install-config:
456 @echo "===> [config: Installing Apache configuration files]"
457 -@for conf in httpd.conf access.conf srm.conf; do \
458 if [ .$$conf = .httpd.conf ]; then \
459 target_conf="$(TARGET).conf"; \
460 else \
461 target_conf="$$conf"; \
462 fi; \
463 if [ ".$(TARGET)" = .httpd ]; then \
464 target_prefix=""; \
465 else \
466 target_prefix="$(TARGET)_"; \
467 fi; \
468 (echo "##"; \
469 echo "## $${target_conf} -- Apache HTTP server configuration file"; \
470 echo "##"; \
471 echo ""; \
472 cat $(TOP)/conf/$${conf}-dist ) |\
473 sed -e '/# LoadModule/r $(TOP)/$(SRC)/.apaci.install.conf' \
474 -e 's;@@ServerRoot@@/htdocs/manual;$(manualdir);' \
475 -e 's;@@ServerRoot@@/htdocs;$(htdocsdir);' \
476 -e 's;@@ServerRoot@@/icons;$(iconsdir);' \
477 -e 's;@@ServerRoot@@/cgi-bin;$(cgidir);' \
478 -e 's;@@ServerRoot@@/proxy;$(proxycachedir);' \
479 -e 's;@@ServerRoot@@;$(prefix);g' \
480 -e 's;httpd\.conf;$(TARGET).conf;' \
481 -e 's;logs/accept\.lock;$(runtimedir)/$(TARGET).lock;' \
482 -e 's;logs/apache_runtime_status;$(runtimedir)/$(TARGET).scoreboard;' \
483 -e 's;logs/httpd\.pid;$(runtimedir)/$(TARGET).pid;' \
484 -e "s;logs/access_log;$(logfiledir)/$${target_prefix}access_log;" \
485 -e "s;logs/error_log;$(logfiledir)/$${target_prefix}error_log;" \
486 -e "s;logs/referer_log;$(logfiledir)/$${target_prefix}referer_log;" \
487 -e "s;logs/agent_log;$(logfiledir)/$${target_prefix}agent_log;" \
488 -e 's;conf/magic;$(sysconfdir)/magic;' \
489 -e 's;conf/srm.conf;$(sysconfdir)/srm.conf;' \
490 -e 's;conf/access.conf;$(sysconfdir)/access.conf;' \
491 -e 's;conf/mime\.types;$(sysconfdir)/mime.types;' \
492 -e 's;User nobody;User $(conf_user);' \
493 -e 's;Group #-1;Group $(conf_group);' \
494 -e 's;^Group "#-1";Group $(conf_group);' \
495 -e 's;Port 80;Port $(conf_port);' \
496 -e 's;ServerAdmin you@your.address;ServerAdmin $(conf_serveradmin);' \
497 -e 's;ServerName new.host.name;ServerName $(conf_servername);' \
498 > $(TOP)/$(SRC)/.apaci.install.tmp && \
499 echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}.default"; \
500 $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}.default; \
501 if [ ! -f "$(root)$(sysconfdir)/$${target_conf}" ]; then \
502 echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}"; \
503 $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}; \
504 else \
505 echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${target_conf}]"; \
506 fi; \
507 done
508 -@for conf in mime.types magic; do \
509 echo "$(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}.default"; \
510 $(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}.default; \
511 if [ ! -f "$(root)$(sysconfdir)/$${conf}" ]; then \
512 echo "$(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}"; \
513 $(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}; \
514 else \
515 echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${conf}]"; \
516 fi; \
517 done
518 @echo "<=== [config]"
519
520
521 ## ------------------------------------------------------------------
522 ## Cleanup Targets
523 ## ------------------------------------------------------------------
524
525 # cleanup the source tree by removing anything which was
526 # created by the build target
527 clean:
528 @echo "===> $(SRC)"
529 @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) clean-std $(clean-support)
530 @echo "<=== $(SRC)"
531 @$(RM) $(TOP)/$(SRC)/.apaci.build.ok
532
533 # clean the standard stuff
534 clean-std:
535 @cd $(TOP)/$(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ clean
536
537 # clean additional support stuff
538 clean-support:
539 @echo "===> $(SRC)/support"; \
540 cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) clean; \
541 if [ ".$(suexec)" = .1 ]; then \
542 echo "$(RM) suexec"; \
543 $(RM) suexec; \
544 fi; \
545 echo "<=== $(SRC)/support"
546
547 # cleanup the source tree by removing anything which was
548 # created by the configure step and the build target.
549 # When --shadow is used we just remove the complete shadow tree.
550 distclean:
551 @if [ ".$(SRC)" = .src ]; then \
552 $(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) distclean-normal; \
553 else \
554 $(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) distclean-shadow; \
555 fi
556
557 distclean-normal:
558 @echo "===> $(SRC)"
559 @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) distclean-std $(distclean-support)
560 @echo "<=== $(SRC)"
561 -$(RM) $(SRC)/Configuration.apaci
562 -$(RM) $(SRC)/apaci
563 @$(RM) $(SRC)/.apaci.build.ok
564 -$(RM) Makefile
565 -$(RM) config.status
566
567 # clean the standard stuff
568 distclean-std:
569 @cd $(TOP)/$(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ distclean
570
571 distclean-support:
572 @echo "===> $(SRC)/support"; \
573 cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) distclean; \
574 if [ ".$(suexec)" = .1 ]; then \
575 echo "$(RM) suexec"; \
576 $(RM) suexec; \
577 fi; \
578 echo "<=== $(SRC)/support"
579
580 distclean-shadow:
581 $(RM) -r $(SRC)
582 $(RM) $(TOP)/$(MKF)
583 -@if [ ".`ls $(TOP)/src.* 2>/dev/null`" = . ]; then \
584 echo "$(RM) Makefile"; \
585 $(RM) Makefile; \
586 fi
587
Something went wrong with that request. Please try again.