root/cherokee/trunk/Makefile.am @ 2870

Revision 2870, 3.9 KB (checked in by alo, 19 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    \
17cherokee-tweak.1     \
18cherokee-admin.1     \
19cherokee-worker.1
20
21# pkg-config
22pkgconfigdir = $(libdir)/pkgconfig
23pkgconfig_DATA = cherokee.pc
24
25# Configuration files
26cherokeeconfdir = $(sysconfdir)/cherokee
27cherokeeadmindir = $(datadir)/cherokee/admin
28
29.h.pre.h:
30        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" $< > $@
31.sample.pre.sample:
32        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" $< > $@
33
34
35CONSTANTS_PRE = \
36constants.h.pre
37
38CONSTANTS = \
39$(CONSTANTS_PRE:.h.pre=.h)
40
41
42CONFS_PRE =              \
43cherokee.conf.sample.pre \
44performance.conf.sample.pre
45
46CONFS = \
47$(CONFS_PRE:.sample.pre=.sample)
48
49WINDOWS_PORT_FILES = \
50config.h.win32
51
52CLEANFILES = \
53$(CONFS) \
54$(CONSTANTS)
55
56DISTCLEANFILES = \
57cherokee.pc
58
59COMPILATION_TESTS = \
60debian_testing.sh   \
61debian_testing_chroot.sh
62
63
64EXTRA_DIST =          \
65http-cherokee.xml     \
66cherokee.spec         \
67cherokee.spec.in      \
68SUNWcherokee.spec     \
69pam.d_cherokee        \
70cherokee.pc.in        \
71$(m4data_DATA)        \
72$(CONFS_PRE)          \
73$(CONSTANTS_PRE)      \
74$(man_MANS)           \
75$(WINDOWS_PORT_FILES) \
76$(COMPILATION_TESTS)
77
78all-local: $(CONSTANTS) $(CONFS)
79
80install-data-local-config:
81        @$(mkinstalldirs) $(DESTDIR)$(pkgincludedir);
82        $(INSTALL_DATA) $(top_builddir)/config.h $(DESTDIR)$(pkgincludedir)/cherokee-config.h
83
84uninstall-local-config:
85        @if test -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; then \
86                echo "rm -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h"; \
87                $(RM) -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; \
88        fi
89
90install-data-local: $(CONFS) install-data-local-config
91        @$(mkinstalldirs) $(DESTDIR)$(localstatedir)
92        @$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
93        @$(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
94        @$(mkinstalldirs) $(DESTDIR)$(cherokeeconfdir)
95        @$(mkinstalldirs) $(DESTDIR)$(cherokeeconfdir)/ssl
96        @$(mkinstalldirs) $(DESTDIR)$(cherokeeadmindir)
97        @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \
98                echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \
99        else \
100                $(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \
101        fi
102        $(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeadmindir)/cherokee.conf.sample
103        @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \
104                echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \
105        else \
106                $(INSTALL_DATA) $(top_builddir)/performance.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \
107        fi
108        @if test -d $(DESTDIR)$(sysconfdir)/pam.d && test ! -d $(DESTDIR)$(sysconfdir)/pam.d/cherokee ; then \
109                $(INSTALL_DATA) $(top_srcdir)/pam.d_cherokee $(DESTDIR)$(sysconfdir)/pam.d/cherokee; \
110        fi
111        $(mkinstalldirs) $(DESTDIR)$(localstatedir)
112
113uninstall-local: uninstall-local-config
114        @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \
115                echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \
116                $(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \
117        fi
118        @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \
119                echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \
120                $(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \
121        fi
122
123test:
124        $(MAKE) -C qa test
Note: See TracBrowser for help on using the browser.