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 \
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 ; \
89 @echo Installing build system files
90 @$(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir)
91 @for f in $(top_srcdir)/build/*.mk build/*.mk; do \
92 $(INSTALL_DATA) $$f $(DESTDIR)$(installbuilddir); \
94 @for f in $(top_builddir)/config.nice \
95 $(top_srcdir)/build/mkdir.sh \
96 $(top_srcdir)/build/instdso.sh; do \
97 $(INSTALL_PROGRAM) $$f $(DESTDIR)$(installbuilddir); \
99 @sed "/^LIBTOOL/s#/[^ ]*/libtool \(.*\)#`$(APR_CONFIG) --apr-libtool` $(LTFLAGS)#" \
100 build/config_vars.mk > $(DESTDIR)$(installbuilddir)/config_vars.mk
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); \
167 $(srcdir)/include/*.h \
168 $(srcdir)/os/$(OS_DIR)/os.h \
169 $(srcdir)/server/mpm/$(MPM_SUBDIR_NAME)/*.h \
170 $(srcdir)/modules/aaa/mod_auth.h \
171 $(srcdir)/modules/dav/main/mod_dav.h \
172 $(srcdir)/modules/filters/mod_include.h \
173 $(srcdir)/modules/generators/mod_cgi.h \
174 $(srcdir)/modules/generators/mod_status.h \
175 $(srcdir)/modules/loggers/mod_log_config.h \
176 $(srcdir)/modules/http/mod_core.h \
177 $(srcdir)/modules/proxy/mod_proxy.h \
178 $(srcdir)/modules/ssl/mod_ssl.h \
179 $(srcdir)/os/$(OS_DIR)/*.h
182 @echo Installing header files
183 @$(MKINSTALLDIRS) $(DESTDIR)$(includedir)
184 @for hdr in $(INSTALL_HEADERS); do \
185 $(INSTALL_DATA) $$hdr $(DESTDIR)$(includedir); \
189 @echo Installing man pages and online manual
190 @test -d $(DESTDIR)$(mandir) || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
191 @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
192 @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
193 @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
194 @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
195 @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
196 @(cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir))
197 @(cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null ) || true
200 @if test -f $(builddir)/support/suexec; then \
201 test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
202 $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
203 chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
207 cd support && $(MAKE) suexec
210 @rm -rf autom4te.cache
212 include $(top_srcdir)/os/os2/core.mk