]> granicus.if.org Git - apache/blob - Makefile.in
add information about the == operator, && / || priorities and
[apache] / 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)
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 docs/conf/ssl-std.conf shlibtool
24 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists \
25         httpd.spec
26
27 include $(top_builddir)/build/rules.mk
28 include $(top_srcdir)/build/program.mk
29
30 install-conf:
31         @echo Installing configuration files ; \
32         if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
33             $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) ; \
34         fi ; \
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); \
39             fi; \
40         done; \
41         for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
42             cd $$j ; \
43             for i in *-std*.conf; do \
44                 ( \
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' \
50                                         < $$i; \
51                         else \
52                                 sed -n -e '/@@LoadModule@@/q' \
53                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
54                                         -e 's#@@Port@@#$(PORT)#g' \
55                                         -e 'p' \
56                                         < $$i; \
57                                 for j in $(DSO_MODULES) "^EOL^"; do \
58                                         if test "x$$j" = "xssl"; then \
59                                                 echo "<IfDefine SSL>"; \
60                                         fi; \
61                                         if test $$j != "^EOL^"; then \
62                                                 echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
63                                         fi; \
64                                         if test "x$$j" = "xssl"; then \
65                                                 echo "</IfDefine>"; \
66                                         fi; \
67                                 done; \
68                                 sed -e '1,/@@LoadModule@@/d' \
69                                         -e '/@@LoadModule@@/d' \
70                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
71                                         -e 's#@@Port@@#$(PORT)#g' \
72                                         < $$i; \
73                         fi \
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/`; \
79                 fi; \
80                 if test "$$file" != "$$i" && test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
81                         $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/$$i $(DESTDIR)$(sysconfdir)/$$file; \
82                 fi; \
83             done ; \
84         done ; \
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 ; \
89             fi ; \
90         fi
91
92 install-build:
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);
101
102 htdocs-srcdir = $(top_srcdir)/docs/docroot
103
104 docs::
105         mkdir -p ./docs/api
106         srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
107
108 dox::
109         doxygen $(top_srcdir)/docs/doxygen.conf
110
111 install-htdocs:
112         -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
113            echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
114         else \
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 "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
119         fi
120
121 install-error:
122         -@if [ -d $(DESTDIR)$(errordir) ]; then \
123            echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
124         else \
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 "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
129         fi
130
131 install-icons:
132         -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
133            echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
134         else \
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 "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
139         fi
140
141 install-cgi:
142         -@if [ -d $(DESTDIR)$(cgidir) ];then \
143             echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
144         else \
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 "CVS" -type d -print | xargs rm -rf 2>/dev/null || true; \
149         fi
150
151 install-other:
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); \
158                 fi; \
159         done; \
160         file=httpd.dll; \
161         if test -f $$file; then \
162                 cp -p $$file $(DESTDIR)$(bindir); \
163         fi;
164
165 install-include:
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); \
173         fi;
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/*.h $(DESTDIR)$(includedir)
184         @cp -p $(srcdir)/srclib/pcre/pcre*.h $(DESTDIR)$(includedir)
185         @cp -p $(srcdir)/os/$(OS_DIR)/*.h $(DESTDIR)$(includedir)
186         @chmod 644 $(DESTDIR)$(includedir)/*.h
187
188 install-man:
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 "CVS" -type d -print | xargs rm -rf 2>/dev/null ) || true
198
199 install-suexec:
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; \
204         fi
205
206 suexec:
207         cd support && $(MAKE) suexec
208
209 x-local-distclean:
210         @rm -rf autom4te.cache
211
212 include $(top_srcdir)/os/os2/core.mk