From fa2afcc5fc433929156b70547f9f3eb1f7c1f5dc Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Wed, 14 Dec 2016 22:00:29 -0600 Subject: [PATCH] Add #ifndef DOXY guard to generated headers cf/make-proto.pl copies Doxygen docs to -private and -protos headers. We need to either extract these from those files but not source files, or only from source files but not the generated headers. This commit does the latter. --- cf/make-proto.pl | 3 ++- doc/doxytmpl.dxy | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cf/make-proto.pl b/cf/make-proto.pl index 5b2c03d48..577876c2d 100644 --- a/cf/make-proto.pl +++ b/cf/make-proto.pl @@ -253,6 +253,7 @@ $private_h = ""; $public_h_header .= "/* This is a generated file */ #ifndef $block #define $block +#ifndef DOXY "; if ($oproto) { @@ -450,7 +451,7 @@ $private_h_trailer .= $undepstr; if ($public_h ne "" && $flags{"header"}) { $public_h = $public_h_header . $public_h . - $public_h_trailer . "#endif /* $block */\n"; + $public_h_trailer . "#endif /* DOXY */\n#endif /* $block */\n"; } if ($private_h ne "" && $flags{"header"}) { $private_h = $private_h_header . $private_h . diff --git a/doc/doxytmpl.dxy b/doc/doxytmpl.dxy index a16b0d8ce..136a7a1d2 100644 --- a/doc/doxytmpl.dxy +++ b/doc/doxytmpl.dxy @@ -213,7 +213,7 @@ EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = -PREDEFINED = +PREDEFINED = DOXY EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #---------------------------------------------------------------------------