]> granicus.if.org Git - apache/blob - Makefile.in
KEYS do not belong here. The only valid location for a KEYS file
[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        = $(EXTRA_LDFLAGS) $(HTTPD_LDFLAGS) \
8                        $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS)
9 PROGRAM_DEPENDENCIES = \
10   $(BUILTIN_LIBS) \
11   $(MPM_LIB) \
12   server/libmain.la \
13   os/$(OS_DIR)/libos.la \
14   $(AP_LIBS)
15
16 PROGRAMS        = $(PROGRAM_NAME)
17 TARGETS         = $(PROGRAMS) $(shared_build) $(other_targets)
18 PHONY_TARGETS   = $(srcdir)/buildmark.c
19 INSTALL_TARGETS = install-conf install-htdocs install-error install-icons \
20         install-other install-cgi install-include install-suexec install-man \
21         install-build
22
23 DISTCLEAN_TARGETS  = include/ap_config_auto.h include/ap_config_path.h \
24         modules.c config.cache config.log config.status config_vars.mk
25 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in generated_lists
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         @test -d $(sysconfdir) || $(MKINSTALLDIRS) $(sysconfdir)
33         @cd $(top_srcdir)/docs/conf; \
34         for i in mime.types magic; do \
35                 $(INSTALL_DATA) $$i $(sysconfdir); \
36         done; \
37         for i in *-std* ssl.conf; do \
38                 [ -f $$i ] || continue; \
39                 ( \
40                         n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
41                         if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \
42                                 sed -e 's#@@ServerRoot@@#$(prefix)#g' \
43                                         -e 's#@@Port@@#$(PORT)#g' \
44                                         -e '/@@LoadModule@@/d' \
45                                         < $$i; \
46                         else \
47                                 sed -n -e '/@@LoadModule@@/q' \
48                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
49                                         -e 's#@@Port@@#$(PORT)#g' \
50                                         -e 'p' \
51                                         < $$i; \
52                                 for j in $(DSO_MODULES) "^EOL^"; do \
53                                         if test $$j != "^EOL^"; then \
54                                                 echo "LoadModule $${j}_module modules/mod_$${j}.so"; \
55                                         fi; \
56                                 done; \
57                                 sed -e '1,/@@LoadModule@@/d' \
58                                         -e '/@@LoadModule@@/d' \
59                                         -e 's#@@ServerRoot@@#$(prefix)#g' \
60                                         -e 's#@@Port@@#$(PORT)#g' \
61                                         < $$i; \
62                         fi \
63                 ) > $(sysconfdir)/$$i; \
64                 chmod 0644 $(sysconfdir)/$$i; \
65                 file=`echo $$i|sed s/-std//`; \
66                 if [ "$$file" = "httpd.conf" ]; then \
67                         file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
68                 fi; \
69                 if test "$$file" != "$$i" && test ! -f $(sysconfdir)/$$file; then \
70                         $(INSTALL_DATA) $(sysconfdir)/$$i $(sysconfdir)/$$file; \
71                 fi; \
72         done
73
74 install-build:
75         @echo Installing build system files 
76         @test -d $(installbuilddir) || $(MKINSTALLDIRS) $(installbuilddir) 
77         @sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) $(installbuilddir)/libtool $(LTFLAGS)#' \
78             config_vars.mk > $(installbuilddir)/config_vars.mk; \
79         cp build/*.mk $(installbuilddir); \
80         cp srclib/apr/libtool $(installbuilddir); \
81         if test -f srclib/apr/shlibtool; then \
82             cp srclib/apr/shlibtool $(installbuilddir); \
83         fi
84
85 htdocs-srcdir = $(top_srcdir)/docs/docroot
86
87 docs::
88         mkdir -p ./docs/api
89         srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
90
91 dox::
92         doxygen $(top_srcdir)/docs/doxygen.conf
93
94 install-htdocs:
95         @echo Installing HTML documents
96         @test -d $(htdocsdir) || $(MKINSTALLDIRS) $(htdocsdir)
97         @test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(htdocsdir))
98         @test -d $(prefix)/manual || $(MKINSTALLDIRS) $(prefix)/manual
99         @test -d $(top_srcdir)/docs/manual && (cd $(top_srcdir)/docs/manual && cp -rp * $(prefix)/manual)
100         @(cd $(htdocsdir) && find . -name "CVS" -print | xargs rm -rf {} \;)
101
102 install-error:
103         @echo Installing error documents
104         @test -d $(errordir) || $(MKINSTALLDIRS) $(errordir)
105         @(cd $(top_srcdir)/docs/error && cp -rp * $(errordir))
106         @(cd $(errordir) && find . -name "CVS" -print | xargs rm -rf {} \;)
107
108 install-icons:
109         @echo Installing icons
110         @test -d $(iconsdir) || $(MKINSTALLDIRS) $(iconsdir)
111         @(cd $(top_srcdir)/docs/icons && cp -rp * $(iconsdir))
112         @(cd $(iconsdir) && find . -name "CVS" -print | xargs rm -rf {} \;)
113
114 install-cgi:
115         @echo Installing CGIs
116         @test -d $(cgidir) || $(MKINSTALLDIRS) $(cgidir)
117         @(cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(cgidir))
118         @(cd $(cgidir) && find . -name "CVS" -print | xargs rm -rf {} \;)
119
120 install-other:
121         @test -d $(logfiledir) || $(MKINSTALLDIRS) $(logfiledir)
122         @for ext in dll x; do \
123                 file=apachecore.$$ext; \
124                 if test -f $$file; then \
125                         cp -p $$file $(bindir); \
126                 fi; \
127         done; \
128         file=httpd.dll; \
129         if test -f $$file; then \
130                 cp -p $$file $(bindir); \
131         fi;
132
133 install-include:
134         @echo Installing header files
135         @test -d $(includedir)     || $(MKINSTALLDIRS) $(includedir)
136         @cp -p include/*.h $(srcdir)/include/*.h $(includedir)
137         @cp -p $(srcdir)/os/$(OS_DIR)/os.h $(includedir)
138         @if test -f $(srcdir)/os/$(OS_DIR)/os-inline.c; then \
139             cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(includedir); \
140         fi;
141         @cp -p $(srcdir)/server/mpm/$(MPM_NAME)/*.h $(includedir)
142         @cp -p $(srcdir)/modules/dav/main/mod_dav.h $(includedir)
143         @cp -p $(srcdir)/modules/filters/mod_include.h $(includedir)
144         @cp -p $(srcdir)/modules/generators/mod_cgi.h $(includedir)
145         @cp -p $(srcdir)/modules/http/mod_core.h $(includedir)
146         @cp -p $(srcdir)/modules/proxy/mod_proxy.h $(includedir)
147         @cp -p $(srcdir)/modules/ssl/*.h $(includedir)
148         @cp -p $(srcdir)/srclib/pcre/*.h $(includedir)
149         @cp -p $(srcdir)/srclib/apr/include/*.h $(includedir)
150         @cp -p $(srcdir)/srclib/apr-util/include/*.h $(includedir)
151         @cp -p $(srcdir)/os/$(OS_DIR)/*.h $(includedir)
152         @chmod 644 $(includedir)/*.h
153
154 install-man:
155         @echo Installing man pages
156         @test -d $(mandir)      || $(MKINSTALLDIRS) $(mandir)
157         @test -d $(mandir)/man1 || $(MKINSTALLDIRS) $(mandir)/man1
158         @test -d $(mandir)/man8 || $(MKINSTALLDIRS) $(mandir)/man8
159         @cp -p $(top_srcdir)/docs/man/*.1 $(mandir)/man1
160         @cp -p $(top_srcdir)/docs/man/*.8 $(mandir)/man8
161
162 install-suexec:
163         @if test -f $(builddir)/support/suexec; then \
164             test -d $(sbindir) || $(MKINSTALLDIRS) $(sbindir); \
165             $(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(sbindir); \
166             chmod 4755 $(sbindir)/suexec; \
167         fi
168
169 suexec:
170         cd support && make suexec
171
172 include $(top_srcdir)/os/os2/core.mk