tool_hugehelp: make hugehelp a blank macro when disabled

Closes #9485
This commit is contained in:
Daniel Stenberg 2022-09-13 10:25:26 +02:00
parent a850b9edb9
commit b54920f7e4
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
4 changed files with 7 additions and 10 deletions

View File

@ -47,9 +47,7 @@ if(USE_MANUAL)
else()
add_custom_command(
OUTPUT tool_hugehelp.c
COMMAND ${CMAKE_COMMAND} -E echo "/* built-in manual is disabled, blank function */" > tool_hugehelp.c
COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_hugehelp.h\"" >> tool_hugehelp.c
COMMAND ${CMAKE_COMMAND} -E echo "void hugehelp(void) {}" >> tool_hugehelp.c
COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_hugehelp.h\"" > tool_hugehelp.c
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h"
VERBATIM)

View File

@ -127,9 +127,7 @@ endif
else # USE_MANUAL
# built-in manual has been disabled, make a blank file
$(HUGE):
$(HUGECMD)(echo "/* built-in manual is disabled, blank function */" > $(HUGE); \
echo '#include "tool_hugehelp.h"' >> $(HUGE); \
echo "void hugehelp(void) {}" >>$(HUGE) )
echo '#include "tool_hugehelp.h"' >> $(HUGE)
endif
# ignore tool_hugehelp.c since it is generated source code and it plays

View File

@ -227,10 +227,6 @@ foot();
sub foot {
print <<FOOT
#else /* !USE_MANUAL */
/* built-in manual is disabled, blank function */
#include "tool_hugehelp.h"
void hugehelp(void) {}
#endif /* USE_MANUAL */
FOOT
;

View File

@ -25,6 +25,11 @@
***************************************************************************/
#include "tool_setup.h"
#ifdef USE_MANUAL
void hugehelp(void);
#else
/* do nothing if not there */
#define hugehelp()
#endif
#endif /* HEADER_CURL_TOOL_HUGEHELP_H */