summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-09-13 10:25:26 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-09-14 08:04:49 +0200
commitb54920f7e491b6e4340f48c5a0fa55fcce75562c (patch)
tree3277a9c63728e3827f5f2c68171e27306aee9e26 /src
parenta850b9edb93021866ac8e1b8e88231b54d88df0f (diff)
downloadcurl-b54920f7e491b6e4340f48c5a0fa55fcce75562c.tar.gz
tool_hugehelp: make hugehelp a blank macro when disabled
Closes #9485
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/Makefile.am4
-rwxr-xr-xsrc/mkhelp.pl4
-rw-r--r--src/tool_hugehelp.h5
4 files changed, 7 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index dd9640c9c..bf8ce7a1b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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)
diff --git a/src/Makefile.am b/src/Makefile.am
index 706f0aac3..5d093da20 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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
diff --git a/src/mkhelp.pl b/src/mkhelp.pl
index 676024350..bf146d7c9 100755
--- a/src/mkhelp.pl
+++ b/src/mkhelp.pl
@@ -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
;
diff --git a/src/tool_hugehelp.h b/src/tool_hugehelp.h
index 9d1028094..d5880ac25 100644
--- a/src/tool_hugehelp.h
+++ b/src/tool_hugehelp.h
@@ -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 */