root/cherokee/trunk/Makefile.am @ 2577

Revision 2577, 3.9 KB (checked in by alo, 21 months ago)
Line 
1## Cherokee: Makefile.am  -*- makefile -*-
2
3SUBDIRS = m4 www icons themes qa doc . admin contrib cherokee cget windows dbslayer
4SUFFIXES = .sample.pre .sample .h.pre .h
5ACLOCAL_AMFLAGS = -I m4
6
7bin_SCRIPTS = cherokee-config
8
9# M4 macro file for inclusion with autoconf
10m4datadir = "$(datadir)/aclocal"
11m4data_DATA = cherokee.m4
12
13# Man pag
14man_MANS =           \
15cherokee.1           \
16cherokee-config.1    \
17spawn-fcgi.1         \
18cherokee-tweak.1     \
19cherokee-admin.1     \
20cherokee-worker.1
21
22# pkg-config
23pkgconfigdir = $(libdir)/pkgconfig
24pkgconfig_DATA = cherokee.pc
25
26# Configuration files
27cherokeeconfdir = $(sysconfdir)/cherokee
28cherokeeadmindir = $(datadir)/cherokee/admin
29
30.h.pre.h:
31        sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%datadir%|${datadir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%libdir%|${libdir}|g; s|%localstatedir%|${localstatedir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%phpcgi%|${PHPCGI}|g" $< > $@
32.sample.pre.sample:
33        sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%datadir%|${datadir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%libdir%|${libdir}|g; s|%localstatedir%|${localstatedir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%phpcgi%|${PHPCGI}|g" $< > $@
34
35
36CONSTANTS_PRE = \
37constants.h.pre
38
39CONSTANTS = \
40$(CONSTANTS_PRE:.h.pre=.h)
41
42
43CONFS_PRE =              \
44cherokee.conf.sample.pre \
45performance.conf.sample.pre
46
47CONFS = \
48$(CONFS_PRE:.sample.pre=.sample)
49
50WINDOWS_PORT_FILES = \
51config.h.win32
52
53CLEANFILES = \
54$(CONFS) \
55$(CONSTANTS)
56
57DISTCLEANFILES = \
58cherokee.pc
59
60COMPILATION_TESTS = \
61debian_testing.sh   \
62debian_testing_chroot.sh
63
64
65EXTRA_DIST =          \
66http-cherokee.xml     \
67cherokee.spec         \
68cherokee.spec.in      \
69SUNWcherokee.spec     \
70pam.d_cherokee        \
71cherokee.pc.in        \
72$(m4data_DATA)        \
73$(CONFS_PRE)          \
74$(CONSTANTS_PRE)      \
75$(man_MANS)           \
76$(WINDOWS_PORT_FILES) \
77$(COMPILATION_TESTS)
78
79all-local: $(CONSTANTS) $(CONFS)
80
81install-data-local-config:
82        @$(mkinstalldirs) $(DESTDIR)$(pkgincludedir);
83        $(INSTALL_DATA) $(top_builddir)/config.h $(DESTDIR)$(pkgincludedir)/cherokee-config.h
84
85uninstall-local-config:
86        @if test -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; then \
87                echo "rm -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h"; \
88                $(RM) -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; \
89        fi
90
91install-data-local: $(CONFS) install-data-local-config
92        @$(mkinstalldirs) $(DESTDIR)$(localstatedir)
93        @$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
94        @$(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
95        @$(mkinstalldirs) $(DESTDIR)$(cherokeeconfdir)
96        @$(mkinstalldirs) $(DESTDIR)$(cherokeeconfdir)/ssl
97        @$(mkinstalldirs) $(DESTDIR)$(cherokeeadmindir)
98        @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \
99                echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \
100        else \
101                $(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \
102        fi
103        $(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeadmindir)/cherokee.conf.sample
104        @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \
105                echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \
106        else \
107                $(INSTALL_DATA) $(top_builddir)/performance.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \
108        fi
109        @if test -d $(DESTDIR)$(sysconfdir)/pam.d && test ! -d $(DESTDIR)$(sysconfdir)/pam.d/cherokee ; then \
110                $(INSTALL_DATA) $(top_srcdir)/pam.d_cherokee $(DESTDIR)$(sysconfdir)/pam.d/cherokee; \
111        fi
112        $(mkinstalldirs) $(DESTDIR)$(localstatedir)
113
114uninstall-local: uninstall-local-config
115        @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \
116                echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \
117                $(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \
118        fi
119        @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \
120                echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \
121                $(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \
122        fi
123
124test:
125        $(MAKE) -C qa test
Note: See TracBrowser for help on using the browser.