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.conf docs/conf/extra/*.conf shlibtool \
24 build/pkg/pkginfo build/config_vars.sh
25 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists \
28 include $(top_builddir)/build/rules.mk
29 include $(top_srcdir)/build/program.mk
32 @echo Installing configuration files
33 @$(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(sysconfdir)/extra
34 @$(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir)/original/extra
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 httpd.conf extra/httpd-*.conf; do \
44 if [ -f $$i ] ; then \
46 n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
47 if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \
48 sed -e 's#@@ServerRoot@@#$(prefix)#g' \
49 -e 's#@@Port@@#$(PORT)#g' \
50 -e '/@@LoadModule@@/d' \
53 sed -n -e '/@@LoadModule@@/q' \
54 -e 's#@@ServerRoot@@#$(prefix)#g' \
55 -e 's#@@Port@@#$(PORT)#g' \
58 for j in $(DSO_MODULES) "^EOL^"; do \
59 if test $$j != "^EOL^"; then \
60 echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
63 sed -e '1,/@@LoadModule@@/d' \
64 -e '/@@LoadModule@@/d' \
65 -e 's#@@ServerRoot@@#$(prefix)#g' \
66 -e 's#@@Port@@#$(PORT)#g' \
69 ) > $(DESTDIR)$(sysconfdir)/original/$$i; \
70 chmod 0644 $(DESTDIR)$(sysconfdir)/original/$$i; \
72 if [ "$$i" = "httpd.conf" ]; then \
73 file=`echo $$i|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
75 if test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
76 $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/original/$$i $(DESTDIR)$(sysconfdir)/$$file; \
81 if test -f "$(builddir)/envvars-std"; then \
82 cp -p envvars-std $(DESTDIR)$(sbindir); \
83 if test ! -f $(DESTDIR)$(sbindir)/envvars; then \
84 cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \
88 # Create a sanitized config_vars.mk
89 build/config_vars.out: build/config_vars.mk
90 @$(SHELL) build/config_vars.sh < build/config_vars.mk > build/config_vars.out
92 install-build: build/config_vars.out
93 @echo Installing build system files
94 @$(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir)
95 @for f in $(top_srcdir)/build/*.mk build/*.mk; do \
96 $(INSTALL_DATA) $$f $(DESTDIR)$(installbuilddir); \
98 @for f in $(top_builddir)/config.nice \
99 $(top_srcdir)/build/mkdir.sh \
100 $(top_srcdir)/build/instdso.sh; do \
101 $(INSTALL_PROGRAM) $$f $(DESTDIR)$(installbuilddir); \
103 @$(INSTALL_DATA) build/config_vars.out $(DESTDIR)$(installbuilddir)/config_vars.mk
104 @rm build/config_vars.out
106 htdocs-srcdir = $(top_srcdir)/docs/docroot
110 srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
113 doxygen $(top_srcdir)/docs/doxygen.conf
116 -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
117 echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
119 echo Installing HTML documents ; \
120 $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
121 test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
122 cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
126 -@if [ -d $(DESTDIR)$(errordir) ]; then \
127 echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
129 echo Installing error documents ; \
130 $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
131 cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
132 test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
136 -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
137 echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
139 echo Installing icons ; \
140 $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
141 cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
142 test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
146 -@if [ -d $(DESTDIR)$(cgidir) ];then \
147 echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
149 echo Installing CGIs ; \
150 $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
151 cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
152 test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
156 @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
157 @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
158 @for ext in dll x; do \
159 file=apachecore.$$ext; \
160 if test -f $$file; then \
161 cp -p $$file $(DESTDIR)$(libdir); \
165 if test -f $$file; then \
166 cp -p $$file $(DESTDIR)$(bindir); \
171 $(srcdir)/include/*.h \
172 $(srcdir)/os/$(OS_DIR)/os.h \
173 $(srcdir)/server/mpm/$(MPM_SUBDIR_NAME)/*.h \
174 $(srcdir)/modules/aaa/mod_auth.h \
175 $(srcdir)/modules/dav/main/mod_dav.h \
176 $(srcdir)/modules/filters/mod_include.h \
177 $(srcdir)/modules/generators/mod_cgi.h \
178 $(srcdir)/modules/generators/mod_status.h \
179 $(srcdir)/modules/loggers/mod_log_config.h \
180 $(srcdir)/modules/http/mod_core.h \
181 $(srcdir)/modules/proxy/mod_proxy.h \
182 $(srcdir)/modules/ssl/mod_ssl.h \
183 $(srcdir)/os/$(OS_DIR)/*.h
186 @echo Installing header files
187 @$(MKINSTALLDIRS) $(DESTDIR)$(includedir)
188 @for hdr in $(INSTALL_HEADERS); do \
189 $(INSTALL_DATA) $$hdr $(DESTDIR)$(includedir); \
193 @echo Installing man pages and online manual
194 @test -d $(DESTDIR)$(mandir) || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
195 @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
196 @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
197 @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
198 @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
199 @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
200 @(cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir))
201 @(cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null ) || true
204 @if test -f $(builddir)/support/suexec; then \
205 test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
206 $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
207 chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
211 cd support && $(MAKE) suexec
214 @rm -rf autom4te.cache
216 include $(top_srcdir)/os/os2/core.mk