]> granicus.if.org Git - apache/blob - Makefile.in
make docs
[apache] / Makefile.in
1
2 SUBDIRS = srclib os server modules support
3 CLEAN_SUBDIRS = test
4
5 PROGRAM_NAME         = $(progname)
6 PROGRAM_SOURCES      = modules.c
7 PROGRAM_LDADD        = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(HTTPD_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
8 PROGRAM_PRELINK      = $(COMPILE) -c $(top_srcdir)/server/buildmark.c
9 PROGRAM_DEPENDENCIES = \
10   server/libmain.la \
11   $(BUILTIN_LIBS) \
12   $(MPM_LIB) \
13   os/$(OS_DIR)/libos.la
14
15 sbin_PROGRAMS   = $(PROGRAM_NAME)
16 TARGETS         = $(sbin_PROGRAMS) $(shared_build) $(other_targets)
17 INSTALL_TARGETS = install-conf install-htdocs install-error install-icons \
18         install-other install-cgi install-include install-suexec install-build \
19         install-man
20
21 DISTCLEAN_TARGETS  = include/ap_config_auto.h include/ap_config_layout.h \
22         include/apache_probes.h \
23         modules.c config.cache config.log config.status build/config_vars.mk \
24         build/rules.mk docs/conf/httpd.conf docs/conf/extra/*.conf shlibtool \
25         build/pkg/pkginfo build/config_vars.sh bsd_converted
26 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists \
27         httpd.spec
28
29 include $(top_builddir)/build/rules.mk
30 include $(top_srcdir)/build/program.mk
31
32 install-conf:
33         @echo Installing configuration files
34         @$(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(sysconfdir)/extra
35         @$(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir)/original/extra
36         @cd $(top_srcdir)/docs/conf; \
37         for i in mime.types magic; do \
38             if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
39                 $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
40             fi; \
41         done; \
42         for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
43             cd $$j ; \
44             for i in httpd.conf extra/*.conf; do \
45                 if [ -f $$i ] ; then \
46                 ( \
47                         n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
48                         if test $$n_lm -eq 0 -o "x$(MPM_MODULE)$(DSO_MODULES)" = "x"; then \
49                                 sed -e 's#@@ServerRoot@@#$(prefix)#g' \
50                                         -e 's#@@Port@@#$(PORT)#g' \
51                                         -e 's#@@SSLPort@@#$(SSLPORT)#g' \
52                                         -e '/@@LoadModule@@/d' \
53                                         < $$i; \
54                         else \
55                                 sed -n -e '/@@LoadModule@@/q' \
56                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
57                                         -e 's#@@Port@@#$(PORT)#g' \
58                                         -e 's#@@SSLPort@@#$(SSLPORT)#g' \
59                                         -e 'p' \
60                                         < $$i; \
61                                 if echo " $(DSO_MODULES) "|$(EGREP) " cgi " > /dev/null ; then \
62                                         have_cgi="1"; \
63                                 else \
64                                         have_cgi="0"; \
65                                 fi; \
66                                 if echo " $(DSO_MODULES) "|$(EGREP) " cgid " > /dev/null ; then \
67                                         have_cgid="1"; \
68                                 else \
69                                         have_cgid="0"; \
70                                 fi; \
71                                 for j in $(MPM_MODULES) "^EOL^"; do \
72                                         if test $$j != "^EOL^"; then \
73                                                 if echo ",$(ENABLED_MPM_MODULE),"|$(EGREP) ",$$j," > /dev/null ; then \
74                                                         loading_disabled=""; \
75                                                 else \
76                                                         loading_disabled="#"; \
77                                                 fi; \
78                                                 echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
79                                         fi; \
80                                 done; \
81                                 for j in $(DSO_MODULES) "^EOL^"; do \
82                                         if test $$j != "^EOL^"; then \
83                                                 if echo ",$(ENABLED_DSO_MODULES),"|$(EGREP) ",$$j," > /dev/null ; then \
84                                                         loading_disabled=""; \
85                                                 else \
86                                                         loading_disabled="#"; \
87                                                         if test "$(LOAD_ALL_MODULES)" = "yes"; then \
88                                                                 loading_disabled=""; \
89                                                         fi; \
90                                                 fi; \
91                                                 if test $$j = "cgid" -a "$$have_cgi" = "1"; then \
92                                                         echo "<IfModule !mpm_prefork_module>"; \
93                                                         echo "  $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
94                                                         echo "</IfModule>"; \
95                                                 elif test $$j = "cgi" -a "$$have_cgid" = "1"; then \
96                                                         echo "<IfModule mpm_prefork_module>"; \
97                                                         echo "  $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
98                                                         echo "</IfModule>"; \
99                                                 else \
100                                                         echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
101                                                 fi; \
102                                         fi; \
103                                 done; \
104                                 sed -e '1,/@@LoadModule@@/d' \
105                                         -e '/@@LoadModule@@/d' \
106                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
107                                         -e 's#@@Port@@#$(PORT)#g' \
108                                         -e 's#@@SSLPort@@#$(SSLPORT)#g' \
109                                         < $$i; \
110                         fi \
111                 ) > $(DESTDIR)$(sysconfdir)/original/$$i; \
112                 chmod 0644 $(DESTDIR)$(sysconfdir)/original/$$i; \
113                 file=$$i; \
114                 if [ "$$i" = "httpd.conf" ]; then \
115                         file=`echo $$i|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
116                 fi; \
117                 if test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
118                         $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/original/$$i $(DESTDIR)$(sysconfdir)/$$file; \
119                 fi; \
120                 fi; \
121             done ; \
122         done ; \
123         if test -f "$(builddir)/envvars-std"; then \
124             cp -p envvars-std $(DESTDIR)$(sbindir); \
125             if test ! -f $(DESTDIR)$(sbindir)/envvars; then \
126                 cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \
127             fi ; \
128         fi
129
130 # Create a sanitized config_vars.mk
131 build/config_vars.out: build/config_vars.mk
132         @$(SHELL) build/config_vars.sh < build/config_vars.mk > build/config_vars.out
133
134 install-build: build/config_vars.out
135         @echo Installing build system files
136         @$(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir)
137         @$(INSTALL_DATA) $(top_srcdir)/build/*.mk build/*.mk \
138                 $(DESTDIR)$(installbuilddir)
139         @$(INSTALL_PROGRAM) $(top_builddir)/config.nice \
140                 $(top_srcdir)/build/mkdir.sh \
141                 $(top_srcdir)/build/instdso.sh \
142                 $(DESTDIR)$(installbuilddir)
143         @$(INSTALL_DATA) build/config_vars.out $(DESTDIR)$(installbuilddir)/config_vars.mk
144         @rm build/config_vars.out
145
146 htdocs-srcdir = $(top_srcdir)/docs/docroot
147
148 docs:
149         @if test -d $(top_srcdir)/docs/manual/build; then \
150             cd $(top_srcdir)/docs/manual/build && ./build.sh all; \
151         else \
152             echo 'For details on generating the docs, please read:'; \
153             echo '  http://httpd.apache.org/docs-project/docsformat.html'; \
154         fi
155
156 validate-xml:
157         @if test -d $(top_srcdir)/docs/manual/build; then \
158             cd $(top_srcdir)/docs/manual/build && ./build.sh validate-xml; \
159         else \
160             echo 'For details on generating the docs, please read:'; \
161             echo '  http://httpd.apache.org/docs-project/docsformat.html'; \
162         fi
163
164 dox:
165         doxygen $(top_srcdir)/docs/doxygen.conf
166
167 install-htdocs:
168         -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
169            echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
170         else \
171             echo Installing HTML documents ; \
172             $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
173             if test -d $(htdocs-srcdir) && test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
174                 $(RSYNC) --exclude .svn -rlpt --numeric-ids $(htdocs-srcdir)/ $(DESTDIR)$(htdocsdir)/; \
175             else \
176                 test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
177                 cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
178             fi; \
179         fi
180
181 install-error:
182         -@if [ -d $(DESTDIR)$(errordir) ]; then \
183            echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
184         else \
185             echo Installing error documents ; \
186             $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
187             cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
188             test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
189         fi
190
191 install-icons:
192         -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
193            echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
194         else \
195             echo Installing icons ; \
196             $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
197             cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
198             test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
199         fi
200
201 install-cgi:
202         -@if [ -d $(DESTDIR)$(cgidir) ];then \
203             echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
204         else \
205            echo Installing CGIs ; \
206            $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
207            cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
208            test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
209         fi
210
211 install-other:
212         @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
213         @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
214         @for ext in dll x; do \
215                 file=apachecore.$$ext; \
216                 if test -f $$file; then \
217                         cp -p $$file $(DESTDIR)$(libdir); \
218                 fi; \
219         done; \
220         file=httpd.dll; \
221         if test -f $$file; then \
222                 cp -p $$file $(DESTDIR)$(bindir); \
223         fi;
224
225 INSTALL_HEADERS = \
226         include/*.h \
227         $(srcdir)/include/*.h \
228         $(srcdir)/os/$(OS_DIR)/os.h \
229         $(srcdir)/modules/arch/unix/mod_unixd.h \
230         $(srcdir)/modules/core/mod_so.h \
231         $(srcdir)/modules/core/mod_watchdog.h \
232         $(srcdir)/modules/cache/mod_cache.h \
233         $(srcdir)/modules/cache/cache_common.h \
234         $(srcdir)/modules/database/mod_dbd.h \
235         $(srcdir)/modules/dav/main/mod_dav.h \
236         $(srcdir)/modules/http2/mod_http2.h \
237         $(srcdir)/modules/filters/mod_include.h \
238         $(srcdir)/modules/filters/mod_xml2enc.h \
239         $(srcdir)/modules/generators/mod_cgi.h \
240         $(srcdir)/modules/generators/mod_status.h \
241         $(srcdir)/modules/loggers/mod_log_config.h \
242         $(srcdir)/modules/mappers/mod_rewrite.h \
243         $(srcdir)/modules/proxy/mod_proxy.h \
244         $(srcdir)/modules/proxy/mod_serf.h \
245         $(srcdir)/modules/session/mod_session.h \
246         $(srcdir)/modules/ssl/mod_ssl.h \
247         $(srcdir)/modules/ssl/mod_ssl_openssl.h \
248         $(srcdir)/os/$(OS_DIR)/*.h
249
250 install-include:
251         @echo Installing header files
252         @$(MKINSTALLDIRS) $(DESTDIR)$(includedir)
253         @$(INSTALL_DATA) $(INSTALL_HEADERS) $(DESTDIR)$(includedir)
254
255 install-man:
256         @echo Installing man pages and online manual
257         @test -d $(DESTDIR)$(mandir)      || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
258         @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
259         @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
260         @test -d $(DESTDIR)$(manualdir)   || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
261         @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
262         @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
263         @if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
264           $(RSYNC) --exclude .svn -rlpt --numeric-ids $(top_srcdir)/docs/manual/ $(DESTDIR)$(manualdir)/; \
265         else \
266           cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir); \
267           cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
268         fi
269
270 install-suexec: install-suexec-binary install-suexec-$(INSTALL_SUEXEC)
271
272 install-suexec-binary:
273         @if test -f $(builddir)/support/suexec; then \
274             test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
275             $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
276         fi
277
278 install-suexec-setuid:
279         @if test -f $(builddir)/support/suexec; then \
280             chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
281         fi
282
283 install-suexec-caps:
284         @if test -f $(builddir)/support/suexec; then \
285             setcap 'cap_setuid,cap_setgid+pe' $(DESTDIR)$(sbindir)/suexec; \
286         fi
287
288 suexec:
289         cd support && $(MAKE) suexec
290
291 x-local-distclean:
292         @rm -rf autom4te.cache
293
294 update-log-tags update-log-msg-tags:
295         find server modules os -name \*.c|xargs perl \
296                 docs/log-message-tags/update-log-msg-tags
297
298 # XXX: This looks awfully platform-specific [read: bad form and style]
299 include $(top_srcdir)/os/os2/core.mk