From patchwork Tue Feb 21 19:44:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 730734 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vSWDQ1hbkz9s0Z for ; Wed, 22 Feb 2017 06:44:53 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 46F2DBCE; Tue, 21 Feb 2017 19:44:46 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id E25ADBCA for ; Tue, 21 Feb 2017 19:44:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CCB891BF for ; Tue, 21 Feb 2017 19:44:43 +0000 (UTC) Received: from mfilter30-d.gandi.net (mfilter30-d.gandi.net [217.70.178.161]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 9C66DA80D9 for ; Tue, 21 Feb 2017 20:44:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter30-d.gandi.net Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter30-d.gandi.net (mfilter30-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id FShPxfXQe_kp for ; Tue, 21 Feb 2017 20:44:40 +0100 (CET) X-Originating-IP: 209.85.220.182 Received: from mail-qk0-f182.google.com (mail-qk0-f182.google.com [209.85.220.182]) (Authenticated sender: joe@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 8CE81A80D1 for ; Tue, 21 Feb 2017 20:44:40 +0100 (CET) Received: by mail-qk0-f182.google.com with SMTP id x71so66455249qkb.3 for ; Tue, 21 Feb 2017 11:44:40 -0800 (PST) X-Gm-Message-State: AMke39nxyr0E1kj1ZvweeIxGwYKH//c2kTD+JXoUa4SfjeHRqPMs/vGH6QGbvTVoYkkm8Ni7MkyhZ6GGLDHHCA== X-Received: by 10.55.188.66 with SMTP id m63mr28073297qkf.278.1487706279471; Tue, 21 Feb 2017 11:44:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.163.229 with HTTP; Tue, 21 Feb 2017 11:44:19 -0800 (PST) In-Reply-To: <1487382465-38640-3-git-send-email-yihung.wei@gmail.com> References: <1487382465-38640-1-git-send-email-yihung.wei@gmail.com> <1487382465-38640-3-git-send-email-yihung.wei@gmail.com> From: Joe Stringer Date: Tue, 21 Feb 2017 11:44:19 -0800 X-Gmail-Original-Message-ID: Message-ID: To: Yi-Hung Wei X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: ovs dev Subject: Re: [ovs-dev] [PATCH 3/3] Makefile.am: Avoid including internal library in public header files. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org On 17 February 2017 at 17:47, Yi-Hung Wei wrote: > Add a build check that public openvswitch header file should not include > internal library. > > Suggested-by: Joe Stringer > Suggested-by: Daniele Di Proietto > Signed-off-by: Yi-Hung Wei > --- With the minor caveat below addressed, I applied this to master. Thanks! I had to apply the following incremental to get my out-of-tree build to complain correctly: diff --git a/Makefile.am b/Makefile.am index 7126ebe55b21..7ff66fe15086 100644 --- a/Makefile.am +++ b/Makefile.am @@ -230,7 +230,7 @@ config-h-check: echo "every C source file must #include ."; \ exit 1; \ fi - if grep '#include' include/openvswitch/*.h | \ + if grep '#include' $(srcdir)/include/openvswitch/*.h | \ grep -vE '(<.*>)|("openvswitch)|("openflow)'; \ then \ echo "See above for list of violations of the rule that"; \