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)
8 PROGRAM_DEPENDENCIES = \
14 PROGRAMS = $(PROGRAM_NAME)
15 TARGETS = $(PROGRAMS) $(shared_build) $(other_targets)
16 PHONY_TARGETS = $(srcdir)/buildmark.c
17 INSTALL_TARGETS = install-conf install-htdocs install-error install-icons \
18 install-other install-cgi install-include install-suexec install-man \
21 DISTCLEAN_TARGETS = include/ap_config_auto.h include/ap_config_layout.h \
22 modules.c config.cache config.log config.status build/config_vars.mk \
23 build/rules.mk docs/conf/httpd-std.conf
24 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 build/*.mk $(DESTDIR)$(installbuilddir); \
95 sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) $(installbuilddir)/libtool $(LTFLAGS)#' \
96 build/config_vars.mk > $(DESTDIR)$(installbuilddir)/config_vars.mk; \
97 cp $(top_srcdir)/build/instdso.sh $(DESTDIR)$(installbuilddir);
99 htdocs-srcdir = $(top_srcdir)/docs/docroot
103 srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
106 doxygen $(top_srcdir)/docs/doxygen.conf
109 -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
110 echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
112 echo Installing HTML documents ; \
113 $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
114 test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
115 cd $(DESTDIR)$(htdocsdir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
119 -@if [ -d $(DESTDIR)$(errordir) ]; then \
120 echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
122 echo Installing error documents ; \
123 $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
124 cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
125 test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
129 -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
130 echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
132 echo Installing icons ; \
133 $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
134 cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
135 test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
139 -@if [ -d $(DESTDIR)$(cgidir) ];then \
140 echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
142 echo Installing CGIs ; \
143 $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
144 cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
145 test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
149 @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
150 @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
151 @for ext in dll x; do \
152 file=apachecore.$$ext; \
153 if test -f $$file; then \
154 cp -p $$file $(DESTDIR)$(libdir); \
158 if test -f $$file; then \
159 cp -p $$file $(DESTDIR)$(bindir); \
163 @echo Installing header files
164 @test -d $(DESTDIR)$(includedir) || $(MKINSTALLDIRS) $(DESTDIR)$(includedir)
165 @cp -p include/*.h $(DESTDIR)$(includedir)
166 @cp -p $(srcdir)/include/*.h $(DESTDIR)$(includedir)
167 @cp -p $(srcdir)/os/$(OS_DIR)/os.h $(DESTDIR)$(includedir)
168 @if test -f $(srcdir)/os/$(OS_DIR)/os-inline.c; then \
169 cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(DESTDIR)$(includedir); \
171 @cp -p $(srcdir)/server/mpm/$(MPM_SUBDIR_NAME)/*.h $(DESTDIR)$(includedir)
172 @cp -p $(srcdir)/modules/dav/main/mod_dav.h $(DESTDIR)$(includedir)
173 @cp -p $(srcdir)/modules/filters/mod_include.h $(DESTDIR)$(includedir)
174 @cp -p $(srcdir)/modules/generators/mod_cgi.h $(DESTDIR)$(includedir)
175 @cp -p $(srcdir)/modules/loggers/mod_log_config.h $(DESTDIR)$(includedir)
176 @cp -p $(srcdir)/modules/http/mod_core.h $(DESTDIR)$(includedir)
177 @cp -p $(srcdir)/modules/proxy/mod_proxy.h $(DESTDIR)$(includedir)
178 @cp -p $(srcdir)/modules/ssl/*.h $(DESTDIR)$(includedir)
179 @cp -p $(srcdir)/srclib/pcre/pcre*.h $(DESTDIR)$(includedir)
180 @cp -p $(srcdir)/os/$(OS_DIR)/*.h $(DESTDIR)$(includedir)
181 @chmod 644 $(DESTDIR)$(includedir)/*.h
184 @echo Installing man pages and online manual
185 @test -d $(DESTDIR)$(mandir) || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
186 @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
187 @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
188 @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
189 @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
190 @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
191 @(cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir))
192 @(cd $(DESTDIR)$(manualdir) && find . -name "CVS" -type d -print | xargs rm -rf 2>/dev/null ) || true
195 @if test -f $(builddir)/support/suexec; then \
196 test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
197 $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
198 chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
202 cd support && $(MAKE) suexec
205 @rm -rf autom4te.cache
207 include $(top_srcdir)/os/os2/core.mk