root/cherokee/trunk/Makefile.am

Revision 3999, 5.5 kB (checked in by taher, 3 months ago)

Clean up: Trims trailing spaces.

Line 
1 ## Cherokee: Makefile.am  -*- makefile -*-
2
3 SUBDIRS = po m4 www icons themes qa doc . admin contrib cherokee cget packages dbslayer
4 SUFFIXES = .sample.pre .sample .h.pre .h .xml.pre .xml
5 ACLOCAL_AMFLAGS = -I m4
6
7 bin_SCRIPTS = cherokee-config
8
9 # M4 macro file for inclusion with autoconf
10 m4datadir = "$(datadir)/aclocal"
11 m4data_DATA = cherokee.m4
12
13 # Man pag
14 man_MANS =           \
15 cherokee.1           \
16 cherokee-config.1    \
17 cherokee-tweak.1     \
18 cherokee-admin.1     \
19 cherokee-worker.1
20
21 # pkg-config
22 pkgconfigdir = $(libdir)/pkgconfig
23 pkgconfig_DATA = cherokee.pc
24
25 # Configuration files
26 cherokeeconfdir = $(sysconfdir)/cherokee
27 cherokeeadmindir = $(datadir)/cherokee/admin
28
29 .h.pre.h:
30         sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%sbindir%|${sbindir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%localstatedir%|${localstatedir}|g; s|%libdir%|${libdir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
31 .sample.pre.sample:
32         sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%sbindir%|${sbindir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%localstatedir%|${localstatedir}|g; s|%libdir%|${libdir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
33 .xml.pre.xml:
34         sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%sbindir%|${sbindir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%localstatedir%|${localstatedir}|g; s|%libdir%|${libdir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
35
36
37 CONSTANTS_PRE = \
38 constants.h.pre
39
40 CONSTANTS = \
41 $(CONSTANTS_PRE:.h.pre=.h)
42
43 CONFS_PRE =              \
44 cherokee.conf.sample.pre \
45 performance.conf.sample.pre
46
47 CONFS = \
48 $(CONFS_PRE:.sample.pre=.sample)
49
50 XMLS_PRE = \
51 http-cherokee.xml.pre
52
53 XMLS = \
54 $(XMLS_PRE:.xml.pre=.xml)
55
56
57 WINDOWS_PORT_FILES = \
58 config.h.win32
59
60 CLEANFILES = \
61 $(XMLS) \
62 $(CONFS) \
63 $(CONSTANTS)
64
65 DISTCLEANFILES = \
66 cherokee.pc
67
68 COMPILATION_TESTS = \
69 debian_testing.sh   \
70 debian_testing_chroot.sh
71
72
73 EXTRA_DIST =          \
74 http-cherokee.xml     \
75 cherokee.spec         \
76 cherokee.spec.in      \
77 SUNWcherokee.spec     \
78 pam.d_cherokee        \
79 cherokee.pc.in        \
80 developers.py         \
81 svnlog2changelog.py   \
82 gitlog2changelog.py   \
83 changelog-update.sh   \
84 $(m4data_DATA)        \
85 $(XMLS_PRE)           \
86 $(CONFS_PRE)          \
87 $(CONSTANTS_PRE)      \
88 $(man_MANS)           \
89 $(WINDOWS_PORT_FILES) \
90 $(COMPILATION_TESTS)
91
92 all-local: $(CONSTANTS) $(CONFS) $(XMLS) add_user_group
93
94 add_user_group: cherokee.conf.sample
95         @if test "x$(WWW_USER)" != "x" ; then \
96                 grep -e '^server.user' cherokee.conf.sample >/dev/null 2>/dev/null || ( \
97                         echo "Adding default user '$(WWW_USER)' to cherokee.conf.sample.."; \
98                         echo 'server!user = '$(WWW_USER) >> cherokee.conf.sample; \
99                 ); \
100         fi
101         @if test "x$(WWW_GROUP)" != "x" ; then \
102                 grep -e '^server.group' cherokee.conf.sample >/dev/null 2>/dev/null || ( \
103                         echo "Adding default group '$(WWW_GROUP)' to cherokee.conf.sample.."; \
104                         echo 'server!group = '$(WWW_GROUP) >> cherokee.conf.sample; \
105                 ); \
106         fi
107
108 install-data-local-config:
109         @$(mkinstalldirs) $(DESTDIR)$(pkgincludedir);
110         $(INSTALL_DATA) $(top_builddir)/config.h $(DESTDIR)$(pkgincludedir)/cherokee-config.h
111
112 uninstall-local-config:
113         @if test -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; then \
114                 echo "rm -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h"; \
115                 $(RM) -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; \
116         fi
117
118 install-data-local: $(CONFS) install-data-local-config
119         @$(mkinstalldirs) $(DESTDIR)$(localstatedir)
120         @$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
121         @$(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
122         @$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/cherokee/graphs/images
123         @$(mkinstalldirs) $(DESTDIR)$(cherokeeconfdir)
124         @$(mkinstalldirs) $(DESTDIR)$(cherokeeadmindir)
125         @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \
126                 echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \
127         else \
128                 $(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \
129         fi
130         $(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeadmindir)/cherokee.conf.sample
131         $(INSTALL_DATA) $(top_builddir)/performance.conf.sample $(DESTDIR)$(cherokeeadmindir)/performance.conf.sample
132         @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \
133                 echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \
134         else \
135                 $(INSTALL_DATA) $(top_builddir)/performance.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \
136         fi
137         @if test -d $(DESTDIR)$(sysconfdir)/pam.d && test ! -d $(DESTDIR)$(sysconfdir)/pam.d/cherokee ; then \
138                 $(INSTALL_DATA) $(top_srcdir)/pam.d_cherokee $(DESTDIR)$(sysconfdir)/pam.d/cherokee; \
139         fi
140         $(mkinstalldirs) $(DESTDIR)$(localstatedir)
141
142 uninstall-local: uninstall-local-config
143         @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \
144                 echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \
145                 $(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \
146         fi
147         @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \
148                 echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \
149                 $(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \
150         fi
151         $(RM) -f $(DESTDIR)$(cherokeeadmindir)/cherokee.conf.sample
152         $(RM) -f $(DESTDIR)$(cherokeeadmindir)/performance.conf.sample
153
154 test:
155         $(MAKE) -C doc test
156         $(MAKE) -C qa test
157
158 update-po:
159         $(MAKE) -C po/admin update-po
Note: See TracBrowser for help on using the browser.