From nobody Sun Feb 8 09:30:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1570549752; cv=none; d=zoho.com; s=zohoarc; b=lfi+P+rM835nw1GlSvEiRhr1yrZRktRf+m7NTT/GxwM0lIOoLiknMOJPPunxmXMwgM9y7pjqV0/+xzAYOYr62vgfcSxJTopYrLdpBY+ILhpPE8Oi0ksTas4y9pBPlEST2J2VlR+z/5Y2gkWDMC4yMTfQ6OAmsgs32x74C958ei0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570549752; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=APzydqX9tMYwvVHOr3GvDhcnjgN+C7yV2aZHfesmsa8=; b=cJ2Obnvx5wXJgUImCuMm6A8965TEKi0s/siHXiKLDfBuec2NnPEwR7Q7CfVtkJdK1cjC0yqE8oc7SU5+Da/xQydjCgKYBsY442n+hKOvbocHQ4ncfEcD0ovW4DCffdQeAPD03CC1TqPB8TXnmUjoX/Hf4jgGrdsc7jqip1Y32/8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1570549752768804.8372901914486; Tue, 8 Oct 2019 08:49:12 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E307118C8938; Tue, 8 Oct 2019 15:49:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B891060166; Tue, 8 Oct 2019 15:49:10 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6ACC918037CA; Tue, 8 Oct 2019 15:49:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x98Fmv2x006510 for ; Tue, 8 Oct 2019 11:48:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id AC8575C1D4; Tue, 8 Oct 2019 15:48:57 +0000 (UTC) Received: from domokun.gsslab.fab.redhat.com (dhcp-94.gsslab.fab.redhat.com [10.33.9.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id F0E975C223; Tue, 8 Oct 2019 15:48:54 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 8 Oct 2019 16:48:42 +0100 Message-Id: <20191008154844.29327-4-berrange@redhat.com> In-Reply-To: <20191008154844.29327-1-berrange@redhat.com> References: <20191008154844.29327-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Michal Privoznik Subject: [libvirt] [PATCH v2 3/5] build: remove all logic unrelated to syntax-check X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Tue, 08 Oct 2019 15:49:11 +0000 (UTC) The standard maint.mk from gnulib provides alot more than just the 'syntax-check' target. This can all be purged to give a more minimal file. Signed-off-by: Daniel P. Berrang=C3=A9 --- GNUmakefile | 42 ---- build-aux/cfg.mk | 10 - build-aux/maint.mk | 473 --------------------------------------------- 3 files changed, 525 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 728f4a9ae8..288794ca25 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -38,48 +38,6 @@ include Makefile include $(srcdir)/$(_build-aux)/cfg.mk include $(srcdir)/$(_build-aux)/maint.mk =20 -# Ensure that $(VERSION) is up to date for dist-related targets, but not -# for others: rerunning autoreconf and recompiling everything isn't cheap. -_have-git-version-gen :=3D \ - $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes) -ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL)) - _is-dist-target ?=3D $(filter-out %clean, \ - $(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS))) - _is-install-target ?=3D $(filter-out %check, $(filter install%,$(MAKECMD= GOALS))) - ifneq (,$(_is-dist-target)$(_is-install-target)) - _curr-ver :=3D $(shell cd $(srcdir) \ - && $(_build-aux)/git-version-gen \ - .tarball-version \ - $(git-version-gen-tag-sed-script)) - ifneq ($(_curr-ver),$(VERSION)) - ifeq ($(_curr-ver),UNKNOWN) - $(info WARNING: unable to verify if $(VERSION) is the correct vers= ion) - else - ifneq (,$(_is-install-target)) - # GNU Coding Standards state that 'make install' should not cause - # recompilation after 'make all'. But as long as changing the v= ersion - # string alters config.h, the cost of having 'make all' always h= ave an - # up-to-date version is prohibitive. So, as a compromise, we me= rely - # warn when installing a version string that is out of date; the= user - # should run 'autoreconf' (or something like 'make distcheck') to - # fix the version, 'make all' to propagate it, then 'make instal= l'. - $(info WARNING: version string $(VERSION) is out of date;) - $(info run '$(MAKE) _version' to fix it) - else - $(info INFO: running autoreconf for new version string: $(_curr-= ver)) -GNUmakefile: _version - touch GNUmakefile - endif - endif - endif - endif -endif - -.PHONY: _version -_version: - cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf) - $(MAKE) $(AM_MAKEFLAGS) Makefile - else =20 .DEFAULT_GOAL :=3D abort-due-to-no-makefile diff --git a/build-aux/cfg.mk b/build-aux/cfg.mk index 31c0d68a81..3add2b7e94 100644 --- a/build-aux/cfg.mk +++ b/build-aux/cfg.mk @@ -16,16 +16,6 @@ # along with this program. If not, see # . =20 -# Use alpha.gnu.org for alpha and beta releases. -# Use ftp.gnu.org for major releases. -gnu_ftp_host-alpha =3D alpha.gnu.org -gnu_ftp_host-beta =3D alpha.gnu.org -gnu_ftp_host-major =3D ftp.gnu.org -gnu_rel_host =3D $(gnu_ftp_host-$(RELEASE_TYPE)) - -url_dir_list =3D \ - ftp://$(gnu_rel_host)/gnu/coreutils - # We use .gnulib, not gnulib. gnulib_dir =3D $(srcdir)/.gnulib =20 diff --git a/build-aux/maint.mk b/build-aux/maint.mk index e570e45462..9467815711 100644 --- a/build-aux/maint.mk +++ b/build-aux/maint.mk @@ -37,26 +37,6 @@ _sp =3D $(_empty) $(_empty) # If S1 =3D=3D S2, return S1, otherwise the empty string. _equal =3D $(and $(findstring $(1),$(2)),$(findstring $(2),$(1))) =20 -# member-check,VARIABLE,VALID-VALUES -# ---------------------------------- -# Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, a= nd -# return it. Die otherwise. -member-check =3D \ - $(strip \ - $(if $($(1)), \ - $(if $(findstring $(_sp),$($(1))), \ - $(error invalid $(1): '$($(1))', expected $(2)), \ - $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)), \ - $(error invalid $(1): '$($(1))', expected $(2)))), \ - $(error $(1) undefined))) - -# Do not save the original name or timestamp in the .tar.gz file. -# Use --rsyncable if available. -gzip_rsyncable :=3D \ - $(shell gzip --help 2>/dev/null|$(GREP) rsyncable >/dev/null \ - && printf %s --rsyncable) -GZIP_ENV =3D '--no-name --best $(gzip_rsyncable)' - GIT =3D git VC =3D $(GIT) =20 @@ -95,62 +75,10 @@ VC_LIST_EXCEPT =3D \ | $(GREP) -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \ $(_prepend_srcdir_prefix) =20 -ifeq ($(origin prev_version_file), undefined) - prev_version_file =3D $(srcdir)/.prev-version -endif - -PREV_VERSION :=3D $(shell cat $(prev_version_file) 2>/dev/null) -VERSION_REGEXP =3D $(subst .,\.,$(VERSION)) -PREV_VERSION_REGEXP =3D $(subst .,\.,$(PREV_VERSION)) - -ifeq ($(VC),$(GIT)) - this-vc-tag =3D v$(VERSION) - this-vc-tag-regexp =3D v$(VERSION_REGEXP) -else - tag-package =3D $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]') - tag-this-version =3D $(subst .,_,$(VERSION)) - this-vc-tag =3D $(tag-package)-$(tag-this-version) - this-vc-tag-regexp =3D $(this-vc-tag) -endif -my_distdir =3D $(PACKAGE)-$(VERSION) - -# Old releases are stored here. -release_archive_dir ?=3D ../release - -# If RELEASE_TYPE is undefined, but RELEASE is, use its second word. -# But overwrite VERSION. -ifdef RELEASE - VERSION :=3D $(word 1, $(RELEASE)) - RELEASE_TYPE ?=3D $(word 2, $(RELEASE)) -endif - -# Validate and return $(RELEASE_TYPE), or die. -RELEASE_TYPES =3D alpha beta stable -release-type =3D $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES)) - -# Override gnu_rel_host and url_dir_list in cfg.mk if these are not right. -# Use alpha.gnu.org for alpha and beta releases. -# Use ftp.gnu.org for stable releases. -gnu_ftp_host-alpha =3D alpha.gnu.org -gnu_ftp_host-beta =3D alpha.gnu.org -gnu_ftp_host-stable =3D ftp.gnu.org -gnu_rel_host ?=3D $(gnu_ftp_host-$(release-type)) - -url_dir_list ?=3D $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org), \ - https://ftpmirror.gnu.org/$(PACKAGE), \ - https://$(gnu_rel_host)/gnu/$(PACKAGE)) - # Override this in cfg.mk if you are using a different format in your # NEWS file. today =3D $(shell date +%Y-%m-%d) =20 -# Select which lines of NEWS are searched for $(news-check-regexp). -# This is a sed line number spec. The default says that we search -# lines 1..10 of NEWS for $(news-check-regexp). -# If you want to search only line 3 or only lines 20-22, use "3" or "20,22= ". -news-check-lines-spec ?=3D 1,10 -news-check-regexp ?=3D '^\*.* $(VERSION_REGEXP) \($(today)\)' - # Prevent programs like 'sort' from considering distinct strings to be equ= al. # Doing it here saves us from having to set LC_ALL elsewhere in this file. export LC_ALL =3D C @@ -1181,15 +1109,6 @@ sc_makefile_at_at_check: $$($(VC_LIST_EXCEPT) | $(GREP) -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : =20 -news-check: NEWS - $(AM_V_GEN)if $(SED) -n $(news-check-lines-spec)p $< \ - | $(GREP) -E $(news-check-regexp) >/dev/null; then \ - :; \ - else \ - echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \ - exit 1; \ - fi - sc_makefile_TAB_only_indentation: @prohibit=3D'^ [ ]{8}' \ in_vc_files=3D'akefile|\.mk$$' \ @@ -1360,395 +1279,3 @@ sc_vulnerable_makefile_CVE-2012-3386: ' "make distcheck", and upgrade to fixed automake' \ ' see https://bugzilla.redhat.com/show_bug.cgi?id=3DCVE-2012-3386 for = details') \ $(_sc_search_regexp) - -vc-diff-check: - $(AM_V_GEN)(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || : - $(AM_V_at)if test -s vc-diffs; then \ - cat vc-diffs; \ - echo "Some files are locally modified:" 1>&2; \ - exit 1; \ - else \ - rm vc-diffs; \ - fi - -rel-files =3D $(DIST_ARCHIVES) - -gnulib-version =3D $$(cd $(gnulib_dir) \ - && { git describe || git rev-parse --short=3D10 HEAD; = } ) -bootstrap-tools ?=3D autoconf,automake,gnulib - -gpgv =3D $$(gpgv2 --version >/dev/null && echo gpgv2 || echo gpgv) -# If it's not already specified, derive the GPG key ID from -# the signed tag we've just applied to mark this release. -gpg_key_ID ?=3D \ - $$(cd $(srcdir) \ - && git cat-file tag v$(VERSION) \ - | $(gpgv) --status-fd 1 --keyring /dev/null - - 2>/dev/null \ - | $(AWK) '/^\[GNUPG:\] ERRSIG / {print $$3; exit}') - -translation_project_ ?=3D coordinator@translationproject.org - -# Make info-gnu the default only for a stable release. -announcement_Cc_stable =3D $(translation_project_), $(PACKAGE_BUGREPORT) -announcement_mail_headers_stable =3D \ - To: info-gnu@gnu.org \ - Cc: $(announcement_Cc_) \ - Mail-Followup-To: $(PACKAGE_BUGREPORT) - -announcement_Cc_alpha =3D $(translation_project_) -announcement_mail_headers_alpha =3D \ - To: $(PACKAGE_BUGREPORT) \ - Cc: $(announcement_Cc_) - -announcement_mail_Cc_beta =3D $(announcement_mail_Cc_alpha) -announcement_mail_headers_beta =3D $(announcement_mail_headers_alpha) - -announcement_mail_Cc_ ?=3D $(announcement_mail_Cc_$(release-type)) -announcement_mail_headers_ ?=3D $(announcement_mail_headers_$(release-type= )) -announcement: NEWS ChangeLog $(rel-files) -# Not $(AM_V_GEN) since the output of this command serves as -# announcement message: it would start with " GEN announcement". - $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \ - --mail-headers=3D'$(announcement_mail_headers_)' \ - --release-type=3D$(release-type) \ - --package=3D$(PACKAGE) \ - --prev=3D$(PREV_VERSION) \ - --curr=3D$(VERSION) \ - --gpg-key-id=3D$(gpg_key_ID) \ - --srcdir=3D$(srcdir) \ - --news=3D$(srcdir)/NEWS \ - --bootstrap-tools=3D$(bootstrap-tools) \ - $$(case ,$(bootstrap-tools), in (*,gnulib,*) \ - echo --gnulib-version=3D$(gnulib-version);; esac) \ - --no-print-checksums \ - $(addprefix --url-dir=3D, $(url_dir_list)) - -.PHONY: release-commit -release-commit: - $(AM_V_GEN)cd $(srcdir) \ - && $(_build-aux)/do-release-commit-and-tag \ - -C $(abs_top_builddir) $(RELEASE) - -## ---------------- ## -## Updating files. ## -## ---------------- ## - -ftp-gnu =3D https://ftp.gnu.org/gnu -www-gnu =3D https://www.gnu.org - -upload_dest_dir_ ?=3D $(PACKAGE) -upload_command =3D \ - $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \ - --to $(gnu_rel_host):$(upload_dest_dir_) \ - $(rel-files) -emit_upload_commands: - @echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - @echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - @echo '$(upload_command)' - @echo '# send the ~/announce-$(my_distdir) e-mail' - @echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - @echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - -.PHONY: upload -upload: - $(AM_V_GEN)$(upload_command) - -define emit-commit-log - printf '%s\n' 'maint: post-release administrivia' '' \ - '* NEWS: Add header line for next release.' \ - '* .prev-version: Record previous version.' \ - '* cfg.mk (old_NEWS_hash): Auto-update.' -endef - -.PHONY: no-submodule-changes -no-submodule-changes: - $(AM_V_GEN)if test -d $(srcdir)/.git \ - && git --version >/dev/null 2>&1; then \ - diff=3D$$(cd $(srcdir) && git submodule -q foreach \ - git diff-index --name-only HEAD) \ - || exit 1; \ - case $$diff in '') ;; \ - *) echo '$(ME): submodule files are locally modified:'; \ - echo "$$diff"; exit 1;; esac; \ - else \ - : ; \ - fi - -submodule-checks ?=3D no-submodule-changes public-submodule-commit - -# Ensure that each sub-module commit we're using is public. -# Without this, it is too easy to tag and release code that -# cannot be built from a fresh clone. -.PHONY: public-submodule-commit -public-submodule-commit: - $(AM_V_GEN)if test -d $(srcdir)/.git \ - && git --version >/dev/null 2>&1; then \ - cd $(srcdir) && \ - git submodule --quiet foreach \ - 'test "$$(git rev-parse "$$sha1")" \ - =3D "$$(git merge-base origin "$$sha1")"' \ - || { echo '$(ME): found non-public submodule commit' >&2; \ - exit 1; }; \ - else \ - : ; \ - fi -# This rule has a high enough utility/cost ratio that it should be a -# dependent of "check" by default. However, some of us do occasionally -# commit a temporary change that deliberately points to a non-public -# submodule commit, and want to be able to use rules like "make check". -# In that case, run e.g., "make check gl_public_submodule_commit=3D" -# to disable this test. -gl_public_submodule_commit ?=3D public-submodule-commit -check: $(gl_public_submodule_commit) - -.PHONY: alpha beta stable release -ALL_RECURSIVE_TARGETS +=3D alpha beta stable -alpha beta stable: $(local-check) writable-files $(submodule-checks) - $(AM_V_GEN)test $@ =3D stable \ - && { echo $(VERSION) | $(GREP) -E '^[0-9]+(\.[0-9]+)+$$' \ - || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\ - || : - $(AM_V_at)$(MAKE) vc-diff-check - $(AM_V_at)$(MAKE) news-check - $(AM_V_at)$(MAKE) distcheck - $(AM_V_at)$(MAKE) dist - $(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=3D$@ - $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=3D$@ - -release: - $(AM_V_GEN)$(MAKE) _version - $(AM_V_GEN)$(MAKE) $(release-type) - -# Override this in cfg.mk if you follow different procedures. -release-prep-hook ?=3D release-prep - -gl_noteworthy_news_ =3D * Noteworthy changes in release ?.? (????-??-??) [= ?] -.PHONY: release-prep -release-prep: - $(AM_V_GEN)$(MAKE) --no-print-directory -s announcement \ - > ~/announce-$(my_distdir) - $(AM_V_at)if test -d $(release_archive_dir); then \ - ln $(rel-files) $(release_archive_dir); \ - chmod a-w $(rel-files); \ - fi - $(AM_V_at)echo $(VERSION) > $(prev_version_file) - $(AM_V_at)$(MAKE) update-NEWS-hash - $(AM_V_at)perl -pi \ - -e '$$. =3D=3D 3 and print "$(gl_noteworthy_news_)\n\n\n"' \ - $(srcdir)/NEWS - $(AM_V_at)msg=3D$$($(emit-commit-log)) || exit 1; \ - cd $(srcdir) && $(VC) commit -m "$$msg" -a - -# Override this with e.g., -s $(srcdir)/some_other_name.texi -# if the default $(PACKAGE)-derived name doesn't apply. -gendocs_options_ ?=3D - -.PHONY: web-manual -web-manual: - $(AM_V_GEN)test -z "$(manual_title)" \ - && { echo define manual_title in cfg.mk 1>&2; exit 1; } || : - $(AM_V_at)cd '$(srcdir)/doc'; \ - $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \ - -o '$(abs_top_builddir)/doc/manual' \ - --email $(PACKAGE_BUGREPORT) $(PACKAGE) \ - "$(PACKAGE_NAME) - $(manual_title)" - $(AM_V_at)echo " *** Upload the doc/manual directory to web-cvs." - -.PHONY: web-manual-update -web-manual-update: - $(AM_V_GEN)cd $(srcdir) \ - && $(_build-aux)/gnu-web-doc-update -C $(abs_top_builddir) - - -# Code Coverage - -init-coverage: - $(MAKE) $(AM_MAKEFLAGS) clean - lcov --directory . --zerocounters - -COVERAGE_CCOPTS ?=3D "-g --coverage" -COVERAGE_OUT ?=3D doc/coverage - -build-coverage: - $(MAKE) $(AM_MAKEFLAGS) CFLAGS=3D$(COVERAGE_CCOPTS) CXXFLAGS=3D$(COVERAGE= _CCOPTS) - $(MAKE) $(AM_MAKEFLAGS) CFLAGS=3D$(COVERAGE_CCOPTS) CXXFLAGS=3D$(COVERAGE= _CCOPTS) check - mkdir -p $(COVERAGE_OUT) - lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \ - --capture - -gen-coverage: - genhtml --output-directory $(COVERAGE_OUT) \ - $(COVERAGE_OUT)/$(PACKAGE).info \ - --highlight --frames --legend \ - --title "$(PACKAGE_NAME)" - -coverage: - $(MAKE) init-coverage - $(MAKE) build-coverage - $(MAKE) gen-coverage - -# Some projects carry local adjustments for gnulib modules via patches in -# a gnulib patch directory whose default name is gl/ (defined in bootstrap -# via local_gl_dir=3Dgl). Those patches become stale as the originals evo= lve -# in gnulib. Use this rule to refresh any stale patches. It applies each -# patch to the original in $(gnulib_dir) and uses the temporary result to -# generate a fuzz-free .diff file. If you customize the name of your local -# gnulib patch directory via bootstrap.conf, this rule detects that name. -# Run this from a non-VPATH (i.e., srcdir) build directory. -.PHONY: refresh-gnulib-patches -refresh-gnulib-patches: - gl=3Dgl; \ - if test -f bootstrap.conf; then \ - t=3D$$(perl -lne '/^\s*local_gl_dir=3D(\S+)/ and $$d=3D$$1;' \ - -e 'END{defined $$d and print $$d}' bootstrap.conf); \ - test -n "$$t" && gl=3D$$t; \ - fi; \ - for diff in $$(cd $$gl; git ls-files | $(GREP) '\.diff$$'); do \ - b=3D$$(printf %s "$$diff"|$(SED) 's/\.diff$$//'); \ - VERSION_CONTROL=3Dnone \ - patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \ - ( cd $(gnulib_dir) || exit 1; \ - git diff "$$b" > "../$$gl/$$diff"; \ - git checkout $$b ) || exit 1; \ - done - -# Update gettext files. -PACKAGE ?=3D $(shell basename $(PWD)) -PO_DOMAIN ?=3D $(PACKAGE) -POURL =3D https://translationproject.org/latest/$(PO_DOMAIN)/ -PODIR ?=3D po -refresh-po: - rm -f $(PODIR)/*.po && \ - echo "$(ME): getting translations into po (please ignore the robots.txt E= RROR 404)..." && \ - wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursiv= e --level 1 --accept .po --accept .po.1 $(POURL) && \ - echo 'en@boldquot' > $(PODIR)/LINGUAS && \ - echo 'en@quot' >> $(PODIR)/LINGUAS && \ - ls $(PODIR)/*.po | $(SED) 's/\.po//;s,$(PODIR)/,,' | \ - sort >> $(PODIR)/LINGUAS - - # Running indent once is not idempotent, but running it twice is. -INDENT_SOURCES ?=3D $(C_SOURCES) -.PHONY: indent -indent: - indent $(INDENT_SOURCES) - indent $(INDENT_SOURCES) - -# If you want to set UPDATE_COPYRIGHT_* environment variables, -# put the assignments in this variable. -update-copyright-env ?=3D - -# Run this rule once per year (usually early in January) -# to update all FSF copyright year lists in your project. -# If you have an additional project-specific rule, -# add it in cfg.mk along with a line 'update-copyright: prereq'. -# By default, exclude all variants of COPYING; you can also -# add exemptions (such as ChangeLog..* for rotated change logs) -# in the file .x-update-copyright. -.PHONY: update-copyright -update-copyright: - $(AM_V_GEN)$(GREP) -l -w Copyright \ - $$(export VC_LIST_EXCEPT_DEFAULT=3DCOPYING && $(VC_LIST_EXCEPT)) \ - | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@ - -# This tight_scope test is skipped with a warning if $(_gl_TS_headers) is = not -# overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS. - -# NOTE: to override any _gl_TS_* default value, you must -# define the variable(s) using "export" in cfg.mk. -_gl_TS_dir ?=3D src - -ALL_RECURSIVE_TARGETS +=3D sc_tight_scope -sc_tight_scope: tight-scope.mk - @fail=3D0; \ - if ! $(GREP) '^ *export _gl_TS_headers *=3D' $(_build-aux)/cfg.mk \ - > /dev/null \ - && ! $(GREP) -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \ - > /dev/null 2>&1; then \ - echo '$(ME): skipping $@'; \ - else \ - $(MAKE) -s -C $(_gl_TS_dir) \ - -f Makefile \ - -f $(_build-aux)/cfg.mk \ - -f $(abs_top_builddir)/$< \ - _gl_tight_scope \ - || fail=3D1; \ - fi; \ - rm -f $<; \ - exit $$fail - -tight-scope.mk: $(ME) - @rm -f $@ $@-t - @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(srcdir)/$(ME) > $@-t - @chmod a=3Dr $@-t && mv $@-t $@ - -ifeq (a,b) -# TS-start - -# Most functions should have static scope. -# Any that don't must be marked with 'extern', but 'main' -# and 'usage' are exceptions: they're always extern, but -# do not need to be marked. Symbols matching '__.*' are -# reserved by the compiler, so are automatically excluded below. -_gl_TS_unmarked_extern_functions ?=3D main usage -_gl_TS_function_match ?=3D /^(?:$(_gl_TS_extern)) +.*?(\w+) *\(/ - -# If your project uses a macro like "XTERN", then put -# the following in cfg.mk to override this default: -# export _gl_TS_extern =3D extern|XTERN -_gl_TS_extern ?=3D extern - -# The second nm|grep checks for file-scope variables with 'extern' scope. -# Without gnulib's progname module, you might put program_name here. -# Symbols matching '__.*' are reserved by the compiler, -# so are automatically excluded below. -_gl_TS_unmarked_extern_vars ?=3D - -# NOTE: the _match variables are perl expressions -- not mere regular -# expressions -- so that you can extend them to match other patterns -# and easily extract matched variable names. -# For example, if your project declares some global variables via -# a macro like this: GLOBAL(type, var_name, initializer), then you -# can override this definition to automatically extract those names: -# export _gl_TS_var_match =3D \ -# /^(?:$(_gl_TS_extern)) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.= *?),/ -_gl_TS_var_match ?=3D /^(?:$(_gl_TS_extern)) .*?(\w+)(\[.*?\])?;/ - -# The names of object files in (or relative to) $(_gl_TS_dir). -_gl_TS_obj_files ?=3D *.$(OBJEXT) - -# Files in which to search for the one-line style extern declarations. -# $(_gl_TS_dir)-relative. -_gl_TS_headers ?=3D $(noinst_HEADERS) -_gl_TS_other_headers ?=3D *.h - -.PHONY: _gl_tight_scope -_gl_tight_scope: $(bin_PROGRAMS) - sed_wrap=3D's/^/^_?/;s/$$/$$/'; \ - t=3Dexceptions-$$$$; \ - trap 's=3D$$?; rm -f $$t; exit $$s' 0; \ - for sig in 1 2 3 13 15; do \ - eval "trap 'v=3D`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \ - done; \ - src=3D`for f in $(SOURCES); do \ - test -f $$f && d=3D || d=3D$(srcdir)/; echo $$d$$f; done`; \ - hdr=3D`for f in $(_gl_TS_headers); do \ - test -f $$f && d=3D || d=3D$(srcdir)/; echo $$d$$f; done`; \ - ( printf '%s\n' '__.*' $(_gl_TS_unmarked_extern_functions); \ - $(GREP) -h -A1 '^extern .*[^;]$$' $$src \ - | $(GREP) -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d'; \ - perl -lne \ - '$(_gl_TS_function_match) and print $$1' $$hdr; \ - ) | sort -u | $(SED) "$$sed_wrap" > $$t; \ - nm -g $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|$(GREP) -Ev -f $$t \ - && { echo the above functions should have static scope >&2; \ - exit 1; } || : ; \ - ( printf '%s\n' '__.*' main $(_gl_TS_unmarked_extern_vars); \ - perl -lne '$(_gl_TS_var_match) and print $$1' \ - $$hdr $(_gl_TS_other_headers) \ - ) | sort -u | $(SED) "$$sed_wrap" > $$t; \ - nm -g $(_gl_TS_obj_files) | $(SED) -n 's/.* [BCDGRS] //p' \ - | sort -u | $(GREP) -Ev -f $$t \ - && { echo the above variables should have static scope >&2; \ - exit 1; } || : -# TS-end -endif --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list