Debian Codegraph @

pkg/Makefile.am

raw
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2 pkg_TESTS = \
3 pkg/users/test-list-public-keys.sh \
4 $(NULL)
5
6 TESTS += $(pkg_TESTS)
7
8 icons64dir = ${datarootdir}/icons/hicolor/64x64/apps
9 dist_icons64_DATA = pkg/sosreport/cockpit-sosreport.png
10
11 EXTRA_DIST += \
12 pkg/users/mock \
13 pkg/lib/qunit-template.html.in \
14 pkg/lib/cockpit-po-plugin.js \
15 $(pkg_TESTS) \
16 $(metainfo_DATA) \
17 $(NULL)
18
19 # one built file in dist/ which we use as dependency
20 DIST_STAMP = $(srcdir)/dist/static/manifest.json
21
22 # dynamic pkg → dist dependency, to rebuild the bundles if any web related file changes
23 # exclude automake unit test log files
24 PKG_INPUTS = $(shell find $(srcdir)/pkg $(srcdir)/po -type f ! -name 'test*.trs' ! -name 'test*.log')
25
26 V_BUNDLE = $(V_BUNDLE_$(V))
27 V_BUNDLE_ = $(V_BUNDLE_$(AM_DEFAULT_VERBOSITY))
28 V_BUNDLE_0 = @echo " BUNDLE dist";
29
30 # delete the stamp first; esbuild does not touch it if the contents didn't change,
31 # but this is just a representative for all of dist/*
32 $(DIST_STAMP): $(srcdir)/package-lock.json $(PKG_INPUTS)
33 @rm -f $(DIST_STAMP)
34 $(V_BUNDLE) cd $(srcdir) && NODE_ENV='$(NODE_ENV)' ./build.js
35
36 EXTRA_DIST += build.js files.js package.json package-lock.json
37
38 INSTALL_DATA_LOCAL_TARGETS += install-bundles
39 install-bundles:
40 cd $(srcdir)/dist; find */* -type f ! -name '*.LEGAL.txt' -a ! -path 'playground/*' -exec install -D -m 644 '{}' '$(abspath $(DESTDIR)$(datadir))/cockpit/{}' \;
41 find $(srcdir)/dist -name '*.LEGAL.txt' -exec install --target-directory '$(abspath $(DESTDIR)$(docdir))/legal' '{}' -D -m 644 '{}' \;
42
43 UNINSTALL_LOCAL_TARGETS += uninstall-bundles
44 uninstall-bundles:
45 rm -rf $(DESTDIR)$(datadir)/cockpit