summaryrefslogtreecommitdiffstats
path: root/Makefile.in
blob: d706213f0d3ffd68900e313c1be61dafc28b2b94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
SUBDIRS = ap lib main modules os support

PROGRAM_NAME         = $(progname)
PROGRAM_SOURCES      = modules.c buildmark.c
PROGRAM_LDADD        = $(EXTRA_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS)
PROGRAM_DEPENDENCIES = \
  $(BUILTIN_LIBS) \
  $(MPM_LIB) \
  main/libmain.la \
  os/$(OS_DIR)/libos.la \
  ap/libap.la \
  lib/apr/$(LIBPRE)apr.a \
  lib/pcre/libpcreposix.a \
  lib/pcre/libpcre.a

PROGRAMS        = $(PROGRAM_NAME)
targets         = $(PROGRAMS)
phony_targets   = $(srcdir)/buildmark.c
install_targets = install-conf install-htdocs install-icons install-other \
	install-cgi install-include install-support
DISTCLEANFILES  = include/config_auto.h modules.c aclocal.m4 buildmk.stamp \
	configure generated_lists include/ap_config_auto.h \
	include/ap_config_auto.h.in include/ap_config_path.h install-sh

include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/program.mk

install-conf:
	@echo Installing configuration files
	@test -d $(sysconfdir) || $(mkinstalldirs) $(sysconfdir)
	@cd $(srcdir)/../conf; \
	for i in mime.types magic; do \
		$(INSTALL_DATA) $$i $(sysconfdir); \
	done; \
	for i in *-dist; do \
		sed -e 's#@@ServerRoot@@#$(prefix)#g' \
			< $$i > $(sysconfdir)/$$i; \
		chmod 0644 $(sysconfdir)/$$i; \
		file=`echo $$i|sed s/-dist//`; \
		if [ "$$file" = "httpd.conf" ]; then \
			file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
		fi; \
		if test "$$file" != "$$i" && test ! -f $(sysconfdir)/$$file; then \
			$(INSTALL_DATA) $(sysconfdir)/$$i $(sysconfdir)/$$file; \
		fi; \
	done

install-htdocs:
	@echo Installing HTML documents
	@test -d $(htdocsdir) || $(mkinstalldirs) $(htdocsdir)
	@(cd $(srcdir)/../htdocs && cp -rp * $(htdocsdir))

install-icons:
	@echo Installing icons
	@test -d $(iconsdir) || $(mkinstalldirs) $(iconsdir)
	@(cd $(srcdir)/../icons && cp -rp * $(iconsdir))

install-cgi:
	@echo Installing CGIs
	@test -d $(cgidir) || $(mkinstalldirs) $(cgidir)
	@(cd $(srcdir)/../cgi-bin && cp -rp * $(cgidir))

install-support:
	@echo Installing Support Binaries
	@test -d $(bindir) || $(mkinstalldirs) $(bindir)
	@cp -p $(srcdir)/support/httpd.exp $(bindir)
	@cp -p $(builddir)/support/htpasswd $(bindir)
	@cp -p $(builddir)/support/htdigest $(bindir)
	@cp -p $(builddir)/support/rotatelogs $(bindir)
	@cp -p $(builddir)/support/logresolve $(bindir)
	@cp -p $(builddir)/support/ab $(bindir)

install-other:
	@test -d $(logdir) || $(mkinstalldirs) $(logdir)

install-include:
	@echo Installing header files
	@test -d $(includedir)     || $(mkinstalldirs) $(includedir)
	@test -d $(includedir)/xml || $(mkinstalldirs) $(includedir)/xml
	@test -d $(includedir)/apr || $(mkinstalldirs) $(includedir)/apr
	@cp -p include/*.h $(srcdir)/include/*.h $(includedir)
	@cp -p $(srcdir)/os/$(OS_DIR)/os.h $(includedir)
	@cp -p $(srcdir)/os/$(OS_DIR)/os-inline.c $(includedir)
	@cp -p $(srcdir)/lib/expat-lite/*.h $(includedir)/xml
	@cp -p lib/apr/include/*.h $(srcdir)/lib/apr/include/*.h $(includedir)/apr
	@chmod 644 $(includedir)/*.h $(includedir)/xml/*.h $(includedir)/apr/*.h