forked from cockpit-project/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
310 lines (257 loc) · 8.55 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
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
NULL =
man_MANS =
BUILT_SOURCES =
CLEANFILES = $(man_MANS)
bin_PROGRAMS =
check_SCRIPTS =
check_PROGRAMS =
noinst_SCRIPTS =
libexec_PROGRAMS =
noinst_PROGRAMS =
sbin_PROGRAMS =
noinst_LIBRARIES =
noinst_DATA =
nodist_noinst_DATA =
TESTS =
dist_systemdunit_DATA =
nodist_systemdunit_DATA =
DISTCLEANFILES = \
$(srcdir)/Makefile \
node_modules \
$(NULL)
EXTRA_DIST = \
bower.json \
branding \
node_modules \
README.md \
$(NULL)
SUFFIXES = .css .min.css .min.css.gz .js .js.gz .min.js .min.js.gz .html .min.html .min.html.gz .woff .woff.gz .1 .8 .5
V_CHECK = $(V_CHECK_$(V))
V_CHECK_ = $(V_CHECK_$(AM_DEFAULT_VERBOSITY))
V_CHECK_0 = @echo " CHECK " $@;
V_GZIP = $(V_GZIP_$(V))
V_GZIP_ = $(V_GZIP_$(AM_DEFAULT_VERBOSITY))
V_GZIP_0 = @echo " GZIP " $@;
MV = mv -f
JSMODULE = $(srcdir)/tools/missing $(srcdir)/tools/jsmodule
CSSBUNDLE = $(srcdir)/tools/missing $(srcdir)/tools/cssbundle
MIN_JS_RULE = \
$(AM_V_GEN) $(MKDIR_P) $(dir $@) && \
$(srcdir)/tools/missing $(srcdir)/tools/uglifyjs $< --mangle > [email protected] && $(MV) [email protected] $@
MIN_CSS_RULE = \
$(AM_V_GEN) $(MKDIR_P) $(dir $@) && \
$(srcdir)/tools/missing $(srcdir)/tools/r.js -o cssIn=$< optimizeCss=standard logLevel=3 out=$@
MIN_HTML_RULE = \
$(AM_V_GEN) $(MKDIR_P) $(dir $@) && \
$(srcdir)/tools/missing $(srcdir)/tools/htmlmin $@ $<
GZ_RULE = \
$(V_GZIP) $(MKDIR_P) $(dir $@) && \
gzip -n -c $< > [email protected] && $(MV) [email protected] $@
.css.min.css:
$(MIN_CSS_RULE)
.js.min.js:
$(V_CHECK) $(srcdir)/tools/missing $(srcdir)/tools/jshint $<
$(MIN_JS_RULE)
.html.min.html:
$(V_CHECK) $(srcdir)/tools/missing $(srcdir)/tools/jshint --extract=always $<
$(MIN_HTML_RULE)
.min.css.min.css.gz:
$(GZ_RULE)
.min.html.min.html.gz:
$(GZ_RULE)
.js.js.gz:
$(GZ_RULE)
.min.js.min.js.gz:
$(GZ_RULE)
.woff.woff.gz:
$(GZ_RULE)
po/po.%.js: po/%.po
@$(MKDIR_P) $(dir $@)
$(AM_V_GEN) $(srcdir)/tools/missing $(srcdir)/tools/po2json --module $^ $@
ACLOCAL_AMFLAGS = -I tools ${ACLOCAL_FLAGS}
SUBDIRS = . po
DISTCHECK_CONFIGURE_FLAGS= \
--disable-debug \
--disable-coverage \
--disable-silent-rules \
--enable-prefix-only \
$(NULL)
AM_CPPFLAGS = \
-I$(top_builddir) \
-I$(top_builddir)/src \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-DSRCDIR=\"$(abs_srcdir)\" \
-DBUILDDIR=\"$(abs_builddir)\" \
-DDATADIR=\"$(datadir)\" \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)/lib/cockpit"\" \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
$(NULL)
AM_LDFLAGS = -Wl,--as-needed
LOG_DRIVER = $(top_srcdir)/tools/tap-driver
LOG_COMPILER = $(top_srcdir)/tools/tap-gtester
TEST_EXTENSIONS = .html .sh
SH_LOG_DRIVER = $(top_srcdir)/tools/tap-driver
HTML_LOG_DRIVER = $(top_srcdir)/tools/tap-driver
HTML_TEST_SERVER = $(builddir)/test-server
if WITH_PHANTOMJS
HTML_LOG_COMPILER = $(top_srcdir)/tools/tap-phantom --strip=$(top_srcdir)/ -- $(HTML_TEST_SERVER)
else
HTML_LOG_DRIVER_FLAGS = --missing=phantomjs
endif
VALGRIND_ARGS = --trace-children=no --quiet --error-exitcode=33 \
--suppressions=valgrind-suppressions --gen-suppressions=all \
--num-callers=16 --leak-check=yes --show-leak-kinds=definite \
--errors-for-leak-kinds=definite
VALGRIND_SUPPRESSIONS = \
tools/gcrypt.supp \
tools/glib.supp \
tools/pthread.supp \
tools/travis.supp \
tools/pcp.supp \
tools/unknown.supp \
tools/zlib.supp \
tools/libssh.supp \
$(NULL)
valgrind-suppressions: $(VALGRIND_SUPPRESSIONS)
$(AM_V_GEN) cat $^ > $@
check-memory: valgrind-suppressions
$(MAKE) LOG_FLAGS="-- valgrind $(VALGRIND_ARGS)" \
HTML_LOG_FLAGS="valgrind $(VALGRIND_ARGS) cockpit-bridge" \
$(AM_MAKEFLAGS) check
recheck-memory: valgrind-suppressions
$(MAKE) LOG_FLAGS="-- valgrind $(VALGRIND_ARGS)" \
HTML_LOG_FLAGS="valgrind $(VALGRIND_ARGS) cockpit-bridge" \
$(AM_MAKEFLAGS) recheck
SED_SUBST = sed \
-e 's,[@]datadir[@],$(datadir),g' \
-e 's,[@]libexecdir[@],$(libexecdir),g' \
-e 's,[@]libdir[@],$(libdir),g' \
-e 's,[@]includedir[@],$(includedir),g' \
-e 's,[@]bindir[@],$(bindir),g' \
-e 's,[@]sbindir[@],$(sbindir),g' \
-e 's,[@]prefix[@],$(prefix),g' \
-e 's,[@]exec_prefix[@],$(exec_prefix),g' \
-e 's,[@]prefix[@],$(prefix),g' \
-e 's,[@]PACKAGE[@],$(PACKAGE),g' \
-e 's,[@]VERSION[@],$(VERSION),g' \
-e 's,[@]user[@],$(COCKPIT_USER),g' \
-e 's,[@]group[@],$(COCKPIT_GROUP),g' \
-e 's,[@]selinux_config_type[@],$(COCKPIT_SELINUX_CONFIG_TYPE),g' \
$(NULL)
GDBUS_CODEGEN = $(top_srcdir)/tools/gdbus-unbreak-codegen
testassetsdir = $(datadir)/cockpit-test-assets
testassets_programs =
testassets_data =
testassets_systemdunit_data =
install-test-assets: $(testassets_programs) $(testassets_data) $(testassets_systemdunit_data)
$(MKDIR_P) $(DESTDIR)$(testassetsdir)
$(MKDIR_P) $(DESTDIR)$(systemdunitdir)
for p in $(testassets_programs); do \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(testassetsdir); \
done
cd $(srcdir); for d in $(testassets_data); do $(INSTALL_DATA) -D $$d $(DESTDIR)$(testassetsdir)/$$d; done
for d in $(testassets_systemdunit_data); do $(INSTALL_DATA) $$d $(DESTDIR)$(systemdunitdir); done
ln -sn $(libexecdir)/cockpit-bridge $(DESTDIR)$(testassetsdir)/cockpit-bridge
clean-local:
find $(builddir) -name '*.gc??' -delete
find $(srcdir) -name '*.pyc' -delete
rm -rf mock-archives
uninstall-local:: uninstall-doc-local
@true
install-data-hook::
mkdir -p $(DESTDIR)$(localstatedir)/lib/cockpit
chgrp wheel $(DESTDIR)$(localstatedir)/lib/cockpit || true
chmod 775 $(DESTDIR)$(localstatedir)/lib/cockpit
LATEST = latest/
if ENABLE_DOC
include doc/Makefile-doc.am
include doc/guide/Makefile-guide.am
include doc/man/Makefile-man.am
noinst_DATA += doc/guide/html
install-doc-local: doc/guide/html/index.html
$(MKDIR_P) $(DESTDIR)$(htmldir)
$(INSTALL_DATA) `dirname $<`/* $(DESTDIR)$(htmldir)
uninstall-doc-local:
rm -rf $(DESTDIR)$(htmldir)
dist-doc-hook:
@true
else
install-doc-local:
@true
uninstall-doc-local:
@true
dist-doc-hook:
@echo "*** doc must be enabled (ie: --enable-doc) in order to make dist or distcheck"
endif
install-data-local:: install-doc-local
@true
# Subdirectories to distribute everything that's committed to git
COMMITTED_DIST = \
bower_components/ \
pkg/ \
po/ \
tools/ \
test/ \
$(NULL)
dist-hook: dist-doc-hook
( git -C $(srcdir) ls-tree HEAD --name-only -r $(COMMITTED_DIST) || echo $(COMMITTED_DIST) ) | \
tar -C $(srcdir) -cf - -T - | tar -C $(distdir) -xvf -
echo $(VERSION) > $(distdir)/.tarball
$(srcdir)/tools/build-copying $(srcdir)/node_modules > $(distdir)/COPYING.node
$(srcdir)/tools/build-copying $(BOWER) > $(distdir)/COPYING.bower
dist-xz: distdir
tar --format=posix -cf - "$(distdir)" | xz -ec > $(distdir).tar.xz
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "$(distdir)"
distcheck-hook: dist-doc-hook
$(srcdir)/tools/check-dist $(distdir)
upload-pot:
zanata-cli push --project-config "$(srcdir)/tools/zanata.xml" -s "$(builddir)/po" -t "$(srcdir)/po"
download-po:
zanata-cli -B pull --min-doc-percent 30 --project-config "$(srcdir)/tools/zanata.xml" -s "$(builddir)/po" -t "$(srcdir)/po"
BOWER = $(srcdir)/bower_components
BOWER_CLEAN = \
$(BOWER)/patternfly/components/bootstrap-treeview \
$(BOWER)/patternfly/components/google-code-prettify \
$(BOWER)/patternfly/components/datatables* \
$(BOWER)/patternfly/components/?3 \
$(BOWER)/patternfly/components/jquery \
$(BOWER)/patternfly/components/matchHeight \
$(NULL)
update-bower:
cd $(srcdir) && bower update
rm -rf $(BOWER_CLEAN)
include pkg/base1/Makefile.am
include pkg/dashboard/Makefile.am
include pkg/docker/Makefile.am
include pkg/kubernetes/Makefile.am
include pkg/networkmanager/Makefile.am
include pkg/ostree/Makefile.am
include pkg/playground/Makefile.am
include pkg/realmd/Makefile.am
include pkg/registry/Makefile.am
include pkg/shell/Makefile.am
include pkg/sosreport/Makefile.am
include pkg/subscriptions/Makefile.am
include pkg/systemd/Makefile.am
include pkg/storaged/Makefile.am
include pkg/tuned/Makefile.am
include pkg/users/Makefile.am
include src/bridge/Makefile.am
include src/common/Makefile-common.am
include src/websocket/Makefile-websocket.am
include tools/Makefile-tools.am
include src/ws/Makefile-ws.am
include src/remotectl/Makefile-remotectl.am
include src/reauthorize/Makefile-reauthorize.am
include src/retest/Makefile.am
include src/pam-ssh-add/Makefile.am
include static/Makefile-static.am
include branding/default/Makefile.am
include branding/fedora/Makefile.am
include branding/centos/Makefile.am
include branding/rhel/Makefile.am