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
109 @if test -d $(top_srcdir)/docs/manual/build; then \
110 cd $(top_srcdir)/docs/manual/build && ./build.sh all; \
112 echo 'For details on generating the docs, please read:'; \
113 echo ' http://httpd.apache.org/docs-project/docsformat.html'; \
117 doxygen $(top_srcdir)/docs/doxygen.conf
120 -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
121 echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
123 echo Installing HTML documents ; \
124 $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
125 if test -d $(htdocs-srcdir) && test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
126 $(RSYNC) --exclude .svn -rlpt --numeric-ids $(htdocs-srcdir)/ $(DESTDIR)$(htdocsdir)/; \
128 test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
129 cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
134 -@if [ -d $(DESTDIR)$(errordir) ]; then \
135 echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
137 echo Installing error documents ; \
138 $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
139 cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
140 test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
144 -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
145 echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
147 echo Installing icons ; \
148 $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
149 cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
150 test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
154 -@if [ -d $(DESTDIR)$(cgidir) ];then \
155 echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
157 echo Installing CGIs ; \
158 $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
159 cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
160 test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
164 @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
165 @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
166 @for ext in dll x; do \
167 file=apachecore.$$ext; \
168 if test -f $$file; then \
169 cp -p $$file $(DESTDIR)$(libdir); \
173 if test -f $$file; then \
174 cp -p $$file $(DESTDIR)$(bindir); \
179 $(srcdir)/include/*.h \
180 $(srcdir)/os/$(OS_DIR)/os.h \
181 $(srcdir)/server/mpm/$(MPM_SUBDIR_NAME)/*.h \
182 $(srcdir)/modules/aaa/mod_auth.h \
183 $(srcdir)/modules/database/mod_dbd.h \
184 $(srcdir)/modules/dav/main/mod_dav.h \
185 $(srcdir)/modules/filters/mod_include.h \
186 $(srcdir)/modules/generators/mod_cgi.h \
187 $(srcdir)/modules/generators/mod_status.h \
188 $(srcdir)/modules/loggers/mod_log_config.h \
189 $(srcdir)/modules/http/mod_core.h \
190 $(srcdir)/modules/proxy/mod_proxy.h \
191 $(srcdir)/modules/ssl/mod_ssl.h \
192 $(srcdir)/os/$(OS_DIR)/*.h
195 @echo Installing header files
196 @$(MKINSTALLDIRS) $(DESTDIR)$(includedir)
197 @for hdr in $(INSTALL_HEADERS); do \
198 $(INSTALL_DATA) $$hdr $(DESTDIR)$(includedir); \
202 @echo Installing man pages and online manual
203 @test -d $(DESTDIR)$(mandir) || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
204 @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
205 @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
206 @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
207 @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
208 @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
209 @if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
210 $(RSYNC) --exclude .svn -rlpt --numeric-ids $(top_srcdir)/docs/manual/ $(DESTDIR)$(manualdir)/; \
212 cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir); \
213 cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null; \
217 @if test -f $(builddir)/support/suexec; then \
218 test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
219 $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
220 chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
224 cd support && $(MAKE) suexec
227 @rm -rf autom4te.cache
229 include $(top_srcdir)/os/os2/core.mk