]> granicus.if.org Git - apache/blob - Makefile.in
With OpenSSL 1.0.2 or later, enable OCSP stapling in a loop based on
[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$(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                                 for j in $(DSO_MODULES) "^EOL^"; do \
62                                         if test $$j != "^EOL^"; then \
63                                                 if echo ",$(ENABLED_DSO_MODULES),"|$(EGREP) ",$$j," > /dev/null ; then \
64                                                         loading_disabled=""; \
65                                                 else \
66                                                         loading_disabled="#"; \
67                                                 fi; \
68                                                 if test "$(LOAD_ALL_MODULES)" = "yes"; then \
69                                                         loading_disabled=""; \
70                                                 fi; \
71                                                 echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
72                                         fi; \
73                                 done; \
74                                 sed -e '1,/@@LoadModule@@/d' \
75                                         -e '/@@LoadModule@@/d' \
76                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
77                                         -e 's#@@Port@@#$(PORT)#g' \
78                                         -e 's#@@SSLPort@@#$(SSLPORT)#g' \
79                                         < $$i; \
80                         fi \
81                 ) > $(DESTDIR)$(sysconfdir)/original/$$i; \
82                 chmod 0644 $(DESTDIR)$(sysconfdir)/original/$$i; \
83                 file=$$i; \
84                 if [ "$$i" = "httpd.conf" ]; then \
85                         file=`echo $$i|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
86                 fi; \
87                 if test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
88                         $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/original/$$i $(DESTDIR)$(sysconfdir)/$$file; \
89                 fi; \
90                 fi; \
91             done ; \
92         done ; \
93         if test -f "$(builddir)/envvars-std"; then \
94             cp -p envvars-std $(DESTDIR)$(sbindir); \
95             if test ! -f $(DESTDIR)$(sbindir)/envvars; then \
96                 cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \
97             fi ; \
98         fi
99
100 # Create a sanitized config_vars.mk
101 build/config_vars.out: build/config_vars.mk
102         @$(SHELL) build/config_vars.sh < build/config_vars.mk > build/config_vars.out
103
104 install-build: build/config_vars.out
105         @echo Installing build system files
106         @$(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir)
107         @$(INSTALL_DATA) $(top_srcdir)/build/*.mk build/*.mk \
108                 $(DESTDIR)$(installbuilddir)
109         @$(INSTALL_PROGRAM) $(top_builddir)/config.nice \
110                 $(top_srcdir)/build/mkdir.sh \
111                 $(top_srcdir)/build/instdso.sh \
112                 $(DESTDIR)$(installbuilddir)
113         @$(INSTALL_DATA) build/config_vars.out $(DESTDIR)$(installbuilddir)/config_vars.mk
114         @rm build/config_vars.out
115
116 htdocs-srcdir = $(top_srcdir)/docs/docroot
117
118 docs:
119         @if test -d $(top_srcdir)/docs/manual/build; then \
120             cd $(top_srcdir)/docs/manual/build && ./build.sh all; \
121         else \
122             echo 'For details on generating the docs, please read:'; \
123             echo '  http://httpd.apache.org/docs-project/docsformat.html'; \
124         fi
125
126 validate-xml:
127         @if test -d $(top_srcdir)/docs/manual/build; then \
128             cd $(top_srcdir)/docs/manual/build && ./build.sh validate-xml; \
129         else \
130             echo 'For details on generating the docs, please read:'; \
131             echo '  http://httpd.apache.org/docs-project/docsformat.html'; \
132         fi
133
134 dox:
135         doxygen $(top_srcdir)/docs/doxygen.conf
136
137 install-htdocs:
138         -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
139            echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
140         else \
141             echo Installing HTML documents ; \
142             $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
143             if test -d $(htdocs-srcdir) && test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
144                 $(RSYNC) --exclude .svn -rlpt --numeric-ids $(htdocs-srcdir)/ $(DESTDIR)$(htdocsdir)/; \
145             else \
146                 test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
147                 cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
148             fi; \
149         fi
150
151 install-error:
152         -@if [ -d $(DESTDIR)$(errordir) ]; then \
153            echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
154         else \
155             echo Installing error documents ; \
156             $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
157             cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
158             test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
159         fi
160
161 install-icons:
162         -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
163            echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
164         else \
165             echo Installing icons ; \
166             $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
167             cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
168             test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
169         fi
170
171 install-cgi:
172         -@if [ -d $(DESTDIR)$(cgidir) ];then \
173             echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
174         else \
175            echo Installing CGIs ; \
176            $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
177            cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
178            test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
179         fi
180
181 install-other:
182         @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
183         @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
184         @for ext in dll x; do \
185                 file=apachecore.$$ext; \
186                 if test -f $$file; then \
187                         cp -p $$file $(DESTDIR)$(libdir); \
188                 fi; \
189         done; \
190         file=httpd.dll; \
191         if test -f $$file; then \
192                 cp -p $$file $(DESTDIR)$(bindir); \
193         fi;
194
195 INSTALL_HEADERS = \
196         include/*.h \
197         $(srcdir)/include/*.h \
198         $(srcdir)/os/$(OS_DIR)/os.h \
199         $(srcdir)/modules/arch/unix/mod_unixd.h \
200         $(srcdir)/modules/core/mod_so.h \
201         $(srcdir)/modules/core/mod_watchdog.h \
202         $(srcdir)/modules/cache/mod_cache.h \
203         $(srcdir)/modules/cache/cache_common.h \
204         $(srcdir)/modules/database/mod_dbd.h \
205         $(srcdir)/modules/dav/main/mod_dav.h \
206         $(srcdir)/modules/filters/mod_include.h \
207         $(srcdir)/modules/filters/mod_xml2enc.h \
208         $(srcdir)/modules/generators/mod_cgi.h \
209         $(srcdir)/modules/generators/mod_status.h \
210         $(srcdir)/modules/loggers/mod_log_config.h \
211         $(srcdir)/modules/mappers/mod_rewrite.h \
212         $(srcdir)/modules/proxy/mod_proxy.h \
213         $(srcdir)/modules/proxy/mod_serf.h \
214         $(srcdir)/modules/session/mod_session.h \
215         $(srcdir)/modules/ssl/mod_ssl.h \
216         $(srcdir)/os/$(OS_DIR)/*.h
217
218 install-include:
219         @echo Installing header files
220         @$(MKINSTALLDIRS) $(DESTDIR)$(includedir)
221         @$(INSTALL_DATA) $(INSTALL_HEADERS) $(DESTDIR)$(includedir)
222
223 install-man:
224         @echo Installing man pages and online manual
225         @test -d $(DESTDIR)$(mandir)      || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
226         @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
227         @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
228         @test -d $(DESTDIR)$(manualdir)   || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
229         @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
230         @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
231         @if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
232           $(RSYNC) --exclude .svn -rlpt --numeric-ids $(top_srcdir)/docs/manual/ $(DESTDIR)$(manualdir)/; \
233         else \
234           cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir); \
235           cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
236         fi
237
238 install-suexec: install-suexec-binary install-suexec-$(INSTALL_SUEXEC)
239
240 install-suexec-binary:
241         @if test -f $(builddir)/support/suexec; then \
242             test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
243             $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
244         fi
245
246 install-suexec-setuid:
247         @if test -f $(builddir)/support/suexec; then \
248             chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
249         fi
250
251 install-suexec-caps:
252         @if test -f $(builddir)/support/suexec; then \
253             setcap 'cap_setuid,cap_setgid+pe' $(DESTDIR)$(sbindir)/suexec; \
254         fi
255
256 suexec:
257         cd support && $(MAKE) suexec
258
259 x-local-distclean:
260         @rm -rf autom4te.cache
261
262 update-log-tags update-log-msg-tags:
263         find server modules os -name \*.c|xargs perl \
264                 docs/log-message-tags/update-log-msg-tags
265
266 # XXX: This looks awfully platform-specific [read: bad form and style]
267 include $(top_srcdir)/os/os2/core.mk