This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.am
155 lines (128 loc) · 5.76 KB
/
Makefile.am
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
## Cherokee: Makefile.am -*- makefile -*-
SUBDIRS = po m4 www icons themes qa doc . admin contrib cherokee cget packages dbslayer
SUFFIXES = .sample.pre .sample .h.pre .h .xml.pre .xml
ACLOCAL_AMFLAGS = -I m4
bin_SCRIPTS = cherokee-config
# M4 macro file for inclusion with autoconf
m4datadir = "$(datadir)/aclocal"
m4data_DATA = cherokee.m4
# Man pag
man_MANS = \
cherokee.1 \
cherokee-config.1 \
cherokee-tweak.1 \
cherokee-admin.1 \
cherokee-worker.1 \
cherokee-admin-launcher.1
# pkg-config
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = cherokee.pc
# Configuration files
cherokeeconfdir = $(sysconfdir)/cherokee
cherokeeadmindir = $(datadir)/cherokee/admin
.h.pre.h:
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|%cgiroot%|${CGI_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
.sample.pre.sample:
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|%cgiroot%|${CGI_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
.xml.pre.xml:
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|%cgiroot%|${CGI_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
CONSTANTS_PRE = \
constants.h.pre
CONSTANTS = \
$(CONSTANTS_PRE:.h.pre=.h)
CONFS_PRE = \
cherokee.conf.sample.pre \
performance.conf.sample.pre
CONFS = \
$(CONFS_PRE:.sample.pre=.sample)
XMLS_PRE = \
http-cherokee.xml.pre
XMLS = \
$(XMLS_PRE:.xml.pre=.xml)
CLEANFILES = \
$(XMLS) \
$(CONFS) \
$(CONSTANTS)
DISTCLEANFILES = \
cherokee.pc
COMPILATION_TESTS = \
debian_testing.sh \
debian_testing_chroot.sh
EXTRA_DIST = \
http-cherokee.xml \
cherokee.spec \
cherokee.spec.in \
org.cherokee.webserver.plist \
org.cherokee.webserver.plist.in \
SUNWcherokee.spec \
pam.d_cherokee \
cherokee.pc.in \
developers.py \
$(m4data_DATA) \
$(XMLS_PRE) \
$(CONFS_PRE) \
$(CONSTANTS_PRE) \
$(man_MANS) \
$(COMPILATION_TESTS)
all-local: $(CONSTANTS) $(CONFS) $(XMLS) add_user_group
add_user_group: cherokee.conf.sample
@if test "x$(WWW_USER)" != "x" ; then \
grep -e '^server.user' cherokee.conf.sample >/dev/null 2>/dev/null || ( \
echo "Adding default user '$(WWW_USER)' to cherokee.conf.sample.."; \
echo 'server!user = '$(WWW_USER) >> cherokee.conf.sample; \
); \
fi
@if test "x$(WWW_GROUP)" != "x" ; then \
grep -e '^server.group' cherokee.conf.sample >/dev/null 2>/dev/null || ( \
echo "Adding default group '$(WWW_GROUP)' to cherokee.conf.sample.."; \
echo 'server!group = '$(WWW_GROUP) >> cherokee.conf.sample; \
); \
fi
install-data-local-config:
@$(mkinstalldirs) $(DESTDIR)$(pkgincludedir);
$(INSTALL_DATA) $(top_builddir)/config.h $(DESTDIR)$(pkgincludedir)/cherokee-config.h
uninstall-local-config:
@if test -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; then \
echo "rm -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h"; \
$(RM) -f $(DESTDIR)$(pkgincludedir)/cherokee-config.h; \
fi
install-data-local: $(CONFS) install-data-local-config
@$(mkinstalldirs) $(DESTDIR)$(localstatedir)
@$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
@$(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
@$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/cherokee/graphs/images
@$(mkinstalldirs) $(DESTDIR)$(cherokeeconfdir)
@$(mkinstalldirs) $(DESTDIR)$(cherokeeadmindir)
@if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \
echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \
else \
$(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \
fi
$(INSTALL_DATA) $(top_builddir)/cherokee.conf.sample $(DESTDIR)$(cherokeeadmindir)/cherokee.conf.sample
$(INSTALL_DATA) $(top_builddir)/performance.conf.sample $(DESTDIR)$(cherokeeadmindir)/performance.conf.sample
@if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \
echo "$@ will not overwrite existing $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \
else \
$(INSTALL_DATA) $(top_builddir)/performance.conf.sample $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \
fi
@if test -d $(DESTDIR)$(sysconfdir)/pam.d && test ! -d $(DESTDIR)$(sysconfdir)/pam.d/cherokee ; then \
$(INSTALL_DATA) $(top_srcdir)/pam.d_cherokee $(DESTDIR)$(sysconfdir)/pam.d/cherokee; \
fi
$(mkinstalldirs) $(DESTDIR)$(localstatedir)
uninstall-local: uninstall-local-config
# @if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf ; then \
# echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf"; \
# $(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf; \
# fi
@if test -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample ; then \
echo "rm -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample"; \
$(RM) -f $(DESTDIR)$(cherokeeconfdir)/cherokee.conf.perf_sample; \
fi
$(RM) -f $(DESTDIR)$(cherokeeadmindir)/cherokee.conf.sample
$(RM) -f $(DESTDIR)$(cherokeeadmindir)/performance.conf.sample
test:
$(MAKE) -C doc test
$(MAKE) -C admin test
$(MAKE) -C qa test
update-po:
$(MAKE) -C po/admin update-po