From: Daniel Stenberg Date: Thu, 25 Jan 2024 10:14:29 +0000 (+0100) Subject: tool: fix the listhelp generation command X-Git-Tag: curl-8_6_0~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52c4d8d3f4dba56b0edd7add1195a455eb58fddd;p=thirdparty%2Fcurl.git tool: fix the listhelp generation command The previous command line to generate the tool_listhelp.c source file broke with 2494b8dd5175cee7. Make 'make listhelp' invoked in src/ generate it. Also update the comment in the file to mention the right procedure. Closes #12786 --- diff --git a/docs/cmdline-opts/Makefile.am b/docs/cmdline-opts/Makefile.am index 6fff55f484..e9b35ac052 100644 --- a/docs/cmdline-opts/Makefile.am +++ b/docs/cmdline-opts/Makefile.am @@ -39,3 +39,6 @@ all: $(MANPAGE) $(MANPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc gen.pl $(GEN)(rm -f $(MANPAGE) && cd $(srcdir) && @PERL@ ./gen.pl mainpage $(DPAGES) > $(builddir)/manpage.tmp && mv $(builddir)/manpage.tmp $(MANPAGE)) + +listhelp: + ./gen.pl listhelp $(DPAGES) > $(top_builddir)/src/tool_listhelp.c diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index 152d09595c..f4dcce8aeb 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -727,10 +727,10 @@ sub listhelp { /* * DO NOT edit tool_listhelp.c manually. - * This source file is generated with the following command: - - cd \$srcroot/docs/cmdline-opts - ./gen.pl listhelp *.d > \$srcroot/src/tool_listhelp.c + * This source file is generated with the following command in an autotools + * build: + * + * "make listhelp" */ const struct helptxt helptext[] = { diff --git a/src/Makefile.am b/src/Makefile.am index dced53e0f9..7a99c25480 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -157,7 +157,7 @@ tidy: $(TIDY) $(CURL_CFILES) $(TIDYFLAGS) -- $(curl_CPPFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H listhelp: - (cd $(top_srcdir)/docs/cmdline-opts && ./gen.pl listhelp *.d) > tool_listhelp.c + (cd $(top_srcdir)/docs/cmdline-opts && make listhelp) if HAVE_WINDRES .rc.o: diff --git a/src/tool_listhelp.c b/src/tool_listhelp.c index 59a5c95c99..32ed2533e1 100644 --- a/src/tool_listhelp.c +++ b/src/tool_listhelp.c @@ -26,10 +26,10 @@ /* * DO NOT edit tool_listhelp.c manually. - * This source file is generated with the following command: - - cd $srcroot/docs/cmdline-opts - ./gen.pl listhelp *.d > $srcroot/src/tool_listhelp.c + * This source file is generated with the following command in an autotools + * build: + * + * "make listhelp" */ const struct helptxt helptext[] = {