2 SUBDIRS = srclib os server modules support
5 PROGRAM_NAME = $(progname)
6 PROGRAM_SOURCES = modules.c
7 PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(PCRE_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
8 PROGRAM_PRELINK = $(COMPILE) -c $(top_srcdir)/server/buildmark.c
9 PROGRAM_DEPENDENCIES = \
15 PROGRAMS = $(PROGRAM_NAME)
16 TARGETS = $(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 \
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
26 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists \
29 include $(top_builddir)/build/rules.mk
30 include $(top_srcdir)/build/program.mk
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); \
42 for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
44 for i in httpd.conf extra/*.conf; do \
45 if [ -f $$i ] ; then \
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' \
55 sed -n -e '/@@LoadModule@@/q' \
56 -e 's#@@ServerRoot@@#$(prefix)#g' \
57 -e 's#@@Port@@#$(PORT)#g' \
58 -e 's#@@SSLPort@@#$(SSLPORT)#g' \
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=""; \
66 loading_disabled="#"; \
68 if test "$(LOAD_ALL_MODULES)" = "yes"; then \
69 loading_disabled=""; \
71 echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
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' \
81 ) > $(DESTDIR)$(sysconfdir)/original/$$i; \
82 chmod 0644 $(DESTDIR)$(sysconfdir)/original/$$i; \
84 if [ "$$i" = "httpd.conf" ]; then \
85 file=`echo $$i|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
87 if test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
88 $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/original/$$i $(DESTDIR)$(sysconfdir)/$$file; \
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 ; \
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
104 install-build: build/config_vars.out
105 @echo Installing build system files
106 @$(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir)
107 @for f in $(top_srcdir)/build/*.mk build/*.mk; do \
108 $(INSTALL_DATA) $$f $(DESTDIR)$(installbuilddir); \
110 @for f in $(top_builddir)/config.nice \
111 $(top_srcdir)/build/mkdir.sh \
112 $(top_srcdir)/build/instdso.sh; do \
113 $(INSTALL_PROGRAM) $$f $(DESTDIR)$(installbuilddir); \
115 @$(INSTALL_DATA) build/config_vars.out $(DESTDIR)$(installbuilddir)/config_vars.mk
116 @rm build/config_vars.out
118 htdocs-srcdir = $(top_srcdir)/docs/docroot
121 @if test -d $(top_srcdir)/docs/manual/build; then \
122 cd $(top_srcdir)/docs/manual/build && ./build.sh all; \
124 echo 'For details on generating the docs, please read:'; \
125 echo ' http://httpd.apache.org/docs-project/docsformat.html'; \
129 doxygen $(top_srcdir)/docs/doxygen.conf
132 -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
133 echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
135 echo Installing HTML documents ; \
136 $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
137 if test -d $(htdocs-srcdir) && test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
138 $(RSYNC) --exclude .svn -rlpt --numeric-ids $(htdocs-srcdir)/ $(DESTDIR)$(htdocsdir)/; \
140 test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
141 cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
146 -@if [ -d $(DESTDIR)$(errordir) ]; then \
147 echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
149 echo Installing error documents ; \
150 $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
151 cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
152 test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
156 -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
157 echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
159 echo Installing icons ; \
160 $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
161 cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
162 test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
166 -@if [ -d $(DESTDIR)$(cgidir) ];then \
167 echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
169 echo Installing CGIs ; \
170 $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
171 cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
172 test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
176 @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
177 @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
178 @for ext in dll x; do \
179 file=apachecore.$$ext; \
180 if test -f $$file; then \
181 cp -p $$file $(DESTDIR)$(libdir); \
185 if test -f $$file; then \
186 cp -p $$file $(DESTDIR)$(bindir); \
191 $(srcdir)/include/*.h \
192 $(srcdir)/os/$(OS_DIR)/os.h \
193 $(srcdir)/modules/arch/unix/mod_unixd.h \
194 $(srcdir)/modules/core/mod_so.h \
195 $(srcdir)/modules/core/mod_watchdog.h \
196 $(srcdir)/modules/cache/mod_cache.h \
197 $(srcdir)/modules/database/mod_dbd.h \
198 $(srcdir)/modules/dav/main/mod_dav.h \
199 $(srcdir)/modules/filters/mod_include.h \
200 $(srcdir)/modules/generators/mod_cgi.h \
201 $(srcdir)/modules/generators/mod_status.h \
202 $(srcdir)/modules/loggers/mod_log_config.h \
203 $(srcdir)/modules/mappers/mod_rewrite.h \
204 $(srcdir)/modules/proxy/mod_proxy.h \
205 $(srcdir)/modules/proxy/mod_serf.h \
206 $(srcdir)/modules/session/mod_session.h \
207 $(srcdir)/modules/ssl/mod_ssl.h \
208 $(srcdir)/os/$(OS_DIR)/*.h
211 @echo Installing header files
212 @$(MKINSTALLDIRS) $(DESTDIR)$(includedir)
213 @for hdr in $(INSTALL_HEADERS); do \
214 $(INSTALL_DATA) $$hdr $(DESTDIR)$(includedir); \
218 @echo Installing man pages and online manual
219 @test -d $(DESTDIR)$(mandir) || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
220 @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
221 @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
222 @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
223 @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
224 @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
225 @if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
226 $(RSYNC) --exclude .svn -rlpt --numeric-ids $(top_srcdir)/docs/manual/ $(DESTDIR)$(manualdir)/; \
228 cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir); \
229 cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
233 @if test -f $(builddir)/support/suexec; then \
234 test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
235 $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
236 chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
240 cd support && $(MAKE) suexec
243 @rm -rf autom4te.cache
245 update-log-tags update-log-msg-tags:
246 find server modules os -name \*.c|xargs perl \
247 docs/log-message-tags/update-log-msg-tags
249 # XXX: This looks awfully platform-specific [read: bad form and style]
250 include $(top_srcdir)/os/os2/core.mk