2 SUBDIRS = srclib modules os server support
4 PROGRAM_NAME = $(progname)
5 PROGRAM_SOURCES = modules.c
6 PROGRAM_LDADD = $(EXTRA_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS)
7 PROGRAM_DEPENDENCIES = \
11 os/$(OS_DIR)/libos.la \
14 PROGRAMS = $(PROGRAM_NAME)
15 targets = $(PROGRAMS) $(other_targets)
16 phony_targets = $(srcdir)/buildmark.c
17 install_targets = install-conf install-htdocs install-icons install-other \
18 install-cgi install-include install-support install-suexec
19 DISTCLEAN_TARGETS = include/config_auto.h modules.c aclocal.m4 buildmk.stamp \
20 configure generated_lists include/ap_config_auto.h \
21 include/ap_config_auto.h.in include/ap_config_path.h install-sh \
24 include $(top_srcdir)/build/rules.mk
25 include $(top_srcdir)/build/program.mk
28 @echo Installing configuration files
29 @test -d $(sysconfdir) || $(MKINSTALLDIRS) $(sysconfdir)
31 for i in mime.types magic; do \
32 $(INSTALL_DATA) $$i $(sysconfdir); \
35 sed -e 's#@@ServerRoot@@#$(prefix)#g' \
36 -e 's#@@Port@@#$(PORT)#g' \
37 < $$i > $(sysconfdir)/$$i; \
38 chmod 0644 $(sysconfdir)/$$i; \
39 file=`echo $$i|sed s/-std//`; \
40 if [ "$$file" = "httpd.conf" ]; then \
41 file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
43 if test "$$file" != "$$i" && test ! -f $(sysconfdir)/$$file; then \
44 $(INSTALL_DATA) $(sysconfdir)/$$i $(sysconfdir)/$$file; \
48 htdocs-srcdir = docs/docroot
52 srclib/apr/helpers/scandoc -isrclib/apr/helpers/default.pl -p./docs/api/ ./include/*.h
55 @echo Installing HTML documents
56 @test -d $(htdocsdir) || $(MKINSTALLDIRS) $(htdocsdir)
57 @test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(htdocsdir))
58 @test -d $(htdocsdir)/manual || $(MKINSTALLDIRS) $(htdocsdir)/manual
59 @test -d docs/manual && (cd docs/manual && cp -rp * $(htdocsdir)/manual)
60 @(cd $(htdocsdir) && find . -name "CVS" -print | xargs rm -rf {} \;)
63 @echo Installing icons
64 @test -d $(iconsdir) || $(MKINSTALLDIRS) $(iconsdir)
65 @(cd docs/icons && cp -rp * $(iconsdir))
66 @(cd $(iconsdir) && find . -name "CVS" -print | xargs rm -rf {} \;)
70 @test -d $(cgidir) || $(MKINSTALLDIRS) $(cgidir)
71 @(cd docs/cgi-examples && cp -rp * $(cgidir))
72 @(cd $(cgidir) && find . -name "CVS" -print | xargs rm -rf {} \;)
75 @echo Installing Support Binaries
76 @test -d $(bindir) || $(MKINSTALLDIRS) $(bindir)
77 @cp -p $(srcdir)/support/httpd.exp $(bindir)
78 @cp -p $(builddir)/support/htpasswd $(bindir)
79 @cp -p $(builddir)/support/htdigest $(bindir)
80 @cp -p $(builddir)/support/rotatelogs $(bindir)
81 @cp -p $(builddir)/support/logresolve $(bindir)
82 @cp -p $(builddir)/support/ab $(bindir)
83 @cp -p $(builddir)/support/apachectl $(bindir)
84 chmod 755 $(bindir)/apachectl
85 @if test -f $(builddir)/support/apxs; then \
86 cp -p $(builddir)/support/apxs $(bindir); \
87 chmod 755 $(bindir)/apxs; \
92 @test -d $(logdir) || $(MKINSTALLDIRS) $(logdir)
93 @for ext in dll x; do \
94 file=apachecore.$$ext; \
95 if test -f $$file; then \
96 cp -p $$file $(bindir); \
101 @echo Installing header files
102 @test -d $(includedir) || $(MKINSTALLDIRS) $(includedir)
103 @cp -p include/*.h $(srcdir)/include/*.h $(includedir)
104 @cp -p $(srcdir)/os/$(OS_DIR)/os.h $(includedir)
105 @if test -f $(srcdir)/os/$(OS_DIR)/os-inline.c; then \
106 cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(includedir); \
108 @cp -p $(srcdir)/server/mpm/$(MPM_NAME)/*.h $(includedir)
109 @cp -p $(srcdir)/modules/dav/main/mod_dav.h $(includedir)
110 @cp -p $(srcdir)/modules/filters/mod_include.h $(includedir)
111 @cp -p $(srcdir)/srclib/expat-lite/*.h $(includedir)
112 @cp -p $(srcdir)/srclib/pcre/*.h $(includedir)
113 @cp -p $(srcdir)/srclib/apr/include/*.h $(includedir)
114 @cp -p $(srcdir)/srclib/apr-util/include/*.h $(includedir)
115 @cp -p $(srcdir)/os/$(OS_DIR)/*.h $(includedir)
116 @chmod 644 $(includedir)/*.h
119 @if test -f $(builddir)/support/suexec; then \
120 $(MKINSTALLDIRS) $(bindir)/sbin; \
121 cp -p $(srcdir)/support/suexec $(bindir)/sbin; \
125 cd support && make suexec