diff mbox

[ovs-dev,3/3] Makefile.am: Avoid including internal library in public header files.

Message ID CAPWQB7GeHGLHJyPSf7+fjcgSOyqiKryZaWY1CoQjqRD_NECB9g@mail.gmail.com
State Not Applicable
Headers show

Commit Message

Joe Stringer Feb. 21, 2017, 7:44 p.m. UTC
On 17 February 2017 at 17:47, Yi-Hung Wei <yihung.wei@gmail.com> wrote:
> Add a build check that public openvswitch header file should not include
> internal library.
>
> Suggested-by: Joe Stringer <joe@ovn.org>
> Suggested-by: Daniele Di Proietto <diproiettod@vmware.com>
> Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
> ---

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 mbox

Patch

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 <config.h>."; \
         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"; \