]> granicus.if.org Git - apache/blob - Makefile.in
squash warnings
[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
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         @test -d $(DESTDIR)$(sysconfdir) || $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir)
32         @cd $(top_srcdir)/docs/conf; \
33         for i in mime.types magic; do \
34                 $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
35         done; \
36         for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
37                 cd $$j ; \
38         for i in *-std*.conf ssl.conf; do \
39                 [ -f $$i ] || continue; \
40                 ( \
41                         n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
42                         if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \
43                                 sed -e 's#@@ServerRoot@@#$(prefix)#g' \
44                                         -e 's#@@Port@@#$(PORT)#g' \
45                                         -e '/@@LoadModule@@/d' \
46                                         < $$i; \
47                         else \
48                                 sed -n -e '/@@LoadModule@@/q' \
49                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
50                                         -e 's#@@Port@@#$(PORT)#g' \
51                                         -e 'p' \
52                                         < $$i; \
53                                 for j in $(DSO_MODULES) "^EOL^"; do \
54                                         if test "x$$j" = "xssl"; then \
55                                                 echo "<IfDefine SSL>"; \
56                                         fi; \
57                                         if test $$j != "^EOL^"; then \
58                                                 echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
59                                         fi; \
60                                         if test "x$$j" = "xssl"; then \
61                                                 echo "</IfDefine>"; \
62                                         fi; \
63                                 done; \
64                                 sed -e '1,/@@LoadModule@@/d' \
65                                         -e '/@@LoadModule@@/d' \
66                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
67                                         -e 's#@@Port@@#$(PORT)#g' \
68                                         < $$i; \
69                         fi \
70                 ) > $(DESTDIR)$(sysconfdir)/$$i; \
71                 chmod 0644 $(DESTDIR)$(sysconfdir)/$$i; \
72                 file=`echo $$i|sed s/-std//`; \
73                 if [ "$$file" = "httpd.conf" ]; then \
74                         file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
75                 fi; \
76                 if test "$$file" != "$$i" && test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
77                         $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/$$i $(DESTDIR)$(sysconfdir)/$$file; \
78                 fi; \
79         done ; \
80         done
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 ; \
85             fi ; \
86         fi
87
88 install-build:
89         @echo Installing build system files 
90         @test -d $(DESTDIR)$(installbuilddir) || $(MKINSTALLDIRS) $(DESTDIR)$(installbuilddir) 
91         @cp build/*.mk $(DESTDIR)$(installbuilddir); \
92         sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) $(installbuilddir)/libtool $(LTFLAGS)#' \
93             build/config_vars.mk > $(DESTDIR)$(installbuilddir)/config_vars.mk; \
94         cp $(top_srcdir)/build/instdso.sh $(DESTDIR)$(installbuilddir);
95
96 htdocs-srcdir = $(top_srcdir)/docs/docroot
97
98 docs::
99         mkdir -p ./docs/api
100         srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
101
102 dox::
103         doxygen $(top_srcdir)/docs/doxygen.conf
104
105 install-htdocs:
106         @echo Installing HTML documents
107         @test -d $(DESTDIR)$(htdocsdir) || $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir)
108         @test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir))
109         @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
110         @test -d $(top_srcdir)/docs/manual && (cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir))
111         -@test "x$(htdocsdir)" != "x" && cd $(DESTDIR)$(htdocsdir) && find . -name "CVS" -print | xargs rm -rf
112
113 install-error:
114         @echo Installing error documents
115         @test -d $(DESTDIR)$(errordir) || $(MKINSTALLDIRS) $(DESTDIR)$(errordir)
116         @cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir)
117         -@test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name "CVS" -print | xargs rm -rf
118
119 install-icons:
120         @echo Installing icons
121         @test -d $(DESTDIR)$(iconsdir) || $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir)
122         @cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir)
123         -@test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name "CVS" -print | xargs rm -rf
124
125 install-cgi:
126         @echo Installing CGIs
127         @test -d $(DESTDIR)$(cgidir) || $(MKINSTALLDIRS) $(DESTDIR)$(cgidir)
128         @cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir)
129         -@test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name "CVS" -print | xargs rm -rf
130
131 install-other:
132         @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
133         @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
134         @for ext in dll x; do \
135                 file=apachecore.$$ext; \
136                 if test -f $$file; then \
137                         cp -p $$file $(DESTDIR)$(libdir); \
138                 fi; \
139         done; \
140         file=httpd.dll; \
141         if test -f $$file; then \
142                 cp -p $$file $(DESTDIR)$(bindir); \
143         fi;
144
145 install-include:
146         @echo Installing header files
147         @test -d $(DESTDIR)$(includedir)     || $(MKINSTALLDIRS) $(DESTDIR)$(includedir)
148         @cp -p include/*.h $(srcdir)/include/*.h $(DESTDIR)$(includedir)
149         @cp -p $(srcdir)/os/$(OS_DIR)/os.h $(DESTDIR)$(includedir)
150         @if test -f $(srcdir)/os/$(OS_DIR)/os-inline.c; then \
151             cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(DESTDIR)$(includedir); \
152         fi;
153         @cp -p $(srcdir)/server/mpm/$(MPM_SUBDIR_NAME)/*.h $(DESTDIR)$(includedir)
154         @cp -p $(srcdir)/modules/dav/main/mod_dav.h $(DESTDIR)$(includedir)
155         @cp -p $(srcdir)/modules/filters/mod_include.h $(DESTDIR)$(includedir)
156         @cp -p $(srcdir)/modules/generators/mod_cgi.h $(DESTDIR)$(includedir)
157         @cp -p $(srcdir)/modules/loggers/mod_log_config.h $(DESTDIR)$(includedir)
158         @cp -p $(srcdir)/modules/http/mod_core.h $(DESTDIR)$(includedir)
159         @cp -p $(srcdir)/modules/proxy/mod_proxy.h $(DESTDIR)$(includedir)
160         @cp -p $(srcdir)/modules/ssl/*.h $(DESTDIR)$(includedir)
161         @cp -p $(srcdir)/srclib/pcre/pcre*.h $(DESTDIR)$(includedir)
162         @cp -p $(srcdir)/os/$(OS_DIR)/*.h $(DESTDIR)$(includedir)
163         @chmod 644 $(DESTDIR)$(includedir)/*.h
164
165 install-man:
166         @echo Installing man pages
167         @test -d $(DESTDIR)$(mandir)      || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)
168         @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
169         @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
170         @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
171         @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
172
173 install-suexec:
174         @if test -f $(builddir)/support/suexec; then \
175             test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
176             $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
177             chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
178         fi
179
180 suexec:
181         cd support && $(MAKE) suexec
182
183 x-local-distclean:
184         @rm -rf autom4te.cache
185
186 include $(top_srcdir)/os/os2/core.mk