mirror of
https://github.com/curl/curl.git
synced 2026-08-25 21:03:34 +03:00
scripts/managen: the new name and home for the manpage generator
It was previously docs/cmdline-opts/gen.pl Closes #13089
This commit is contained in:
parent
39173f66e5
commit
1ccf1cd993
7 changed files with 26 additions and 17 deletions
|
|
@ -29,8 +29,8 @@ transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.
|
|||
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
|
||||
add_custom_command(OUTPUT "${MANPAGE}"
|
||||
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && "${PERL_EXECUTABLE}" "./gen.pl" mainpage ${DPAGES} > "${MANPAGE}"
|
||||
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && "${PERL_EXECUTABLE}" "./gen.pl" ascii ${DPAGES} > "${ASCIIPAGE}"
|
||||
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && "${PERL_EXECUTABLE}" ${PROJECT_SOURCE_DIR}/scripts/managen mainpage ${DPAGES} > "${MANPAGE}"
|
||||
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && "${PERL_EXECUTABLE}" ${PROJECT_SOURCE_DIR}/scripts/managen ascii ${DPAGES} > "${ASCIIPAGE}"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(generate-curl.1 ALL DEPENDS "${MANPAGE}")
|
||||
|
|
|
|||
|
|
@ -103,11 +103,16 @@ getting spellchecked by CI jobs): `%DATE`, `%VERSION` and `%GLOBALS`.
|
|||
|
||||
## Generate
|
||||
|
||||
`./gen.pl mainpage`
|
||||
`managen mainpage [list of markdown option file names]`
|
||||
|
||||
This command outputs a single huge nroff file, meant to become `curl.1`. The
|
||||
full curl man page.
|
||||
|
||||
`./gen.pl listhelp`
|
||||
`managen ascii [list of markdown option file names]`
|
||||
|
||||
This command outputs a single text file, meant to become `curl.txt`. The full
|
||||
curl man page in text format, used to build `tool_hugehelp.c`.
|
||||
|
||||
`managen listhelp`
|
||||
|
||||
Generates a full `curl --help` output for all known command line options.
|
||||
|
|
|
|||
|
|
@ -31,13 +31,15 @@ man_MANS = $(MANPAGE)
|
|||
|
||||
include Makefile.inc
|
||||
|
||||
EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(SUPPORT) CMakeLists.txt mainpage.idx
|
||||
EXTRA_DIST = $(DPAGES) MANPAGE.md $(SUPPORT) CMakeLists.txt mainpage.idx
|
||||
|
||||
GEN = $(GN_$(V))
|
||||
GN_0 = @echo " GENERATE" $@;
|
||||
GN_1 =
|
||||
GN_ = $(GN_0)
|
||||
|
||||
MANAGEN=$(abs_top_srcdir)/scripts/managen
|
||||
|
||||
if BUILD_DOCS
|
||||
CLEANFILES = $(MANPAGE) $(ASCIIPAGE)
|
||||
|
||||
|
|
@ -45,11 +47,14 @@ all: $(MANPAGE) $(ASCIIPAGE)
|
|||
|
||||
endif
|
||||
|
||||
$(MANPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc gen.pl
|
||||
$(GEN)(rm -f $(MANPAGE) && (cd $(srcdir) && @PERL@ ./gen.pl mainpage $(DPAGES)) > manpage.tmp.$$$$ && mv manpage.tmp.$$$$ $(MANPAGE))
|
||||
$(MANPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc $(MANAGEN)
|
||||
$(GEN)(rm -f $(MANPAGE) && (cd $(srcdir) && @PERL@ $(MANAGEN) mainpage $(DPAGES)) > manpage.tmp.$$$$ && mv manpage.tmp.$$$$ $(MANPAGE))
|
||||
|
||||
$(ASCIIPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc gen.pl
|
||||
$(GEN)(rm -f $(ASCIIPAGE) && (cd $(srcdir) && @PERL@ ./gen.pl ascii $(DPAGES)) > asciipage.tmp.$$$$ && mv asciipage.tmp.$$$$ $(ASCIIPAGE))
|
||||
$(ASCIIPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc $(MANAGEN)
|
||||
$(GEN)(rm -f $(ASCIIPAGE) && (cd $(srcdir) && @PERL@ $(MANAGEN) ascii $(DPAGES)) > asciipage.tmp.$$$$ && mv asciipage.tmp.$$$$ $(ASCIIPAGE))
|
||||
|
||||
listhelp:
|
||||
./gen.pl listhelp $(DPAGES) > $(top_builddir)/src/tool_listhelp.c
|
||||
$(MANAGEN) listhelp $(DPAGES) > $(top_builddir)/src/tool_listhelp.c
|
||||
|
||||
listcats:
|
||||
@$(MANAGEN) listcats $(DPAGES)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue