Add #ifndef DOXY guard to generated headers
authorNicolas Williams <nico@cryptonector.com>
Thu, 15 Dec 2016 04:00:29 +0000 (22:00 -0600)
committerNicolas Williams <nico@cryptonector.com>
Thu, 15 Dec 2016 04:05:58 +0000 (22:05 -0600)
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
doc/doxytmpl.dxy

index 5b2c03d48d1890d569d92daa3d827934409b74ed..577876c2d9e008453bb6b0ad60ff9eaf65c73a01 100644 (file)
@@ -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 .
index a16b0d8ce66e152a1482fe8848d76ed31331ccab..136a7a1d20e1fe3c16327a2cb5b88afff0259a16 100644 (file)
@@ -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
 #---------------------------------------------------------------------------