make the generated hugehelp.c file use the USE_MANUAL define so that it
authorDaniel Stenberg <daniel@haxx.se>
Sun, 25 Apr 2004 08:13:07 +0000 (08:13 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 25 Apr 2004 08:13:07 +0000 (08:13 +0000)
will be properly built with configure --disable-manual even if the source
file is already present

src/Makefile.am
src/mkhelp.pl

index a8330972508ae477e8fd73f0c49f2008e64eafbb..c5af7025117cf12fef3288f77be619024980bdd1 100644 (file)
@@ -74,7 +74,10 @@ $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
 else # HAVE_LIBZ
 # This generates the hugehelp.c file uncompressed only
 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
-       $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) > $(HUGE)
+       echo '#ifdef HAVE_CONFIG_H' > $(HUGE)
+       echo '#include "config.h"' >> $(HUGE)
+       echo '#endif' >> $(HUGE)
+       $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
 endif
 
 else # USE_MANUAL
index 3fef2bb3be68af3af35a5bd5d16018c81e7ccb73..195328edf65635a1a82f5a726319e3505c3f9631 100644 (file)
@@ -112,6 +112,10 @@ print <<HEAD
  * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
  * Generation time: $now
  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef USE_MANUAL
 #include "hugehelp.h"
 #include <stdio.h>
 HEAD
@@ -179,6 +183,7 @@ void hugehelp(void)
 }
 EOF
     ;
+foot();
 exit;
 }
 else {
@@ -211,5 +216,13 @@ for(@out) {
 
 }
 
-print ", stdout) ;\n}\n"
-    
+print ", stdout) ;\n}\n";
+
+foot();
+
+sub foot {
+  print <<FOOT
+#endif /* USE_MANUAL */
+FOOT
+  ;
+}