2 SUBDIRS = srclib os server modules support
5 PROGRAM_NAME = $(progname)
6 PROGRAM_SOURCES = modules.c
7 PROGRAM_LDADD = $(EXTRA_LDFLAGS) $(HTTPD_LDFLAGS) \
8 $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS) $(AP_LIBS)
9 PROGRAM_DEPENDENCIES = \
15 PROGRAMS = $(PROGRAM_NAME)
16 TARGETS = $(PROGRAMS) $(shared_build) $(other_targets)
17 PHONY_TARGETS = $(srcdir)/buildmark.c
18 INSTALL_TARGETS = install-conf install-htdocs install-error install-icons \
19 install-other install-cgi install-include install-suexec install-man \
22 DISTCLEAN_TARGETS = include/ap_config_auto.h include/ap_config_layout.h \
23 modules.c config.cache config.log config.status build/config_vars.mk \
24 build/rules.mk docs/conf/httpd-std.conf
25 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists
27 include $(top_builddir)/build/rules.mk
28 include $(top_srcdir)/build/program.mk
31 @echo Installing configuration files
32 @test -d $(sysconfdir) || $(MKINSTALLDIRS) $(sysconfdir)
33 @cd $(top_srcdir)/docs/conf; \
34 for i in mime.types magic; do \
35 $(INSTALL_DATA) $$i $(sysconfdir); \
37 for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
39 for i in *-std*.conf ssl.conf; do \
40 [ -f $$i ] || continue; \
42 n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
43 if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \
44 sed -e 's#@@ServerRoot@@#$(prefix)#g' \
45 -e 's#@@Port@@#$(PORT)#g' \
46 -e '/@@LoadModule@@/d' \
49 sed -n -e '/@@LoadModule@@/q' \
50 -e 's#@@ServerRoot@@#$(prefix)#g' \
51 -e 's#@@Port@@#$(PORT)#g' \
54 for j in $(DSO_MODULES) "^EOL^"; do \
55 if test "x$$j" = "xssl"; then \
56 echo "<IfDefine SSL>"; \
58 if test $$j != "^EOL^"; then \
59 echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
61 if test "x$$j" = "xssl"; then \
65 sed -e '1,/@@LoadModule@@/d' \
66 -e '/@@LoadModule@@/d' \
67 -e 's#@@ServerRoot@@#$(prefix)#g' \
68 -e 's#@@Port@@#$(PORT)#g' \
71 ) > $(sysconfdir)/$$i; \
72 chmod 0644 $(sysconfdir)/$$i; \
73 file=`echo $$i|sed s/-std//`; \
74 if [ "$$file" = "httpd.conf" ]; then \
75 file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
77 if test "$$file" != "$$i" && test ! -f $(sysconfdir)/$$file; then \
78 $(INSTALL_DATA) $(sysconfdir)/$$i $(sysconfdir)/$$file; \
82 @if test -f "$(builddir)/envvars-std"; then \
83 cp -p envvars-std $(sbindir); \
84 if test ! -f $(sbindir)/envvars; then \
85 cp -p envvars-std $(sbindir)/envvars ; \
90 @echo Installing build system files
91 @test -d $(installbuilddir) || $(MKINSTALLDIRS) $(installbuilddir)
92 @cp build/*.mk $(installbuilddir); \
93 sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) $(installbuilddir)/libtool $(LTFLAGS)#' \
94 build/config_vars.mk > $(installbuilddir)/config_vars.mk; \
95 cp $(top_srcdir)/build/instdso.sh $(installbuilddir);
97 htdocs-srcdir = $(top_srcdir)/docs/docroot
101 srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
104 doxygen $(top_srcdir)/docs/doxygen.conf
107 @echo Installing HTML documents
108 @test -d $(htdocsdir) || $(MKINSTALLDIRS) $(htdocsdir)
109 @test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(htdocsdir))
110 @test -d $(manualdir) || $(MKINSTALLDIRS) $(manualdir)
111 @test -d $(top_srcdir)/docs/manual && (cd $(top_srcdir)/docs/manual && cp -rp * $(manualdir))
112 @test "x$(htdocsdir)" != "x" && cd $(htdocsdir) && find . -name "CVS" -print | xargs rm -rf
115 @echo Installing error documents
116 @test -d $(errordir) || $(MKINSTALLDIRS) $(errordir)
117 @cd $(top_srcdir)/docs/error && cp -rp * $(errordir)
118 @test "x$(errordir)" != "x" && cd $(errordir) && find . -name "CVS" -print | xargs rm -rf
121 @echo Installing icons
122 @test -d $(iconsdir) || $(MKINSTALLDIRS) $(iconsdir)
123 @cd $(top_srcdir)/docs/icons && cp -rp * $(iconsdir)
124 @test "x$(iconsdir)" != "x" && cd $(iconsdir) && find . -name "CVS" -print | xargs rm -rf
127 @echo Installing CGIs
128 @test -d $(cgidir) || $(MKINSTALLDIRS) $(cgidir)
129 @cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(cgidir)
130 @test "x$(cgidir)" != "x" && cd $(cgidir) && find . -name "CVS" -print | xargs rm -rf
133 @test -d $(logfiledir) || $(MKINSTALLDIRS) $(logfiledir)
134 @test -d $(runtimedir) || $(MKINSTALLDIRS) $(runtimedir)
135 @for ext in dll x; do \
136 file=apachecore.$$ext; \
137 if test -f $$file; then \
138 cp -p $$file $(libdir); \
142 if test -f $$file; then \
143 cp -p $$file $(bindir); \
147 @echo Installing header files
148 @test -d $(includedir) || $(MKINSTALLDIRS) $(includedir)
149 @cp -p include/*.h $(srcdir)/include/*.h $(includedir)
150 @cp -p $(srcdir)/os/$(OS_DIR)/os.h $(includedir)
151 @if test -f $(srcdir)/os/$(OS_DIR)/os-inline.c; then \
152 cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(includedir); \
154 @cp -p $(srcdir)/server/mpm/$(MPM_SUBDIR_NAME)/*.h $(includedir)
155 @cp -p $(srcdir)/modules/dav/main/mod_dav.h $(includedir)
156 @cp -p $(srcdir)/modules/filters/mod_include.h $(includedir)
157 @cp -p $(srcdir)/modules/generators/mod_cgi.h $(includedir)
158 @cp -p $(srcdir)/modules/loggers/mod_log_config.h $(includedir)
159 @cp -p $(srcdir)/modules/http/mod_core.h $(includedir)
160 @cp -p $(srcdir)/modules/proxy/mod_proxy.h $(includedir)
161 @cp -p $(srcdir)/modules/ssl/*.h $(includedir)
162 @cp -p $(srcdir)/srclib/pcre/pcre*.h $(includedir)
163 @cp -p $(srcdir)/os/$(OS_DIR)/*.h $(includedir)
164 @chmod 644 $(includedir)/*.h
167 @echo Installing man pages
168 @test -d $(mandir) || $(MKINSTALLDIRS) $(mandir)
169 @test -d $(mandir)/man1 || $(MKINSTALLDIRS) $(mandir)/man1
170 @test -d $(mandir)/man8 || $(MKINSTALLDIRS) $(mandir)/man8
171 @cp -p $(top_srcdir)/docs/man/*.1 $(mandir)/man1
172 @cp -p $(top_srcdir)/docs/man/*.8 $(mandir)/man8
175 @if test -f $(builddir)/support/suexec; then \
176 test -d $(sbindir) || $(MKINSTALLDIRS) $(sbindir); \
177 $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(sbindir); \
178 chmod 4755 $(sbindir)/suexec; \
182 cd support && $(MAKE) suexec
185 @rm -rf autom4te.cache
187 include $(top_srcdir)/os/os2/core.mk