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) $(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 modules.c config.cache config.log config.status build/config_vars.mk \
23 build/rules.mk docs/conf/httpd-std.conf docs/conf/ssl-std.conf shlibtool
24 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists \
27 include $(top_builddir)/build/rules.mk
28 include $(top_srcdir)/build/program.mk
31 @echo Installing configuration files ; \
32 if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
33 $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) ; \
35 cd $(top_srcdir)/docs/conf; \
36 for i in mime.types magic; do \
37 if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
38 $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
41 for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
43 for i in *-std*.conf; do \
45 n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
46 if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \
47 sed -e 's#@@ServerRoot@@#$(prefix)#g' \
48 -e 's#@@Port@@#$(PORT)#g' \
49 -e '/@@LoadModule@@/d' \
52 sed -n -e '/@@LoadModule@@/q' \
53 -e 's#@@ServerRoot@@#$(prefix)#g' \
54 -e 's#@@Port@@#$(PORT)#g' \
57 for j in $(DSO_MODULES) "^EOL^"; do \
58 if test "x$$j" = "xssl"; then \
59 echo "<IfDefine SSL>"; \
61 if test $$j != "^EOL^"; then \
62 echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
64 if test "x$$j" = "xssl"; then \
68 sed -e '1,/@@LoadModule@@/d' \
69 -e '/@@LoadModule@@/d' \
70 -e 's#@@ServerRoot@@#$(prefix)#g' \
71 -e 's#@@Port@@#$(PORT)#g' \
74 ) > $(DESTDIR)$(sysconfdir)/$$i; \
75 chmod 0644 $(DESTDIR)$(sysconfdir)/$$i; \
76 file=`echo $$i|sed s/-std//`; \
77 if [ "$$file" = "httpd.conf" ]; then \
78 file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
80 if test "$$file" != "$$i" && test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
81 $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/$$i $(DESTDIR)$(sysconfdir)/$$file; \
85 if test -f "$(builddir)/envvars-std"; then \
86 cp -p envvars-std $(DESTDIR)$(sbindir); \
87 if test ! -f $(DESTDIR)$(sbindir)/envvars; then \
88 cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \
93 @echo Installing build system files
94 @test -d $(DESTDIR)$(installbuilddir) || $(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir)
95 @cp $(top_srcdir)/build/*.mk $(DESTDIR)$(installbuilddir); \
96 cp build/*.mk $(DESTDIR)$(installbuilddir); \
97 sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) $(installbuilddir)/libtool $(LTFLAGS)#' \
98 build/config_vars.mk > $(DESTDIR)$(installbuilddir)/config_vars.mk; \
99 cp $(top_srcdir)/build/instdso.sh $(DESTDIR)$(installbuilddir); \
100 cp $(top_builddir)/config.nice $(DESTDIR)$(installbuilddir);
102 htdocs-srcdir = $(top_srcdir)/docs/docroot
106 srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
109 doxygen $(top_srcdir)/docs/doxygen.conf
112 -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
113 echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
115 echo Installing HTML documents ; \
116 $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
117 test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
118 cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
122 -@if [ -d $(DESTDIR)$(errordir) ]; then \
123 echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
125 echo Installing error documents ; \
126 $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
127 cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
128 test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
132 -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
133 echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
135 echo Installing icons ; \
136 $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
137 cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
138 test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
142 -@if [ -d $(DESTDIR)$(cgidir) ];then \
143 echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
145 echo Installing CGIs ; \
146 $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
147 cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
148 test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
152 @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
153 @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
154 @for ext in dll x; do \
155 file=apachecore.$$ext; \
156 if test -f $$file; then \
157 cp -p $$file $(DESTDIR)$(libdir); \
161 if test -f $$file; then \
162 cp -p $$file $(DESTDIR)$(bindir); \
166 @echo Installing header files
167 @test -d $(DESTDIR)$(includedir) || $(MKINSTALLDIRS) $(DESTDIR)$(includedir)
168 @cp -p include/*.h $(DESTDIR)$(includedir)
169 @cp -p $(srcdir)/include/*.h $(DESTDIR)$(includedir)
170 @cp -p $(srcdir)/os/$(OS_DIR)/os.h $(DESTDIR)$(includedir)
171 @if test -f $(srcdir)/os/$(OS_DIR)/os-inline.c; then \
172 cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(DESTDIR)$(includedir); \
174 @cp -p $(srcdir)/server/mpm/$(MPM_SUBDIR_NAME)/*.h $(DESTDIR)$(includedir)
175 @cp -p $(srcdir)/modules/aaa/mod_auth.h $(DESTDIR)$(includedir)
176 @cp -p $(srcdir)/modules/dav/main/mod_dav.h $(DESTDIR)$(includedir)
177 @cp -p $(srcdir)/modules/filters/mod_include.h $(DESTDIR)$(includedir)
178 @cp -p $(srcdir)/modules/generators/mod_cgi.h $(DESTDIR)$(includedir)
179 @cp -p $(srcdir)/modules/generators/mod_status.h $(DESTDIR)$(includedir)
180 @cp -p $(srcdir)/modules/loggers/mod_log_config.h $(DESTDIR)$(includedir)
181 @cp -p $(srcdir)/modules/http/mod_core.h $(DESTDIR)$(includedir)
182 @cp -p $(srcdir)/modules/proxy/mod_proxy.h $(DESTDIR)$(includedir)
183 @cp -p $(srcdir)/modules/ssl/mod_ssl.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 ".svn" -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