Re: [PATCH v2 3/3] maint: split long lines for BSD syntax-check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 03, 2019 at 01:41:59PM -0600, Eric Blake wrote:
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 <eblake@xxxxxxxxxx>
---
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='_\(' \
	halt='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; } \

Not sure why the /dev/null is needed.

If the syntax check rule were to operate on an empty list of files, we
can just delete it.

	   | $(SED) 's/_("\([^\"]\|\\.\)\+"//;s/[	 ]"%s"//' \
	   | $(GREP) '[	 ]"' && \
	  { echo '$(ME): found unmarked diagnostic(s)' 1>&2; \

With the /dev/null changes removed or justified:

Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux