-
Notifications
You must be signed in to change notification settings - Fork 2
/
GNUmakefile.in
291 lines (222 loc) · 10.1 KB
/
GNUmakefile.in
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
#!/usr/bin/make -f
# Time-stamp: <21-Jun-2012 04:23:32 PDT by rich.pixley@palm.com>
# Copyright (c) 2008 - 2012 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
default: all
DESTDIR :=
srcdir := @srcdir@
VPATH := $(srcdir):$(srcdir)/za-base
cmptname := zoo-animals
preowner := za-pre
postowner := za-post
prefix := @prefix@
exec_prefix := @exec_prefix@
bindir := @bindir@
sbindir := @sbindir@
libexecdir := @libexecdir@
mylibexecdir := $(libexecdir)/$(cmptname)
datarootdir := @datarootdir@
datadir := @datadir@/$(cmptname)
sysconfdir := @sysconfdir@
mysysconfdir := $(sysconfdir)/$(cmptname)
sharedstatedir = @sharedstatedir@
localstatedir := @localstatedir@
mylocalstatedir := $(localstatedir)/$(cmptname)
prelocalstatedir := $(mylocalstatedir)/za-pre
postlocalstatedir := $(mylocalstatedir)/za-post
docdir := $(datarootdir)/doc
mandir := @mandir@
man8dir := $(mandir)/man8
man8ext := .8
datadirpre := $(datadir)/za-pre
datadirpost := $(datadir)/za-post
datadirpostd := $(datadir)/za-postd
datadirapco := $(datadir)/za-apache-config
datadirphputils := $(datadir)/za-php-utils
datadirbase := $(datadir)/za-base
datadirmachineinfo := $(datadir)/za-machine-info
datadirmachinematrix := $(datadir)/za-machine-matrix
INSTALL := @INSTALL@
INSTALL_PROGRAM := $(INSTALL)
INSTALL_SCRIPT := $(INSTALL) -m 755
INSTALL_DATA := $(INSTALL) -m 644
INSTALL_DIR := @MKDIR_P@
scriptconfigs := \
sed \
-e '/=preowner=/s::${preowner}:' \
-e '/=postowner=/s::${postowner}:' \
-e '/=prefix=/s::${prefix}:' \
-e '/=exec_prefix=/s::${exec_prefix}:' \
-e '/=bindir=/s::${bindir}:' \
-e '/=sysconfdir=/s::${mysysconfdir}:' \
-e '/=prelocalstatedir=/s::${prelocalstatedir}:' \
-e '/=postlocalstatedir=/s::${postlocalstatedir}:' \
-e '/=mylibexecdir=/s::${mylibexecdir}:' \
packages := conf php-utils apache-config base machine-info machine-matrix pre d post
.PHONY: all
all: $(packages:%=all-%)
.PHONY: $(packages:%=all-%)
$(packages:%=all-%)::
all-base:: za.css za-headers.php
COLORSCHEME := precise
za.css: za-css.in sed-$(COLORSCHEME).in
sed -f $(srcdir)/za-base/sed-$(COLORSCHEME).in < $< > $@-new
mv -f $@-new $@
za-headers.php: za-base/za-headers-php.in
$(scriptconfigs) < $< > $@-new && mv -f $@-new $@
all-conf:: ZAconf.py za.conf
ZAconf.py: za-conf/ZAconf-py.in
$(scriptconfigs) < $< > $@-new && mv -f $@-new $@
za.conf: za-conf/za-conf.in
$(scriptconfigs) < $< > $@-new && mv -f $@-new $@
all-pre:: za-pre-check-loop.sh pre-headerbar.php aliases sudoers watchdog.sh
za-pre-check-loop.sh: za-pre/za-pre-check-loop-sh.in
$(scriptconfigs) < $< > $@-new && mv -f $@-new $@
pre-headerbar.php: za-pre/pre-headerbar-php.in
$(scriptconfigs) < $< > $@-new && mv -f $@-new $@
aliases: za-pre/aliases.in
$(scriptconfigs) < $< > $@-new && mv -f $@-new $@
sudoers: za-pre/sudoers.in
$(scriptconfigs) < $< > $@-new && mv -f $@-new $@
watchdog.sh: za-pre/watchdog-sh.in
$(scriptconfigs) < $< > $@-new && mv -f $@-new $@
all-post:: za-post-check-loop.sh
za-post-check-loop.sh: za-post/za-post-check-loop-sh.in
$(scriptconfigs) < $< > $@-new && mv -f $@-new $@
.PHONY: check
check: check-post # check-pre
.PHONY: check-post
check-post: za-post/tests/GNUmakefile
$(MAKE) -C za-post/tests
.PHONY: check-pre
check-pre: za-pre/tests/GNUmakefile
$(MAKE) -C za-pre/tests
.PHONY: distclean
distclean: clean
rm -f config.status config.log GNUmakefile docs/Makefile za-*/tests/GNUmakefile
.PHONY: clean
clean:
$(MAKE) -C docs clean
$(MAKE) -C za-pre/tests clean
$(MAKE) -C za-post/tests clean
rm -rf build *.pyc apidocs za.css za-conf/ZAconf.py
doctrigger = $(srcdir)/docs/build/html/index.html
.PHONY: docs html
html docs: ${doctrigger}
${doctrigger}: docs/index.rst
$(MAKE) -C docs html
install: $(packages:%=install-%)
install-conf: all-conf
$(INSTALL_DIR) $(DESTDIR)$(docdir)/za-conf
$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(docdir)/za-conf/copyright
$(INSTALL_DIR) $(DESTDIR)$(man8dir)
$(INSTALL_DATA) $(srcdir)/za-conf/ZAconf.man $(DESTDIR)$(man8dir)/ZAconf$(man8ext)
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_SCRIPT) -m 0755 ZAconf.py $(DESTDIR)$(bindir)/ZAconf
$(INSTALL_DIR) $(DESTDIR)$(mysysconfdir)
$(INSTALL_DATA) za.conf $(DESTDIR)$(mysysconfdir)/za.conf
install-php-utils: all-php-utils
$(INSTALL_DIR) $(DESTDIR)$(docdir)/za-php-utils
$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(docdir)/za-php-utils/copyright
$(INSTALL_DIR) $(DESTDIR)$(datadirphputils)
$(INSTALL_DATA) $(srcdir)/za-php-utils/cat.php $(DESTDIR)$(datadirphputils)/cat.php
$(INSTALL_DATA) $(srcdir)/za-php-utils/tail.php $(DESTDIR)$(datadirphputils)/tail.php
install-apache-config: all-apache-config
$(INSTALL_DIR) $(DESTDIR)$(docdir)/za-apache-config
$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(docdir)/za-apache-config/copyright
$(INSTALL_DIR) $(DESTDIR)$(datadirapco)
$(INSTALL_DATA) $(srcdir)/za-apache-config/site-template $(DESTDIR)$(datadirapco)/site-template
install-base: all-base
$(INSTALL_DIR) $(DESTDIR)$(docdir)/za-base
$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(docdir)/za-base/copyright
$(INSTALL_DIR) $(DESTDIR)$(mysysconfdir)
$(INSTALL_DATA) $(srcdir)/za-base/apache.conf $(DESTDIR)$(mysysconfdir)/apache.conf
$(INSTALL_DIR) $(DESTDIR)$(mylibexecdir)
$(INSTALL_SCRIPT) $(srcdir)/za-base/merge-timings.py $(DESTDIR)$(mylibexecdir)/merge-timings
$(INSTALL_DIR) $(DESTDIR)$(datadirbase)
$(INSTALL_DATA) $(srcdir)/za-base/index.php $(DESTDIR)$(datadir)/index.php
$(INSTALL_DATA) za-headers.php $(DESTDIR)$(datadirbase)/za-headers.php
$(INSTALL_DATA) za.css $(DESTDIR)$(datadirbase)/za.css
install-machine-info: all-machine-info
$(INSTALL_DIR) $(DESTDIR)$(docdir)/za-machine-info
$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(docdir)/za-machine-info/copyright
$(INSTALL_DIR) $(DESTDIR)$(datadirmachineinfo)
$(INSTALL_DATA) $(srcdir)/za-machine-info/index.php $(DESTDIR)$(datadirmachineinfo)/index.php
install-machine-matrix: all-machine-matrix
$(INSTALL_DIR) $(DESTDIR)$(docdir)/za-machine-matrix
$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(docdir)/za-machine-matrix/copyright
$(INSTALL_DIR) $(DESTDIR)$(datadirmachinematrix)
$(INSTALL_DATA) $(srcdir)/za-machine-matrix/index.php $(DESTDIR)$(datadirmachinematrix)/index.php
$(INSTALL_DATA) $(srcdir)/za-machine-matrix/post.php $(DESTDIR)$(datadirmachinematrix)/post.php
$(INSTALL_DATA) $(srcdir)/za-machine-matrix/mm-headerbar.php $(DESTDIR)$(datadirmachinematrix)/mm-headerbar.php
$(INSTALL_DATA) $(srcdir)/za-machine-matrix/overview.php $(DESTDIR)$(datadirmachinematrix)/overview.php
$(INSTALL_DATA) $(srcdir)/za-machine-matrix/post.php $(DESTDIR)$(datadirmachinematrix)/post.php
install-pre: all-pre
$(INSTALL_DIR) $(DESTDIR)$(docdir)/za-pre
$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(docdir)/za-pre/copyright
$(INSTALL_DIR) $(DESTDIR)$(mylibexecdir)
$(INSTALL_SCRIPT) za-pre-check-loop.sh $(DESTDIR)$(mylibexecdir)/za-pre-check-loop
$(INSTALL_SCRIPT) watchdog.sh $(DESTDIR)$(mylibexecdir)/watchdog
$(INSTALL_SCRIPT) $(srcdir)/za-pre/WorkQueue.py $(DESTDIR)$(mylibexecdir)/WorkQueue
$(INSTALL_SCRIPT) $(srcdir)/za-pre/Speculator.py $(DESTDIR)$(mylibexecdir)/Speculator
$(INSTALL_SCRIPT) $(srcdir)/za-pre/hookscript-stub.sh $(DESTDIR)$(mylibexecdir)/hookscript-stub
$(INSTALL_SCRIPT) $(srcdir)/za-pre/hookscript-zoo-animals.sh $(DESTDIR)$(mylibexecdir)/hookscript-zoo-animals
$(INSTALL_SCRIPT) $(srcdir)/za-pre/hookscript-open-webos.sh $(DESTDIR)$(mylibexecdir)/hookscript-open-webos
$(INSTALL_DIR) $(DESTDIR)$(datadirpre)
$(INSTALL_DATA) aliases $(DESTDIR)$(datadirpre)/aliases
$(INSTALL_DATA) sudoers $(DESTDIR)$(datadirpre)/sudoers
$(INSTALL_DATA) $(srcdir)/za-pre/index.php $(DESTDIR)$(datadirpre)/index.php
$(INSTALL_DATA) $(srcdir)/za-pre/log.php $(DESTDIR)$(datadirpre)/log.php
$(INSTALL_DATA) $(srcdir)/za-pre/status.php $(DESTDIR)$(datadirpre)/status.php
$(INSTALL_DATA) pre-headerbar.php $(DESTDIR)$(datadirpre)/pre-headerbar.php
$(INSTALL_DATA) $(srcdir)/za-pre/configs.php $(DESTDIR)$(datadirpre)/configs.php
install-d: all-d
$(INSTALL_DIR) $(DESTDIR)$(docdir)/za-postd
$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(docdir)/za-postd/copyright
$(INSTALL_DIR) $(DESTDIR)$(mylibexecdir)
$(INSTALL_SCRIPT) $(srcdir)/za-postd/ZApostd.py $(DESTDIR)$(mylibexecdir)/ZApostd
install-post: all-post
$(INSTALL_DIR) $(DESTDIR)$(docdir)/za-post
$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(docdir)/za-post/copyright
$(INSTALL_DIR) $(DESTDIR)$(mylibexecdir)
$(INSTALL_SCRIPT) $(srcdir)/za-post/ZApostgen.py $(DESTDIR)$(mylibexecdir)/ZApostgen
$(INSTALL_SCRIPT) za-post-check-loop.sh $(DESTDIR)$(mylibexecdir)/za-post-check-loop
$(INSTALL_DIR) $(DESTDIR)$(datadirpost)
$(INSTALL_DATA) $(srcdir)/za-post/aliases $(DESTDIR)$(datadirpost)/aliases
$(INSTALL_DATA) $(srcdir)/za-post/sudoers $(DESTDIR)$(datadirpost)/sudoers
$(INSTALL_DATA) $(srcdir)/za-post/index.php $(DESTDIR)$(datadirpost)/index.php
$(INSTALL_DATA) $(srcdir)/za-post/post-headerbar.php $(DESTDIR)$(datadirpost)/post-headerbar.php
$(INSTALL_DATA) $(srcdir)/za-post/log.php $(DESTDIR)$(datadirpost)/log.php
$(INSTALL_DATA) $(srcdir)/za-post/results.php $(DESTDIR)$(datadirpost)/results.php
$(INSTALL_DATA) $(srcdir)/za-post/status.php $(DESTDIR)$(datadirpost)/status.php
.PHONY: nosetests
nosetests: ${python}
${setuppy} $@
$(srcdir)/configure: configure.ac #aclocal.m4
cd '$(srcdir)' && autoconf
GNUmakefile: GNUmakefile.in config.status
./config.status
docs/Makefile: docs/Makefile.in
./config.status
za-pre/tests/GNUmakefile: za-pre/tests/GNUmakefile.in
./config.status
za-post/tests/GNUmakefile: za-post/tests/GNUmakefile.in
./config.status
config.status: configure
./config.status --recheck
force:
TAGS: force
rm -f TAGS
find $(srcdir) -path $(srcdir)/.git -prune -o -type f -print \
| xargs etags -a