File: Makefile.am

package info (click to toggle)
cockpit 355-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,568 kB
  • sloc: javascript: 774,787; python: 40,655; ansic: 35,157; cpp: 11,141; sh: 3,512; makefile: 580; xml: 261
file content (44 lines) | stat: -rw-r--r-- 1,599 bytes parent folder | download | duplicates (2)
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
pkg_TESTS = \
	pkg/users/test-list-public-keys.sh \
	$(NULL)

TESTS += $(pkg_TESTS)

icons64dir = ${datarootdir}/icons/hicolor/64x64/apps
dist_icons64_DATA = pkg/sosreport/cockpit-sosreport.png

EXTRA_DIST += \
	pkg/users/mock \
	pkg/lib/qunit-template.html.in \
	pkg/lib/cockpit-po-plugin.js \
	$(pkg_TESTS) \
	$(metainfo_DATA) \
	$(NULL)

# one built file in dist/ which we use as dependency
DIST_STAMP = $(srcdir)/dist/static/manifest.json

# dynamic pkg → dist dependency, to rebuild the bundles if any web related file changes
# exclude automake unit test log files
PKG_INPUTS = $(shell find $(srcdir)/pkg $(srcdir)/po -type f ! -name 'test*.trs' ! -name 'test*.log')

V_BUNDLE = $(V_BUNDLE_$(V))
V_BUNDLE_ = $(V_BUNDLE_$(AM_DEFAULT_VERBOSITY))
V_BUNDLE_0 = @echo "  BUNDLE   dist";

# delete the stamp first; esbuild does not touch it if the contents didn't change,
# but this is just a representative for all of dist/*
$(DIST_STAMP): $(srcdir)/package-lock.json $(PKG_INPUTS)
	@rm -f $(DIST_STAMP)
	$(V_BUNDLE) cd $(srcdir) && NODE_ENV='$(NODE_ENV)' ./build.js

EXTRA_DIST += build.js files.js package.json package-lock.json

INSTALL_DATA_LOCAL_TARGETS += install-bundles
install-bundles:
	cd $(srcdir)/dist; find */* -type f ! -name '*.LEGAL.txt' -a ! -path 'playground/*' -exec install -D -m 644 '{}' '$(abspath $(DESTDIR)$(datadir))/cockpit/{}' \;
	find $(srcdir)/dist -name '*.LEGAL.txt' -exec install --target-directory '$(abspath $(DESTDIR)$(docdir))/legal' '{}' -D -m 644 '{}'  \;

UNINSTALL_LOCAL_TARGETS += uninstall-bundles
uninstall-bundles:
	rm -rf $(DESTDIR)$(datadir)/cockpit