From nobody Sun Apr 28 06:26:22 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 ARC-Seal: i=1; a=rsa-sha256; t=1560604754; cv=none; d=zoho.com; s=zohoarc; b=c0xk9a9UUmfBBw1G6sLLIpy+zR4ef7gQiWPU69icytguJqcxJYQzmM27FM8IQC+ov1dbGcYj6rBAZz7OfLI98V6frw0M+UI3K/h10fQ1yY20p7255fW9NASV3R5hoYHXzmhk1SushyJrMEpbUSTfRZUJv4FgbhIJxNI0wG04wUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560604754; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=NTQgfx3dZDbJGWc/0oSuFgmeZWLZdp0kgroDhR4YMZg=; b=BjWCWCQGq6irAtWdWJfiJInSKxbZdTi0iZk5DCbuzofLlE0x5OUjSZAIkjkdsQGJ1lQTVy3KZPeUurPxwQ918eccdu4dS+xjZ0tcJO2V56L1zEFnu6lcCji1Tw3P70wLXx5cQf08fXiP2l/lP8XwTZfU69DXh9CHB0lR+zd6YI4= 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 1560604754638514.0273433228971; Sat, 15 Jun 2019 06:19:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D8750308FC4D; Sat, 15 Jun 2019 13:19:08 +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 9614318228; Sat, 15 Jun 2019 13:19:08 +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 7E71EC57E; Sat, 15 Jun 2019 13:19:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5FDHRAI022323 for ; Sat, 15 Jun 2019 09:17:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id D921960A98; Sat, 15 Jun 2019 13:17:27 +0000 (UTC) Received: from localhost.localdomain (ovpn-204-19.brq.redhat.com [10.40.204.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 594B660856 for ; Sat, 15 Jun 2019 13:17:25 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Sat, 15 Jun 2019 15:17:22 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] build: Require cppi for 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Sat, 15 Jun 2019 13:19:11 +0000 (UTC) Since its introduction in v0.8.0~314 we allowed for cppi to be not present for 'syntax-check' because the package did exist in Fedora Core 12. Well, we don't care anymore =C2=AF\_(=E3=83=84)_/=C2=AF All recent distros have it. Moreover, it's fairly easy to miss 'cppi not installed' message in sea of syntax-check output (esp. for newbies who probably benefit from it the most). Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- cfg.mk | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/cfg.mk b/cfg.mk index 5074ef611a..dd0a177fb3 100644 --- a/cfg.mk +++ b/cfg.mk @@ -697,30 +697,22 @@ sc_require_whitespace_in_translation: =20 # 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 \ - || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \ - exit 1; }; \ - else \ - echo '$(ME): skipping test $@: cppi not installed' 1>&2; \ - fi + @$(VC_LIST_EXCEPT) | $(GREP) -E '\.[ch](\.in)?$$' | xargs cppi -a -c \ + || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \ + exit 1; }; =20 # Enforce similar spec file indentation style, by running cppi on a # (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 \ - $(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; } \ - || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \ - exit 1; }; \ - else \ - echo '$(ME): skipping test $@: cppi not installed' 1>&2; \ - fi + @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; } \ + || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \ + exit 1; }; =20 # Nested conditionals are easier to understand if we enforce that endifs # can be paired back to the if --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list