]> granicus.if.org Git - apache/blob - Makefile.in
Do not install the binaries from the support directory twice.
[apache] / Makefile.in
1
2 SUBDIRS = srclib os server modules support
3
4 PROGRAM_NAME         = $(progname)
5 PROGRAM_SOURCES      = modules.c
6 PROGRAM_LDADD        = $(EXTRA_LDFLAGS) $(HTTPD_LDFLAGS) \
7                        $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS)
8 PROGRAM_DEPENDENCIES = \
9   $(BUILTIN_LIBS) \
10   $(MPM_LIB) \
11   server/libmain.la \
12   os/$(OS_DIR)/libos.la \
13   $(AP_LIBS)
14
15 PROGRAMS        = $(PROGRAM_NAME)
16 targets         = $(PROGRAMS) $(other_targets)
17 phony_targets   = $(srcdir)/buildmark.c
18 install_targets = install-conf install-htdocs install-icons install-other \
19         install-cgi install-include install-suexec
20 DISTCLEAN_TARGETS  = include/ap_config_auto.h include/ap_config_path.h \
21         modules.c libtool
22 EXTRACLEAN_TARGETS = configure include/ap_config_auto.h.in \
23         generated_lists
24
25 include $(top_srcdir)/build/rules.mk
26 include $(top_srcdir)/build/program.mk
27
28 install-conf:
29         @echo Installing configuration files
30         @test -d $(sysconfdir) || $(MKINSTALLDIRS) $(sysconfdir)
31         @cd docs/conf; \
32         for i in mime.types magic; do \
33                 $(INSTALL_DATA) $$i $(sysconfdir); \
34         done; \
35         for i in *-std*; do \
36                 sed -e 's#@@ServerRoot@@#$(prefix)#g' \
37                     -e 's#@@Port@@#$(PORT)#g' \
38                         < $$i > $(sysconfdir)/$$i; \
39                 chmod 0644 $(sysconfdir)/$$i; \
40                 file=`echo $$i|sed s/-std//`; \
41                 if [ "$$file" = "httpd.conf" ]; then \
42                         file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
43                 fi; \
44                 if test "$$file" != "$$i" && test ! -f $(sysconfdir)/$$file; then \
45                         $(INSTALL_DATA) $(sysconfdir)/$$i $(sysconfdir)/$$file; \
46                 fi; \
47         done
48
49 htdocs-srcdir = docs/docroot
50
51 docs::
52         mkdir -p ./docs/api
53         srclib/apr/build/scandoc.pl -i./build/default.pl -p./docs/api/ ./include/*.h
54
55 dox::
56         $(HOME)/software/unpacked/doxygen-1.2.5/bin/doxygen docs/doxygen.conf
57
58 install-htdocs:
59         @echo Installing HTML documents
60         @test -d $(htdocsdir) || $(MKINSTALLDIRS) $(htdocsdir)
61         @test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(htdocsdir))
62         @test -d $(htdocsdir)/manual || $(MKINSTALLDIRS) $(htdocsdir)/manual
63         @test -d docs/manual && (cd docs/manual && cp -rp * $(htdocsdir)/manual)
64         @(cd $(htdocsdir) && find . -name "CVS" -print | xargs rm -rf {} \;)
65
66 install-icons:
67         @echo Installing icons
68         @test -d $(iconsdir) || $(MKINSTALLDIRS) $(iconsdir)
69         @(cd docs/icons && cp -rp * $(iconsdir))
70         @(cd $(iconsdir) && find . -name "CVS" -print | xargs rm -rf {} \;)
71
72 install-cgi:
73         @echo Installing CGIs
74         @test -d $(cgidir) || $(MKINSTALLDIRS) $(cgidir)
75         @(cd docs/cgi-examples && cp -rp * $(cgidir))
76         @(cd $(cgidir) && find . -name "CVS" -print | xargs rm -rf {} \;)
77
78 install-other:
79         @test -d $(logfiledir) || $(MKINSTALLDIRS) $(logfiledir)
80         @for ext in dll x; do \
81                 file=apachecore.$$ext; \
82                 if test -f $$file; then \
83                         cp -p $$file $(bindir); \
84                 fi; \
85         done;
86
87 install-include:
88         @echo Installing header files
89         @test -d $(includedir)     || $(MKINSTALLDIRS) $(includedir)
90         @cp -p include/*.h $(srcdir)/include/*.h $(includedir)
91         @cp -p $(srcdir)/os/$(OS_DIR)/os.h $(includedir)
92         @if test -f $(srcdir)/os/$(OS_DIR)/os-inline.c; then \
93             cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(includedir); \
94         fi;
95         @cp -p $(srcdir)/server/mpm/$(MPM_NAME)/*.h $(includedir)
96         @cp -p $(srcdir)/modules/dav/main/mod_dav.h $(includedir)
97         @cp -p $(srcdir)/modules/filters/mod_include.h $(includedir)
98         @cp -p $(srcdir)/srclib/pcre/*.h $(includedir)
99         @cp -p $(srcdir)/srclib/apr/include/*.h $(includedir)
100         @cp -p $(srcdir)/srclib/apr-util/include/*.h $(includedir)
101         @cp -p $(srcdir)/os/$(OS_DIR)/*.h $(includedir)
102         @chmod 644 $(includedir)/*.h
103
104 install-suexec:
105         @if test -f $(builddir)/support/suexec; then \
106             test -d $(sbindir) || $(MKINSTALLDIRS) $(sbindir); \
107             cp -p $(srcdir)/support/suexec $(sbindir); \
108             chmod 4755 $(sbindir)/suexec; \
109         fi
110
111 suexec:
112         cd support && make suexec
113
114 include $(top_srcdir)/os/os2/core.mk