forked from cockpit-project/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.am
244 lines (213 loc) · 7.47 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
NULL =
man_MANS =
BUILT_SOURCES =
bin_PROGRAMS =
check_DATA =
check_SCRIPTS =
check_PROGRAMS =
noinst_SCRIPTS =
libexec_PROGRAMS =
libexec_SCRIPTS =
noinst_PROGRAMS =
sbin_PROGRAMS =
noinst_LIBRARIES =
noinst_DATA =
nodist_noinst_DATA =
nodist_noinst_SCRIPTS =
TESTS = \
test/check-dist \
test/static-code \
$(NULL)
CLEANFILES = \
valgrind-suppressions \
$(NULL)
EXTRA_DIST = \
package.json \
package-lock.json \
README.md \
tools/debian/copyright \
$(NULL)
clean-local::
find $(builddir) -name '*.gc??' -delete
find $(srcdir) -name '*.pyc' -delete
SUFFIXES = \
.jsx \
.mo .po \
$(NULL)
# Webpack related
include pkg/build
# required for running unit and integration tests; commander and ws are deps of chrome-remote-interface
WEBPACK_TEST_DEPS = \
node_modules/chrome-remote-interface \
node_modules/commander \
node_modules/sizzle \
node_modules/ws \
$(NULL)
# the rules above copy a lot of stuff into builddir; clean it up so that distcleancheck works
clean-local::
$(AM_V_at)test "$(srcdir)" == "$(builddir)" || rm -rf dist/
install-data-local:: $(WEBPACK_INSTALL) $(MANIFESTS)
mkdir -p $(DESTDIR)$(pkgdatadir)
$(V_TAR) tar --format=posix -cf - $^ | tar --no-same-owner -C $(DESTDIR)$(pkgdatadir) --strip-components=1 -xvf -
install-data-local:: $(WEBPACK_GZ_INSTALL)
@for file in $^; do \
target="$(DESTDIR)$(pkgdatadir)/$${file##*dist/}.gz"; \
[ -n "$(DESTDIR)" -a "$${target}" -nt "$${file}" ] && continue; \
mkdir -p "$${target%/*}"; \
echo "$${file} → $${target}"; \
gzip -9 < "$${file}" > "$${target}"; \
done
install-data-local:: $(wildcard $(top_srcdir)/dist/*/*.map)
$(V_TAR) tar --format=posix -c --transform="s@.*dist/@$(debugdir)$(pkgdatadir)/@" -T/dev/null $^ | tar --no-same-owner -C $(DESTDIR)/ -xv
uninstall-local::
test ! -d $(DESTDIR)$(pkgdatadir) || \
(find $(DESTDIR)$(pkgdatadir) -ignore_readdir_race -type f -exec rm -f {} \; && \
find $(DESTDIR)$(pkgdatadir) -ignore_readdir_race -type d -empty -delete)
test ! -d $(DESTDIR)$(debugdir)$(pkgdatadir) || \
(find $(DESTDIR)$(debugdir)$(pkgdatadir) -ignore_readdir_race -type f -delete && \
find $(DESTDIR)$(debugdir)$(pkgdatadir) -ignore_readdir_race -type d -empty -delete)
dist-hook:: $(WEBPACK_INPUTS) $(WEBPACK_OUTPUTS) $(WEBPACK_TEST_DEPS) $(MANIFESTS)
if !ENABLE_DOC
@echo "*** doc must be enabled (ie: --enable-doc) in order to make dist or distcheck"
@false
endif
$(V_TAR) tar --format=posix -cf - $^ | tar -C $(distdir) -xf -
cp $(srcdir)/tools/README.node_modules $(distdir)/node_modules/README
( cd $(srcdir); git ls-tree HEAD --name-only -r $(COMMITTED_DIST) || (echo $(COMMITTED_DIST) | tr ' ' '\n' ) ) | \
tar --format=posix -C $(srcdir) --exclude test/reference -cf - -T - | tar -C $(distdir) -xf -
echo $(VERSION) > $(distdir)/.tarball
tools/create-spec --version '$(VERSION)' -o $(distdir)/tools/cockpit.spec $(srcdir)/tools/cockpit.spec.in
sed 's/VERSION/$(VERSION)/' $(srcdir)/tools/debian/changelog.in > $(distdir)/tools/debian/changelog
sed 's/VERSION/$(VERSION)/' $(srcdir)/tools/arch/PKGBUILD.in > $(distdir)/tools/arch/PKGBUILD
tools/adjust-distdir-timestamps "$(distdir)"
#
ACLOCAL_AMFLAGS = -I tools ${ACLOCAL_FLAGS}
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)\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_REENTRANT \
$(NULL)
AM_LDFLAGS = -Wl,--as-needed
LOG_DRIVER = $(PYTHON) $(top_srcdir)/tools/tap-driver
LOG_COMPILER = sh -c 'timeout 300 "$$0" "$$@" --tap' # For GLib < 2.62
TEST_EXTENSIONS = .html .sh
SH_LOG_DRIVER = $(LOG_DRIVER)
HTML_LOG_DRIVER = $(LOG_DRIVER)
HTML_TEST_SERVER = $(builddir)/test-server
HTML_LOG_COMPILER = timeout 60 $(PYTHON) $(top_srcdir)/test/common/tap-cdp --strip=$(abs_top_srcdir)/ -- $(HTML_TEST_SERVER)
VALGRIND_ARGS = --trace-children=yes --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 --trace-children-skip='*mock*,/bin*,/usr/bin/*,/usr/local/bin'
VALGRIND_SUPPRESSIONS = \
tools/glib.supp \
tools/libssh.supp \
tools/polkit.supp \
tools/gnutls.supp \
tools/valgrind.supp \
$(NULL)
valgrind-suppressions: $(VALGRIND_SUPPRESSIONS)
$(AM_V_GEN) cat $^ /usr/share/glib-2.0/valgrind/glib.supp > $@
check-memory: valgrind-suppressions
$(MAKE) LOG_FLAGS="valgrind $(VALGRIND_ARGS)" \
HTML_LOG_FLAGS="valgrind $(VALGRIND_ARGS)" \
COCKPIT_SKIP_SLOW_TESTS=1 \
$(AM_MAKEFLAGS) check TESTS="$(filter-out test/% bots/%,$(TESTS))"
recheck-memory: valgrind-suppressions
$(MAKE) LOG_FLAGS="-- valgrind $(VALGRIND_ARGS)" \
HTML_LOG_FLAGS="valgrind $(VALGRIND_ARGS)" \
$(AM_MAKEFLAGS) recheck
if ENABLE_DOC
DOCS_INSTALL_DEPS = dist/guide/html/index.html
else
DOCS_INSTALL_DEPS =
endif
install-data-local:: $(DOCS_INSTALL_DEPS)
if ENABLE_DOC
mkdir -p $(DESTDIR)$(htmldir)
$(INSTALL_DATA) $(dir $<)/* $(DESTDIR)$(htmldir)
else
@true
endif
uninstall-local::
if ENABLE_DOC
rm -rf $(DESTDIR)$(htmldir)
else
@true
endif
# See test/image-prepare
dump-dist:
@echo "$(abs_builddir)/$(distdir).tar.xz"
# Subdirectories to distribute everything that's committed to git
COMMITTED_DIST = \
tools/ \
test \
$(NULL)
tools/debian/copyright: tools/debian/copyright.template $(MANIFESTS)
$(AM_V_GEN) (cd $(srcdir) && NODE_ENV=$(NODE_ENV) ./tools/build-debian-copyright) > $@.tmp && \
mv -f $@.tmp $@
# This is the stock rule with $(BUILT_SOURCES) dependency removed.
# In the future, we can do this via "no-dist-built-sources" automake option:
# https://git.savannah.gnu.org/cgit/automake.git/commit/?id=13659a7385
distdir:
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distcheck-hook::
$(srcdir)/tools/check-dist $(distdir)
# checkout Cockpit's bots for standard test VM images and API to launch them
# must be from main, as only that has current and existing images; but testvm.py API is stable
# support CI testing against a bots change
bots:
tools/make-bots
.PHONY: rsync
RSYNC_HOST ?= c
RSYNC_DEST ?= $(RSYNC_HOST):/
rsync:
$(MAKE)
$(MAKE) install DESTDIR=tmp/rsync >/dev/null
rsync --recursive --links --checksum --verbose --inplace tmp/rsync/ $(RSYNC_DEST)
include containers/Makefile.am
include containers/flatpak/Makefile.am
include doc/Makefile-doc.am
include doc/guide/Makefile-guide.am
include doc/man/Makefile-man.am
include pkg/Makefile.am
include po/Makefile.am
include selinux/Makefile.am
include src/branding/arch/Makefile.am
include src/branding/centos/Makefile.am
include src/branding/debian/Makefile.am
include src/branding/default/Makefile.am
include src/branding/fedora/Makefile.am
include src/branding/kubernetes/Makefile.am
include src/branding/opensuse/Makefile.am
include src/branding/registry/Makefile.am
include src/branding/rhel/Makefile.am
include src/branding/scientific/Makefile.am
include src/branding/ubuntu/Makefile.am
include src/bridge/Makefile.am
include src/client/Makefile.am
include src/common/Makefile-common.am
include src/pam-ssh-add/Makefile.am
include src/retest/Makefile.am
include src/session/Makefile-session.am
include src/ssh/Makefile-ssh.am
include src/systemd/Makefile.am
include src/tls/Makefile-tls.am
include src/websocket/Makefile-websocket.am
include src/ws/Makefile-ws.am
include tools/Makefile-tools.am