2 SUBDIRS = srclib os server modules support
5 PROGRAM_NAME = $(progname)
6 PROGRAM_SOURCES = modules.c
7 PROGRAM_LDADD = $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
8 PROGRAM_DEPENDENCIES = \
14 PROGRAMS = $(PROGRAM_NAME)
15 TARGETS = $(PROGRAMS) $(shared_build) $(other_targets)
16 INSTALL_TARGETS = install-conf install-htdocs install-error install-icons \
17 install-other install-cgi install-include install-suexec install-man \
20 DISTCLEAN_TARGETS = include/ap_config_auto.h include/ap_config_layout.h \
21 modules.c config.cache config.log config.status build/config_vars.mk \
22 build/rules.mk docs/conf/httpd-std.conf docs/conf/ssl-std.conf shlibtool
23 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists \
26 include $(top_builddir)/build/rules.mk
27 include $(top_srcdir)/build/program.mk
30 @echo Installing configuration files ; \
31 if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
32 $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) ; \
34 cd $(top_srcdir)/docs/conf; \
35 for i in mime.types magic; do \
36 if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
37 $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
40 for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
42 for i in *-std*.conf; do \
44 n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
45 if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \
46 sed -e 's#@@ServerRoot@@#$(prefix)#g' \
47 -e 's#@@Port@@#$(PORT)#g' \
48 -e '/@@LoadModule@@/d' \
51 sed -n -e '/@@LoadModule@@/q' \
52 -e 's#@@ServerRoot@@#$(prefix)#g' \
53 -e 's#@@Port@@#$(PORT)#g' \
56 for j in $(DSO_MODULES) "^EOL^"; do \
57 if test "x$$j" = "xssl"; then \
58 echo "<IfDefine SSL>"; \
60 if test $$j != "^EOL^"; then \
61 echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
63 if test "x$$j" = "xssl"; then \
67 sed -e '1,/@@LoadModule@@/d' \
68 -e '/@@LoadModule@@/d' \
69 -e 's#@@ServerRoot@@#$(prefix)#g' \
70 -e 's#@@Port@@#$(PORT)#g' \
73 ) > $(DESTDIR)$(sysconfdir)/$$i; \
74 chmod 0644 $(DESTDIR)$(sysconfdir)/$$i; \
75 file=`echo $$i|sed s/-std//`; \
76 if [ "$$file" = "httpd.conf" ]; then \
77 file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
79 if test "$$file" != "$$i" && test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
80 $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/$$i $(DESTDIR)$(sysconfdir)/$$file; \
84 if test -f "$(builddir)/envvars-std"; then \
85 cp -p envvars-std $(DESTDIR)$(sbindir); \
86 if test ! -f $(DESTDIR)$(sbindir)/envvars; then \
87 cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \
92 @echo Installing build system files
93 @test -d $(DESTDIR)$(installbuilddir) || $(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir)
94 @cp $(top_srcdir)/build/*.mk $(DESTDIR)$(installbuilddir); \
95 cp build/*.mk $(DESTDIR)$(installbuilddir); \
96 sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) $(installbuilddir)/libtool $(LTFLAGS)#' \
97 build/config_vars.mk > $(DESTDIR)$(installbuilddir)/config_vars.mk; \
98 cp $(top_srcdir)/build/instdso.sh $(DESTDIR)$(installbuilddir); \
99 cp $(top_builddir)/config.nice $(DESTDIR)$(installbuilddir);
101 htdocs-srcdir = $(top_srcdir)/docs/docroot
105 srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
108 doxygen $(top_srcdir)/docs/doxygen.conf
111 -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
112 echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
114 echo Installing HTML documents ; \
115 $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
116 test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
117 cd $(DESTDIR)$(htdocsdir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
121 -@if [ -d $(DESTDIR)$(errordir) ]; then \
122 echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
124 echo Installing error documents ; \
125 $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
126 cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
127 test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
131 -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
132 echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
134 echo Installing icons ; \
135 $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
136 cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
137 test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
141 -@if [ -d $(DESTDIR)$(cgidir) ];then \
142 echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
144 echo Installing CGIs ; \
145 $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
146 cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
147 test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
151 @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
152 @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
153 @for ext in dll x; do \
154 file=apachecore.$$ext; \
155 if test -f $$file; then \
156 cp -p $$file $(DESTDIR)$(libdir); \
160 if test -f $$file; then \
161 cp -p $$file $(DESTDIR)$(bindir); \
165 @echo Installing header files
166 @test -d $(DESTDIR)$(includedir) || $(MKINSTALLDIRS) $(DESTDIR)$(includedir)
167 @cp -p include/*.h $(DESTDIR)$(includedir)
168 @cp -p $(srcdir)/include/*.h $(DESTDIR)$(includedir)
169 @cp -p $(srcdir)/os/$(OS_DIR)/os.h $(DESTDIR)$(includedir)
170 @if test -f $(srcdir)/os/$(OS_DIR)/os-inline.c; then \
171 cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(DESTDIR)$(includedir); \
173 @cp -p $(srcdir)/server/mpm/$(MPM_SUBDIR_NAME)/*.h $(DESTDIR)$(includedir)
174 @cp -p $(srcdir)/modules/aaa/mod_auth.h $(DESTDIR)$(includedir)
175 @cp -p $(srcdir)/modules/dav/main/mod_dav.h $(DESTDIR)$(includedir)
176 @cp -p $(srcdir)/modules/filters/mod_include.h $(DESTDIR)$(includedir)
177 @cp -p $(srcdir)/modules/generators/mod_cgi.h $(DESTDIR)$(includedir)
178 @cp -p $(srcdir)/modules/generators/mod_status.h $(DESTDIR)$(includedir)
179 @cp -p $(srcdir)/modules/loggers/mod_log_config.h $(DESTDIR)$(includedir)
180 @cp -p $(srcdir)/modules/http/mod_core.h $(DESTDIR)$(includedir)
181 @cp -p $(srcdir)/modules/proxy/mod_proxy.h $(DESTDIR)$(includedir)
182 @cp -p $(srcdir)/modules/ssl/mod_ssl.h $(DESTDIR)$(includedir)
183 @cp -p $(srcdir)/srclib/pcre/pcre*.h $(DESTDIR)$(includedir)
184 @cp -p $(srcdir)/os/$(OS_DIR)/*.h $(DESTDIR)$(includedir)
185 @chmod 644 $(DESTDIR)$(includedir)/*.h
188 @echo Installing man pages and online manual
189 @test -d $(DESTDIR)$(mandir) || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
190 @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
191 @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
192 @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
193 @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
194 @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
195 @(cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir))
196 @(cd $(DESTDIR)$(manualdir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null ) || true
199 @if test -f $(builddir)/support/suexec; then \
200 test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
201 $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
202 chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
206 cd support && $(MAKE) suexec
209 @rm -rf autom4te.cache
211 include $(top_srcdir)/os/os2/core.mk