root/cherokee/branches/0.6/Makefile.am

Revision 1347, 4.7 kB (checked in by alo, 9 months ago)

--

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