upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / Makefile.in
1
2 SUBDIRS = srclib os server modules support
3 CLEAN_SUBDIRS = test
4
5 PROGRAM_NAME         = $(progname)
6 PROGRAM_SOURCES      = modules.c
7 PROGRAM_LDADD        = $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
8 PROGRAM_DEPENDENCIES = \
9   $(BUILTIN_LIBS) \
10   $(MPM_LIB) \
11   server/libmain.la \
12   os/$(OS_DIR)/libos.la
13
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 \
19         install-build
20
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
25
26 include $(top_builddir)/build/rules.mk
27 include $(top_srcdir)/build/program.mk
28
29 install-conf:
30         @echo Installing configuration files ; \
31         if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
32             $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) ; \
33         fi ; \
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); \
38             fi; \
39         done; \
40         for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
41             cd $$j ; \
42             for i in *-std*.conf; do \
43                 ( \
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' \
49                                         < $$i; \
50                         else \
51                                 sed -n -e '/@@LoadModule@@/q' \
52                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
53                                         -e 's#@@Port@@#$(PORT)#g' \
54                                         -e 'p' \
55                                         < $$i; \
56                                 for j in $(DSO_MODULES) "^EOL^"; do \
57                                         if test "x$$j" = "xssl"; then \
58                                                 echo "<IfDefine SSL>"; \
59                                         fi; \
60                                         if test $$j != "^EOL^"; then \
61                                                 echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
62                                         fi; \
63                                         if test "x$$j" = "xssl"; then \
64                                                 echo "</IfDefine>"; \
65                                         fi; \
66                                 done; \
67                                 sed -e '1,/@@LoadModule@@/d' \
68                                         -e '/@@LoadModule@@/d' \
69                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
70                                         -e 's#@@Port@@#$(PORT)#g' \
71                                         < $$i; \
72                         fi \
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/`; \
78                 fi; \
79                 if test "$$file" != "$$i" && test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
80                         $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/$$i $(DESTDIR)$(sysconfdir)/$$file; \
81                 fi; \
82             done ; \
83         done ; \
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 ; \
88             fi ; \
89         fi
90
91 install-build:
92         @echo Installing build system files 
93         @test -d $(DESTDIR)$(installbuilddir) || $(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir) 
94         @cp $(top_srcdir)/build/*.mk $(DESTDIR)$(installbuilddir); \
95         cp build/*.mk $(DESTDIR)$(installbuilddir); \
96         sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) $(installbuilddir)/libtool $(LTFLAGS)#' \
97             build/config_vars.mk > $(DESTDIR)$(installbuilddir)/config_vars.mk; \
98         cp $(top_srcdir)/build/instdso.sh $(DESTDIR)$(installbuilddir); \
99         cp $(top_builddir)/config.nice $(DESTDIR)$(installbuilddir);
100
101 htdocs-srcdir = $(top_srcdir)/docs/docroot
102
103 docs::
104         mkdir -p ./docs/api
105         srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
106
107 dox::
108         doxygen $(top_srcdir)/docs/doxygen.conf
109
110 install-htdocs:
111         -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
112            echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
113         else \
114             echo Installing HTML documents ; \
115             $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
116             test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
117             cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
118         fi
119
120 install-error:
121         -@if [ -d $(DESTDIR)$(errordir) ]; then \
122            echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
123         else \
124             echo Installing error documents ; \
125             $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
126             cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
127             test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
128         fi
129
130 install-icons:
131         -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
132            echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
133         else \
134             echo Installing icons ; \
135             $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
136             cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
137             test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
138         fi
139
140 install-cgi:
141         -@if [ -d $(DESTDIR)$(cgidir) ];then \
142             echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
143         else \
144            echo Installing CGIs ; \
145            $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
146            cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
147            test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
148         fi
149
150 install-other:
151         @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
152         @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
153         @for ext in dll x; do \
154                 file=apachecore.$$ext; \
155                 if test -f $$file; then \
156                         cp -p $$file $(DESTDIR)$(libdir); \
157                 fi; \
158         done; \
159         file=httpd.dll; \
160         if test -f $$file; then \
161                 cp -p $$file $(DESTDIR)$(bindir); \
162         fi;
163
164 install-include:
165         @echo Installing header files
166         @test -d $(DESTDIR)$(includedir) || $(MKINSTALLDIRS) $(DESTDIR)$(includedir)
167         @cp -p include/*.h $(DESTDIR)$(includedir)
168         @cp -p $(srcdir)/include/*.h $(DESTDIR)$(includedir)
169         @cp -p $(srcdir)/os/$(OS_DIR)/os.h $(DESTDIR)$(includedir)
170         @if test -f $(srcdir)/os/$(OS_DIR)/os-inline.c; then \
171             cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(DESTDIR)$(includedir); \
172         fi;
173         @cp -p $(srcdir)/server/mpm/$(MPM_SUBDIR_NAME)/*.h $(DESTDIR)$(includedir)
174         @cp -p $(srcdir)/modules/dav/main/mod_dav.h $(DESTDIR)$(includedir)
175         @cp -p $(srcdir)/modules/filters/mod_include.h $(DESTDIR)$(includedir)
176         @cp -p $(srcdir)/modules/generators/mod_cgi.h $(DESTDIR)$(includedir)
177         @cp -p $(srcdir)/modules/generators/mod_status.h $(DESTDIR)$(includedir)
178         @cp -p $(srcdir)/modules/loggers/mod_log_config.h $(DESTDIR)$(includedir)
179         @cp -p $(srcdir)/modules/http/mod_core.h $(DESTDIR)$(includedir)
180         @cp -p $(srcdir)/modules/proxy/mod_proxy.h $(DESTDIR)$(includedir)
181         @cp -p $(srcdir)/modules/ssl/*.h $(DESTDIR)$(includedir)
182         @cp -p $(srcdir)/srclib/pcre/pcre*.h $(DESTDIR)$(includedir)
183         @cp -p $(srcdir)/os/$(OS_DIR)/*.h $(DESTDIR)$(includedir)
184         @chmod 644 $(DESTDIR)$(includedir)/*.h
185
186 install-man:
187         @echo Installing man pages and online manual
188         @test -d $(DESTDIR)$(mandir)      || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
189         @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
190         @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
191         @test -d $(DESTDIR)$(manualdir)   || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
192         @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
193         @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
194         @(cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir))
195         @(cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null ) || true
196
197 install-suexec:
198         @if test -f $(builddir)/support/suexec; then \
199             test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
200             $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
201             chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
202         fi
203
204 suexec:
205         cd support && $(MAKE) suexec
206
207 x-local-distclean:
208         @rm -rf autom4te.cache
209
210 include $(top_srcdir)/os/os2/core.mk