From nobody Tue Apr 16 12:34:36 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1546544535334570.0653604369359; Thu, 3 Jan 2019 11:42:15 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19DC4A0A50; Thu, 3 Jan 2019 19:42:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A93D5D6A6; Thu, 3 Jan 2019 19:42:11 +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 2727D3F953; Thu, 3 Jan 2019 19:42:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x03Jg8Fr027735 for ; Thu, 3 Jan 2019 14:42:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1954619C7E; Thu, 3 Jan 2019 19:42:08 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-216.phx2.redhat.com [10.3.116.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id C82EC18500; Thu, 3 Jan 2019 19:42:03 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Thu, 3 Jan 2019 13:41:57 -0600 Message-Id: <20190103194159.6177-2-eblake@redhat.com> In-Reply-To: <20190103194159.6177-1-eblake@redhat.com> References: <20190103194159.6177-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: r.bolshakov@yadro.com Subject: [libvirt] [PATCH v2 1/3] maint: update gnulib for syntax-check on BSD 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-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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 03 Jan 2019 19:42:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" In particular, this incorporates Roman's patches to allow 'make syntax-check' to work on BSD with its exec argv limitations that previously failed when trying to grep the large number of files present in libvirt. cfg.mk needs similar changes, but that will be tackled separately. Signed-off-by: Eric Blake Reviewed-by: J=C3=A1n Tomko --- .gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gnulib b/.gnulib index 4652c7bafa..70eb4687b1 160000 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 4652c7bafa60332145f1e05a7de5f48e1bc56226 +Subproject commit 70eb4687b1d84ae780bbf2b8141bee07c85e6d3b --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 16 12:34:36 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1546544571548697.0906312891517; Thu, 3 Jan 2019 11:42:51 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 041727EBC3; Thu, 3 Jan 2019 19:42:30 +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 9FFAF60A97; Thu, 3 Jan 2019 19:42:29 +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 52CEB18327E8; Thu, 3 Jan 2019 19:42:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x03JgCcQ027745 for ; Thu, 3 Jan 2019 14:42:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id F1C2919742; Thu, 3 Jan 2019 19:42:11 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-216.phx2.redhat.com [10.3.116.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9ADD6578E; Thu, 3 Jan 2019 19:42:08 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Thu, 3 Jan 2019 13:41:58 -0600 Message-Id: <20190103194159.6177-3-eblake@redhat.com> In-Reply-To: <20190103194159.6177-1-eblake@redhat.com> References: <20190103194159.6177-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: r.bolshakov@yadro.com Subject: [libvirt] [PATCH v2 2/3] maint: prefer $(GREP) in cfg.mk 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-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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 03 Jan 2019 19:42:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" We already used $(GREP) in some places, but might as well use it everywhere during syntax check, in line with similar recent gnulib changes. Reviewed-by: J=C3=A1n Tomko --- cfg.mk | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/cfg.mk b/cfg.mk index 90ec8dfc60..9956d20034 100644 --- a/cfg.mk +++ b/cfg.mk @@ -1,5 +1,5 @@ # Customize Makefile.maint. -*- makefile -*- -# Copyright (C) 2008-2015 Red Hat, Inc. +# Copyright (C) 2008-2019 Red Hat, Inc. # Copyright (C) 2003-2008 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -305,7 +305,7 @@ sc_flags_usage: $(srcdir)/include/libvirt/libvirt-qemu.h \ $(srcdir)/include/libvirt/libvirt-lxc.h \ $(srcdir)/include/libvirt/libvirt-admin.h \ - | grep -c '\(long\|unsigned\) flags')" !=3D 4 && \ + | $(GREP) -c '\(long\|unsigned\) flags')" !=3D 4 && \ { echo '$(ME): new API should use "unsigned int flags"' 1>&2; \ exit 1; } || : @prohibit=3D' flags ATTRIBUTE_UNUSED' \ @@ -639,10 +639,10 @@ sc_libvirt_unmarked_diagnostics: exclude=3D'_\(' \ halt=3D'found unmarked diagnostic(s)' \ $(_sc_search_regexp) - @{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \ - grep -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \ + @{ $(GREP) -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \ + $(GREP) -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \ | $(SED) 's/_("\([^\"]\|\\.\)\+"//;s/[ ]"%s"//' \ - | grep '[ ]"' && \ + | $(GREP) '[ ]"' && \ { echo '$(ME): found unmarked diagnostic(s)' 1>&2; \ exit 1; } || : @@ -654,9 +654,9 @@ sc_libvirt_unmarked_diagnostics: # there are functions to which this one applies but that do not get marked # diagnostics. sc_prohibit_newline_at_end_of_diagnostic: - @grep -A2 -nE \ + @$(GREP) -A2 -nE \ '\<$(func_re) *\(' $$($(VC_LIST_EXCEPT)) \ - | grep '\\n"' \ + | $(GREP) '\\n"' \ && { echo '$(ME): newline at end of message(s)' 1>&2; \ exit 1; } || : @@ -664,12 +664,12 @@ sc_prohibit_newline_at_end_of_diagnostic: # allow VIR_ERROR to do this, and ignore functions that take a single # string rather than a format argument. sc_prohibit_diagnostic_without_format: - @{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \ - grep -A2 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \ + @{ $(GREP) -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \ + $(GREP) -A2 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \ | $(SED) -rn -e ':l; /[,"]$$/ {N;b l;}' \ -e '/(xenapiSessionErrorHandler|vah_(error|warning))/d' \ -e '/\<$(func_re) *\([^"]*"([^%"]|"\n[^"]*")*"[,)]/p' \ - | grep -vE 'VIR_ERROR' && \ + | $(GREP) -vE 'VIR_ERROR' && \ { echo '$(ME): found diagnostic without %' 1>&2; \ exit 1; } || : @@ -687,16 +687,16 @@ sc_prohibit_useless_translation: # When splitting a diagnostic across lines, ensure that there is a space # or \n on one side of the split. sc_require_whitespace_in_translation: - @grep -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \ + @$(GREP) -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \ | $(SED) -ne ':l; /"$$/ {N;b l;}; s/"\n[^"]*"/""/g; s/\\n/ /g' \ - -e '/_(.*[^\ ]""[^\ ]/p' | grep . && \ + -e '/_(.*[^\ ]""[^\ ]/p' | $(GREP) . && \ { echo '$(ME): missing whitespace at line split' 1>&2; \ exit 1; } || : # Enforce recommended preprocessor indentation style. sc_preprocessor_indentation: @if cppi --version >/dev/null 2>&1; then \ - $(VC_LIST_EXCEPT) | grep -E '\.[ch](\.in)?$$' | xargs cppi -a -c \ + $(VC_LIST_EXCEPT) | $(GREP) -E '\.[ch](\.in)?$$' | xargs cppi -a -c \ || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \ exit 1; }; \ else \ @@ -707,13 +707,13 @@ sc_preprocessor_indentation: # (comment-only) C file that mirrors the same layout as the spec file. sc_spec_indentation: @if cppi --version >/dev/null 2>&1; then \ - for f in $$($(VC_LIST_EXCEPT) | grep '\.spec\.in$$'); do \ + for f in $$($(VC_LIST_EXCEPT) | $(GREP) '\.spec\.in$$'); do \ $(SED) -e 's|#|// #|; s|%ifn*\(arch\)* |#if a // |' \ -e 's/%\(else\|endif\|define\)/#\1/' \ -e 's/^\( *\)\1\1\1#/#\1/' \ -e 's|^\( *[^#/ ]\)|// \1|; s|^\( */[^/]\)|// \1|' $$f \ | cppi -a -c 2>&1 | $(SED) "s|standard input|$$f|"; \ - done | { if grep . >&2; then false; else :; fi; } \ + done | { if $(GREP) . >&2; then false; else :; fi; } \ || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \ exit 1; }; \ else \ @@ -803,11 +803,11 @@ sc_prohibit_cross_inclusion: # When converting an enum to a string, make sure that we track any new # elements added to the enum by using a _LAST marker. sc_require_enum_last_marker: - @grep -A1 -nE '^[^#]*VIR_ENUM_IMPL *\(' $$($(VC_LIST_EXCEPT)) \ + @$(GREP) -A1 -nE '^[^#]*VIR_ENUM_IMPL *\(' $$($(VC_LIST_EXCEPT)) \ | $(SED) -ne '/VIR_ENUM_IMPL[^,]*,$$/N' \ -e '/VIR_ENUM_IMPL[^,]*,[^,]*[^_,][^L,][^A,][^S,][^T,],/p' \ -e '/VIR_ENUM_IMPL[^,]*,[^,]\{0,4\},/p' \ - | grep . && \ + | $(GREP) . && \ { echo '$(ME): enum impl needs to use _LAST marker' 1>&2; \ exit 1; } || : @@ -883,7 +883,7 @@ sc_prohibit_wrong_filename_in_comment: if (fail =3D=3D 1) { \ exit 1; \ } \ - }' $$($(VC_LIST_EXCEPT) | grep '\.[ch]$$') || fail=3D1; \ + }' $$($(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$') || fail=3D1; \ if test $$fail -eq 1; then \ { echo '$(ME): The file name in comments must match the' \ 'actual file name' 1>&2; exit 1; } \ @@ -918,7 +918,7 @@ sc_require_if_else_matching_braces: $(_sc_search_regexp) sc_curly_braces_style: - @files=3D$$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); \ + @files=3D$$($(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$'); \ if $(GREP) -nHP \ '^\s*(?!([a-zA-Z_]*for_?each[a-zA-Z_]*) ?\()([_a-zA-Z0-9]+( [_a-zA-Z0-9]+)= * ?\()?(\*?[_a-zA-Z0-9]+(,? \*?[_a-zA-Z0-9\[\]]+)+|void)\) ?\{' \ $$files; then \ @@ -931,7 +931,7 @@ sc_curly_braces_style: fi sc_prohibit_windows_special_chars_in_filename: - @files=3D$$($(VC_LIST_EXCEPT) | grep '[:*?"<>|]'); \ + @files=3D$$($(VC_LIST_EXCEPT) | $(GREP) '[:*?"<>|]'); \ test -n "$$files" && { echo '$(ME): Windows special chars' \ 'in filename not allowed:' 1>&2; echo $$files 1>&2; exit 1; } || : @@ -996,8 +996,8 @@ sc_prohibit_sysconf_pagesize: $(_sc_search_regexp) sc_prohibit_virSecurity: - @grep -Pn 'virSecurityManager(?!Ptr)' $$($(VC_LIST_EXCEPT) | grep 'src/qe= mu/' | \ - grep -v 'src/qemu/qemu_security') && \ + @$(GREP) -Pn 'virSecurityManager(?!Ptr)' $$($(VC_LIST_EXCEPT) | $(GREP) '= src/qemu/' | \ + $(GREP) -v 'src/qemu/qemu_security') && \ { echo '$(ME): prefer qemuSecurity wrappers' 1>&2; exit 1; } || : sc_prohibit_pthread_create: @@ -1128,24 +1128,24 @@ endif # Don't include duplicate header in the source (either *.c or *.h) prohibit-duplicate-header: - $(AM_V_GEN)files=3D$$($(VC_LIST_EXCEPT) | grep '\.[chx]$$'); \ + $(AM_V_GEN)files=3D$$($(VC_LIST_EXCEPT) | $(GREP) '\.[chx]$$'); \ $(PERL) -W $(top_srcdir)/build-aux/prohibit-duplicate-header.pl $$files spacing-check: - $(AM_V_GEN)files=3D`$(VC_LIST) | grep '\.c$$'`; \ + $(AM_V_GEN)files=3D`$(VC_LIST) | $(GREP) '\.c$$'`; \ $(PERL) $(top_srcdir)/build-aux/check-spacing.pl $$files || \ { echo '$(ME): incorrect formatting' 1>&2; exit 1; } mock-noinline: - $(AM_V_GEN)files=3D`$(VC_LIST) | grep '\.[ch]$$'`; \ + $(AM_V_GEN)files=3D`$(VC_LIST) | $(GREP) '\.[ch]$$'`; \ $(PERL) $(top_srcdir)/build-aux/mock-noinline.pl $$files header-ifdef: - $(AM_V_GEN)files=3D`$(VC_LIST) | grep '\.[h]$$'`; \ + $(AM_V_GEN)files=3D`$(VC_LIST) | $(GREP) '\.[h]$$'`; \ $(PERL) $(top_srcdir)/build-aux/header-ifdef.pl $$files test-wrap-argv: - $(AM_V_GEN)files=3D`$(VC_LIST) | grep -E '\.(ldargs|args)'`; \ + $(AM_V_GEN)files=3D`$(VC_LIST) | $(GREP) -E '\.(ldargs|args)'`; \ $(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check $$files group-qemu-caps: --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 16 12:34:36 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1546544536417397.62063492711854; Thu, 3 Jan 2019 11:42:16 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D095BC05B03C; Thu, 3 Jan 2019 19:42:13 +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 91F526061B; Thu, 3 Jan 2019 19:42:13 +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 42D90181B9EB; Thu, 3 Jan 2019 19:42:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x03JgCeO027750 for ; Thu, 3 Jan 2019 14:42:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 722CF45B9; Thu, 3 Jan 2019 19:42:12 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-216.phx2.redhat.com [10.3.116.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CBDA19742; Thu, 3 Jan 2019 19:42:12 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Thu, 3 Jan 2019 13:41:59 -0600 Message-Id: <20190103194159.6177-4-eblake@redhat.com> In-Reply-To: <20190103194159.6177-1-eblake@redhat.com> References: <20190103194159.6177-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: r.bolshakov@yadro.com Subject: [libvirt] [PATCH v2 3/3] maint: split long lines for BSD 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-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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 03 Jan 2019 19:42:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Similar to the gnulib changes we just incorporated into maint.mk, it's time to use '$(VC_LIST) | xargs program' instead of 'program $$($(VC_LIST))', in order to bypass the problem of hitting argv limits due to our large set of files. Drop several uses of $$files as a temporary variable when we can instead directly use xargs. While at it, fix a typo in the prohibit_windows_special_chars error message. Signed-off-by: Eric Blake Reviewed-by: J=C3=A1n Tomko --- cfg.mk | 75 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/cfg.mk b/cfg.mk index 9956d20034..e2702d50c9 100644 --- a/cfg.mk +++ b/cfg.mk @@ -639,8 +639,10 @@ sc_libvirt_unmarked_diagnostics: exclude=3D'_\(' \ halt=3D'found unmarked diagnostic(s)' \ $(_sc_search_regexp) - @{ $(GREP) -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \ - $(GREP) -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \ + @{ $(VC_LIST_EXCEPT) | xargs \ + $(GREP) -nE '\<$(func_re) *\(.*;$$' /dev/null; \ + $(VC_LIST_EXCEPT) | xargs \ + $(GREP) -A1 -nE '\<$(func_re) *\(.*,$$' /dev/null; } \ | $(SED) 's/_("\([^\"]\|\\.\)\+"//;s/[ ]"%s"//' \ | $(GREP) '[ ]"' && \ { echo '$(ME): found unmarked diagnostic(s)' 1>&2; \ @@ -654,8 +656,8 @@ sc_libvirt_unmarked_diagnostics: # there are functions to which this one applies but that do not get marked # diagnostics. sc_prohibit_newline_at_end_of_diagnostic: - @$(GREP) -A2 -nE \ - '\<$(func_re) *\(' $$($(VC_LIST_EXCEPT)) \ + @$(VC_LIST_EXCEPT) | xargs $(GREP) -A2 -nE \ + '\<$(func_re) *\(' /dev/null \ | $(GREP) '\\n"' \ && { echo '$(ME): newline at end of message(s)' 1>&2; \ exit 1; } || : @@ -664,8 +666,10 @@ sc_prohibit_newline_at_end_of_diagnostic: # allow VIR_ERROR to do this, and ignore functions that take a single # string rather than a format argument. sc_prohibit_diagnostic_without_format: - @{ $(GREP) -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \ - $(GREP) -A2 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \ + @{ $(VC_LIST_EXCEPT) | xargs \ + $(GREP) -nE '\<$(func_re) *\(.*;$$' /dev/null; \ + $(VC_LIST_EXCEPT) | xargs \ + $(GREP) -A2 -nE '\<$(func_re) *\(.*,$$' /dev/null; } \ | $(SED) -rn -e ':l; /[,"]$$/ {N;b l;}' \ -e '/(xenapiSessionErrorHandler|vah_(error|warning))/d' \ -e '/\<$(func_re) *\([^"]*"([^%"]|"\n[^"]*")*"[,)]/p' \ @@ -687,7 +691,7 @@ sc_prohibit_useless_translation: # When splitting a diagnostic across lines, ensure that there is a space # or \n on one side of the split. sc_require_whitespace_in_translation: - @$(GREP) -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \ + @$(VC_LIST_EXCEPT) | xargs $(GREP) -n -A1 '"$$' /dev/null \ | $(SED) -ne ':l; /"$$/ {N;b l;}; s/"\n[^"]*"/""/g; s/\\n/ /g' \ -e '/_(.*[^\ ]""[^\ ]/p' | $(GREP) . && \ { echo '$(ME): missing whitespace at line split' 1>&2; \ @@ -803,7 +807,8 @@ sc_prohibit_cross_inclusion: # When converting an enum to a string, make sure that we track any new # elements added to the enum by using a _LAST marker. sc_require_enum_last_marker: - @$(GREP) -A1 -nE '^[^#]*VIR_ENUM_IMPL *\(' $$($(VC_LIST_EXCEPT)) \ + @$(VC_LIST_EXCEPT) | xargs \ + $(GREP) -A1 -nE '^[^#]*VIR_ENUM_IMPL *\(' /dev/null \ | $(SED) -ne '/VIR_ENUM_IMPL[^,]*,$$/N' \ -e '/VIR_ENUM_IMPL[^,]*,[^,]*[^_,][^L,][^A,][^S,][^T,],/p' \ -e '/VIR_ENUM_IMPL[^,]*,[^,]\{0,4\},/p' \ @@ -866,8 +871,7 @@ sc_prohibit_atoi: $(_sc_search_regexp) sc_prohibit_wrong_filename_in_comment: - @fail=3D0; \ - awk 'BEGIN { \ + @$(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | xargs awk 'BEGIN { \ fail=3D0; \ } FNR < 3 { \ n=3Dmatch($$0, /[[:space:]][^[:space:]]*[.][ch][[:space:]:]/); \ @@ -883,11 +887,8 @@ sc_prohibit_wrong_filename_in_comment: if (fail =3D=3D 1) { \ exit 1; \ } \ - }' $$($(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$') || fail=3D1; \ - if test $$fail -eq 1; then \ - { echo '$(ME): The file name in comments must match the' \ - 'actual file name' 1>&2; exit 1; } \ - fi; + }' || { echo '$(ME): The file name in comments must match the' \ + 'actual file name' 1>&2; exit 1; } sc_prohibit_virConnectOpen_in_virsh: @prohibit=3D'\bvirConnectOpen[a-zA-Z]* *\(' \ @@ -918,22 +919,21 @@ sc_require_if_else_matching_braces: $(_sc_search_regexp) sc_curly_braces_style: - @files=3D$$($(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$'); \ - if $(GREP) -nHP \ + @if $(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | xargs $(GREP) -nHP \ '^\s*(?!([a-zA-Z_]*for_?each[a-zA-Z_]*) ?\()([_a-zA-Z0-9]+( [_a-zA-Z0-9]+)= * ?\()?(\*?[_a-zA-Z0-9]+(,? \*?[_a-zA-Z0-9\[\]]+)+|void)\) ?\{' \ - $$files; then \ + /dev/null; then \ echo '$(ME): Non-K&R style used for curly braces around' \ 'function body' 1>&2; exit 1; \ fi; \ - if $(GREP) -A1 -En ' ((if|for|while|switch) \(|(else|do)\b)[^{]*$$'\ - $$files | $(GREP) '^[^ ]*- *{'; then \ + if $(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | xargs \ + $(GREP) -A1 -En ' ((if|for|while|switch) \(|(else|do)\b)[^{]*$$' \ + /dev/null | $(GREP) '^[^ ]*- *{'; then \ echo '$(ME): Use hanging braces for compound statements' 1>&2; exit 1; \ fi sc_prohibit_windows_special_chars_in_filename: - @files=3D$$($(VC_LIST_EXCEPT) | $(GREP) '[:*?"<>|]'); \ - test -n "$$files" && { echo '$(ME): Windows special chars' \ - 'in filename not allowed:' 1>&2; echo $$files 1>&2; exit 1; } || : + @$(VC_LIST_EXCEPT) | $(GREP) '[:*?"<>|]' && \ + { echo '$(ME): Windows special chars in filename not allowed' 1>&2; echo = exit 1; } || : sc_prohibit_mixed_case_abbreviations: @prohibit=3D'Pci|Usb|Scsi' \ @@ -949,11 +949,11 @@ sc_require_locale_h: $(_sc_search_regexp) sc_prohibit_empty_first_line: - @awk 'BEGIN { fail=3D0; } \ + @$(VC_LIST_EXCEPT) | xargs awk 'BEGIN { fail=3D0; } \ FNR =3D=3D 1 { if ($$0 =3D=3D "") { print FILENAME ":1:"; fail=3D1; } } \ END { if (fail =3D=3D 1) { \ print "$(ME): Prohibited empty first line" > "/dev/stderr"; \ - } exit fail; }' $$($(VC_LIST_EXCEPT)); + } exit fail; }' sc_prohibit_paren_brace: @prohibit=3D'\)\{$$' \ @@ -996,8 +996,9 @@ sc_prohibit_sysconf_pagesize: $(_sc_search_regexp) sc_prohibit_virSecurity: - @$(GREP) -Pn 'virSecurityManager(?!Ptr)' $$($(VC_LIST_EXCEPT) | $(GREP) '= src/qemu/' | \ - $(GREP) -v 'src/qemu/qemu_security') && \ + @$(VC_LIST_EXCEPT) | $(GREP) 'src/qemu/' | \ + $(GREP) -v 'src/qemu/qemu_security' | \ + xargs $(GREP) -Pn 'virSecurityManager(?!Ptr)' /dev/null && \ { echo '$(ME): prefer qemuSecurity wrappers' 1>&2; exit 1; } || : sc_prohibit_pthread_create: @@ -1128,25 +1129,25 @@ endif # Don't include duplicate header in the source (either *.c or *.h) prohibit-duplicate-header: - $(AM_V_GEN)files=3D$$($(VC_LIST_EXCEPT) | $(GREP) '\.[chx]$$'); \ - $(PERL) -W $(top_srcdir)/build-aux/prohibit-duplicate-header.pl $$files + $(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[chx]$$' | xargs \ + $(PERL) -W $(top_srcdir)/build-aux/prohibit-duplicate-header.pl spacing-check: - $(AM_V_GEN)files=3D`$(VC_LIST) | $(GREP) '\.c$$'`; \ - $(PERL) $(top_srcdir)/build-aux/check-spacing.pl $$files || \ + $(AM_V_GEN)$(VC_LIST) | $(GREP) '\.c$$' | xargs \ + $(PERL) $(top_srcdir)/build-aux/check-spacing.pl || \ { echo '$(ME): incorrect formatting' 1>&2; exit 1; } mock-noinline: - $(AM_V_GEN)files=3D`$(VC_LIST) | $(GREP) '\.[ch]$$'`; \ - $(PERL) $(top_srcdir)/build-aux/mock-noinline.pl $$files + $(AM_V_GEN)$(VC_LIST) | $(GREP) '\.[ch]$$' | xargs \ + $(PERL) $(top_srcdir)/build-aux/mock-noinline.pl header-ifdef: - $(AM_V_GEN)files=3D`$(VC_LIST) | $(GREP) '\.[h]$$'`; \ - $(PERL) $(top_srcdir)/build-aux/header-ifdef.pl $$files + $(AM_V_GEN)$(VC_LIST) | $(GREP) '\.[h]$$' | xargs \ + $(PERL) $(top_srcdir)/build-aux/header-ifdef.pl test-wrap-argv: - $(AM_V_GEN)files=3D`$(VC_LIST) | $(GREP) -E '\.(ldargs|args)'`; \ - $(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check $$files + $(AM_V_GEN)$(VC_LIST) | $(GREP) -E '\.(ldargs|args)' | xargs \ + $(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check group-qemu-caps: $(AM_V_GEN)$(PERL) $(top_srcdir)/tests/group-qemu-caps.pl --check $(top_s= rcdir)/ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list