]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_hugehelp: make hugehelp a blank macro when disabled
authorDaniel Stenberg <daniel@haxx.se>
Tue, 13 Sep 2022 08:25:26 +0000 (10:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 14 Sep 2022 06:04:49 +0000 (08:04 +0200)
Closes #9485

src/CMakeLists.txt
src/Makefile.am
src/mkhelp.pl
src/tool_hugehelp.h

index dd9640c9c852539bee7b80e782d7cc9682d638d1..bf8ce7a1bdf32e3a054801ea77f5152ea4099f28 100644 (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)
index 706f0aac3f8d844bf1565e12685f08e121a35a55..5d093da20483841a4fe6b1fc0babd89145da80ca 100644 (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
index 6760243504fcc264459d487354991250a4ade461..bf146d7c9362eb32cda5c3f2e00d6df31f8679b9 100755 (executable)
@@ -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
   ;
index 9d1028094f61690430163a3ac3fa06c173517c63..d5880ac251d749dd6b74a382710bff48ba9edb2d 100644 (file)
  ***************************************************************************/
 #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 */