NULL =CLEANFILES =dist_noinst_DATA =man_MANS =noinst_DATA =noinst_LIBRARIES =noinst_PROGRAMS =PYTHON3 ?= python3# See https://www.gnu.org/software/make/manual/html_node/Force-Targets.htmlFORCE:# -----------------------------------------------------------------------------# node_modules/package-lock.json dependencyV_NODE_MODULES = $(V_NODE_MODULES_$(V))V_NODE_MODULES_ = $(V_NODE_MODULES_$(AM_DEFAULT_VERBOSITY))V_NODE_MODULES_0 = @V=0# We want tools/node-modules to run every time package-lock.json is requested$(srcdir)/package-lock.json: FORCE$(V_NODE_MODULES) $(srcdir)/tools/node-modules make_package_lock_json# -----------------------------------------------------------------------------# make distEXTRA_DIST = README.md LICENSES/BSD-3-Clause.txt LICENSES/GPL-3.0.txt LICENSES/LGPL-2.1.txt LICENSES/MIT.txtCLEANFILES += cockpit-*.tar.xz# We override distdir as we want to dist some git-tracked files and dist/ without explicitly listing.# The spec also gets patched to declare bundled NPM dependencies.EXTRA_DIST += $(EXTRA_FILES)distdir: $(DISTFILES)@if [ -e '$(srcdir)/.git' ]; then \git -C '$(srcdir)' ls-files -x test/reference .fmf .cockpit-ci plans pkg test tools > .extra_dist.tmp && \mv .extra_dist.tmp '$(srcdir)/.extra_dist'; fi$(MAKE) $(AM_MAKEFLAGS) distdir-am EXTRA_FILES="$$(tr '\n' ' ' < $(srcdir)/.extra_dist) .extra_dist"sed -i "s/[@]VERSION@/$(VERSION)/" "$(distdir)/src/client/org.cockpit_project.CockpitClient.metainfo.xml"$(srcdir)/tools/fix-spec $(distdir)/tools/cockpit.spec $(VERSION)sed -i "/^pkgver=/ s/0/$(VERSION)/" "$(distdir)/tools/arch/PKGBUILD"sed -i "1 s/0/$(VERSION)/" "$(distdir)/tools/debian/changelog"cp -r "$(srcdir)/dist" "$(srcdir)/runtime-npm-modules.txt" "$(distdir)"$(srcdir)/tools/adjust-distdir-timestamps "$(distdir)"@echo ' DIST $(DIST_ARCHIVES)'# Needed to ensure the tarball is correct for $(VERSION) overridedist-hook: $(distdir)/src/cockpit/_version.py$(distdir)/src/cockpit/_version.py: FORCE$(PYTHON3) '$(srcdir)'/src/build_backend.py --copy '$(srcdir)' '$(distdir)'@rm -f $(distdir)/src/cockpit/_version.py$(AM_V_GEN) echo "__version__ = '$(VERSION)'" > $@$(distdir)/version.m4: FORCE@rm -f $(distdir)/version.m4$(AM_V_GEN) echo 'm4_define(VERSION_NUMBER, [$(VERSION)])' > $@# be careful not to include autotools cache into dist tarballsdist-hook: $(distdir)/configure$(distdir)/configure: $(distdir)/version.m4@rm -f $(distdir)/configure$(AM_V_GEN) autoreconf $(distdir)@rm -r $(distdir)/autom4te.cache# Various downstream packaging assetsNODE_CACHE = $(CURDIR)/cockpit-node-$(VERSION).tar.xz$(NODE_CACHE): $(srcdir)/package-lock.json$(AM_V_GEN) $(srcdir)/tools/node-modules runtime-tar $(NODE_CACHE)dist-hook: $(distdir)/tools/debian/copyright# when building from a git checkout, we need to generate the copyright file# when building from tarball (also separate build tree, dist-git), we can't# rely on node_modules, so just copy the existing file$(distdir)/tools/debian/copyright: $(srcdir)/tools/debian/copyright.template $(DIST_STAMP) $(if $(wildcard $(srcdir)/node_modules/.package-lock.json),$(NODE_CACHE))$(AM_V_GEN) if [ -e "$(srcdir)/node_modules/.package-lock.json" ]; then \$(srcdir)/tools/build-debian-copyright $< $(NODE_CACHE) > $@; \else \cp "$(srcdir)/tools/debian/copyright" $@; \fiDISTCHECK_CONFIGURE_FLAGS = --enable-prefix-only $(EXTRA_DISTCHECK_CONFIGURE_FLAGS)# Validate our AppStream metadatadistcheck-hook::find $(distdir) -name '*.metainfo.xml' -o -name '*.appdata.xml' | xargs appstream-util validate --nonet# validate that we don't bundle the embedded patternfly font files, we use them from /static/fonts/distcheck-hook::! grep --color=auto -rn "\.\./fonts/OpenSans\|fonts/.*eot\|truetype" $(distdir)/dist# -----------------------------------------------------------------------------TESTS = \test/common/static-code \$(NULL)clean-local::find $(builddir) -name '*.gc??' -deletefind $(srcdir) -name '*.pyc' -delete# required for running integration testsnode_modules/%: $(srcdir)/package-lock.json@truecheck: export VERBOSE=1TEST_EXTENSIONS = .shVALGRIND = valgrind --trace-children=yes --quiet --error-exitcode=33 --gen-suppressions=all \$(foreach file,$(wildcard $(srcdir)/tools/*.supp),--suppressions=$(file)) \--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'check-memory:$(MAKE) LOG_FLAGS="$(VALGRIND)" \COCKPIT_SKIP_SLOW_TESTS=1 \$(AM_MAKEFLAGS) check TESTS="$(filter-out test/% bots/%,$(TESTS))"recheck-memory:$(MAKE) LOG_FLAGS="$(VALGRIND_ARGS)" \$(AM_MAKEFLAGS) recheck# 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 changebots:test/common/make-bots.PHONY: rsyncRSYNC_HOST ?= cRSYNC_DEST ?= $(RSYNC_HOST):/rsync:$(MAKE)$(MAKE) install DESTDIR=tmp/rsync >/dev/nullrsync --recursive --links --checksum --verbose --inplace tmp/rsync/ $(RSYNC_DEST)# We use these to add conditionally-enabled extra rules# automake doesn't like mixing `::` and `if`CHECK_LOCAL_TARGETS =.PHONY: $(CHECK_LOCAL_TARGETS)check-local:: $(CHECK_LOCAL_TARGETS)CLEAN_LOCAL_TARGETS =.PHONY: $(CLEAN_LOCAL_TARGETS)clean-local:: $(CLEAN_LOCAL_TARGETS)INSTALL_DATA_LOCAL_TARGETS =.PHONY: $(INSTALL_DATA_LOCAL_TARGETS)install-data-local:: $(INSTALL_DATA_LOCAL_TARGETS)INSTALL_EXEC_HOOK_TARGETS =.PHONY: $(INSTALL_EXEC_HOOK_TARGETS)install-exec-hook:: $(INSTALL_EXEC_HOOK_TARGETS)UNINSTALL_LOCAL_TARGETS =.PHONY: $(UNINSTALL_LOCAL_TARGETS)uninstall-local:: $(UNINSTALL_LOCAL_TARGETS)# This Makefile includes several variable definitions that must come firstinclude src/testlib/Makefile.aminclude containers/Makefile.aminclude containers/flatpak/Makefile.aminclude doc/Makefile-doc.aminclude doc/Makefile-guide.aminclude doc/Makefile-man.aminclude pkg/Makefile.aminclude po/Makefile.aminclude selinux/Makefile.aminclude src/Makefile.aminclude src/branding/arch/Makefile.aminclude src/branding/centos/Makefile.aminclude src/branding/debian/Makefile.aminclude src/branding/default/Makefile.aminclude src/branding/fedora/Makefile.aminclude src/branding/fedora-45/Makefile.aminclude src/branding/opensuse/Makefile.aminclude src/branding/rhel/Makefile.aminclude src/branding/ubuntu/Makefile.aminclude src/client/Makefile.aminclude src/common/Makefile-common.aminclude src/pam-ssh-add/Makefile.aminclude src/session/Makefile-session.aminclude src/systemd/Makefile.aminclude src/tls/Makefile-tls.aminclude src/ws/Makefile-ws.aminclude tools/Makefile-tools.am