1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 02:03:13 +02:00

doc: add CMake option ENABLE_DOC_INCOMPLETE to force build of incomplete docs (closes #1901)

This commit is contained in:
Sébastien Helleu
2023-03-31 21:07:25 +02:00
parent 10b2fa3a61
commit 6665cc866a
14 changed files with 159 additions and 53 deletions
+41 -34
View File
@@ -95,38 +95,39 @@ else()
set(INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME})
endif()
option(ENABLE_NCURSES "Compile the Ncurses interface" ON)
option(ENABLE_HEADLESS "Compile the headless binary" ON)
option(ENABLE_NLS "Enable Native Language Support" ON)
option(ENABLE_LARGEFILE "Enable Large File Support" ON)
option(ENABLE_ALIAS "Enable Alias plugin" ON)
option(ENABLE_BUFLIST "Enable Buflist plugin" ON)
option(ENABLE_CHARSET "Enable Charset plugin" ON)
option(ENABLE_EXEC "Enable Exec plugin" ON)
option(ENABLE_FIFO "Enable FIFO plugin" ON)
option(ENABLE_FSET "Enable Fast Set plugin" ON)
option(ENABLE_IRC "Enable IRC plugin" ON)
option(ENABLE_LOGGER "Enable Logger plugin" ON)
option(ENABLE_RELAY "Enable Relay plugin" ON)
option(ENABLE_SCRIPT "Enable Script plugin (script manager)" ON)
option(ENABLE_SCRIPTS "Enable script plugins (perl, python, …)" ON)
option(ENABLE_PERL "Enable Perl scripting language" ON)
option(ENABLE_PYTHON "Enable Python scripting language" ON)
option(ENABLE_RUBY "Enable Ruby scripting language" ON)
option(ENABLE_LUA "Enable Lua scripting language" ON)
option(ENABLE_TCL "Enable Tcl scripting language" ON)
option(ENABLE_GUILE "Enable Scheme (guile) scripting language" ON)
option(ENABLE_JAVASCRIPT "Enable JavaScript scripting language" OFF)
option(ENABLE_PHP "Enable PHP scripting language" ON)
option(ENABLE_SPELL "Enable Spell checker plugin" ON)
option(ENABLE_ENCHANT "Use Enchant lib in Spell checker plugin" OFF)
option(ENABLE_TRIGGER "Enable Trigger plugin" ON)
option(ENABLE_TYPING "Enable Typing plugin" ON)
option(ENABLE_XFER "Enable Xfer plugin" ON)
option(ENABLE_MAN "Enable build of man page" OFF)
option(ENABLE_DOC "Enable build of documentation" OFF)
option(ENABLE_TESTS "Enable tests" OFF)
option(ENABLE_CODE_COVERAGE "Enable code coverage" OFF)
option(ENABLE_NCURSES "Compile the Ncurses interface" ON)
option(ENABLE_HEADLESS "Compile the headless binary" ON)
option(ENABLE_NLS "Enable Native Language Support" ON)
option(ENABLE_LARGEFILE "Enable Large File Support" ON)
option(ENABLE_ALIAS "Enable Alias plugin" ON)
option(ENABLE_BUFLIST "Enable Buflist plugin" ON)
option(ENABLE_CHARSET "Enable Charset plugin" ON)
option(ENABLE_EXEC "Enable Exec plugin" ON)
option(ENABLE_FIFO "Enable FIFO plugin" ON)
option(ENABLE_FSET "Enable Fast Set plugin" ON)
option(ENABLE_IRC "Enable IRC plugin" ON)
option(ENABLE_LOGGER "Enable Logger plugin" ON)
option(ENABLE_RELAY "Enable Relay plugin" ON)
option(ENABLE_SCRIPT "Enable Script plugin (script manager)" ON)
option(ENABLE_SCRIPTS "Enable script plugins (perl, python, …)" ON)
option(ENABLE_PERL "Enable Perl scripting language" ON)
option(ENABLE_PYTHON "Enable Python scripting language" ON)
option(ENABLE_RUBY "Enable Ruby scripting language" ON)
option(ENABLE_LUA "Enable Lua scripting language" ON)
option(ENABLE_TCL "Enable Tcl scripting language" ON)
option(ENABLE_GUILE "Enable Scheme (guile) scripting language" ON)
option(ENABLE_JAVASCRIPT "Enable JavaScript scripting language" OFF)
option(ENABLE_PHP "Enable PHP scripting language" ON)
option(ENABLE_SPELL "Enable Spell checker plugin" ON)
option(ENABLE_ENCHANT "Use Enchant lib in Spell checker plugin" OFF)
option(ENABLE_TRIGGER "Enable Trigger plugin" ON)
option(ENABLE_TYPING "Enable Typing plugin" ON)
option(ENABLE_XFER "Enable Xfer plugin" ON)
option(ENABLE_MAN "Enable build of man page" OFF)
option(ENABLE_DOC "Enable build of documentation" OFF)
option(ENABLE_DOC_INCOMPLETE "Enable incomplete doc" OFF)
option(ENABLE_TESTS "Enable tests" OFF)
option(ENABLE_CODE_COVERAGE "Enable code coverage" OFF)
# code coverage
add_library(coverage_config INTERFACE)
@@ -141,7 +142,8 @@ if(ENABLE_DOC AND NOT ENABLE_HEADLESS)
endif()
# all plugins (except javascript) are required for documentation
if(ENABLE_DOC AND (NOT ENABLE_NLS OR NOT ENABLE_ALIAS OR NOT ENABLE_BUFLIST
if(ENABLE_DOC AND NOT ENABLE_DOC_INCOMPLETE
AND (NOT ENABLE_NLS OR NOT ENABLE_ALIAS OR NOT ENABLE_BUFLIST
OR NOT ENABLE_CHARSET OR NOT ENABLE_EXEC OR NOT ENABLE_FIFO
OR NOT ENABLE_FSET OR NOT ENABLE_IRC OR NOT ENABLE_LOGGER
OR NOT ENABLE_RELAY OR NOT ENABLE_SCRIPT OR NOT ENABLE_SCRIPTS
@@ -149,7 +151,12 @@ if(ENABLE_DOC AND (NOT ENABLE_NLS OR NOT ENABLE_ALIAS OR NOT ENABLE_BUFLIST
OR NOT ENABLE_LUA OR NOT ENABLE_TCL OR NOT ENABLE_GUILE
OR NOT ENABLE_PHP OR NOT ENABLE_SPELL OR NOT ENABLE_TRIGGER
OR NOT ENABLE_TYPING OR NOT ENABLE_XFER))
message(FATAL_ERROR "All plugins are required to build documentation.")
message(
FATAL_ERROR
" All plugins are required to build documentation.\n"
" If you really want to build incomplete docs, enable this option:\n"
" -DENABLE_DOC_INCOMPLETE=ON"
)
endif()
# headless mode is required for tests
+1 -1
View File
@@ -69,7 +69,7 @@ Build::
* core: remove RPM packaging
* core: remove build of .bz2 and .zst files in `make dist`
* core: remove obsolete cpack config
* doc: convert docgen.py to C, remove autogen files from repository, add parameter `--doc-gen`
* doc: convert docgen.py to C, remove autogen files from repository, add parameter `--doc-gen` to `weechat-headless` binary, add CMake option `ENABLE_DOC_INCOMPLETE`
[[v3.8]]
== Version 3.8 (2023-01-08)
+36 -2
View File
@@ -182,19 +182,53 @@ If needed, you can reset the option to the new default value after upgrade:
The option `weechat.look.paste_auto_add_newline` has been removed.
[[v4.0.0_build_packaging]]
=== Build and packaging
[[v4.0.0_build]]
=== Build
[[v4.0.0_build_autotools]]
==== Autotools
The autotools support for build of WeeChat has been removed. +
WeeChat must now be built with CMake.
[[v4.0.0_build_doc]]
==== Documentation
The auto-generated files for documentation are now built with `weechat-headless`,
after compilation of WeeChat and the plugins (the files are not in repository
any more). +
This implies all plugins must be compiled and loaded in order to have complete docs
(User's guide and Plugin API reference).
If ever you want to disable some plugins and force the build of incomplete docs,
a new option has been added: `ENABLE_DOC_INCOMPLETE` (`OFF` by default).
For example if you disable PHP plugin but still want docs where PHP options,
commands, etc. are missing:
----
cmake .. -DENABLE_PHP=OFF -DENABLE_DOC=ON -DENABLE_DOC_INCOMPLETE=ON
----
[[v4.0.0_packaging]]
=== Packaging
[[v4.0.0_packaging_tarballs]]
==== Tarballs
The command `make dist` now builds only `.gz` and `.xz` compressed tarballs. +
Formats `.bz2` and `.zst` are not built any more.
[[v4.0.0_packaging_rpm]]
==== RPM packaging
The file `weechat.spec` used for RPM packaging has been removed. +
openSUSE has its own here:
https://build.opensuse.org/package/view_file/server:irc/weechat/weechat.spec?expand=1
[[v4.0.0_packaging_cpack]]
==== cpack
The configuration for cpack has been removed. +
It was used to build binary package of WeeChat, which has never been released
in this format.
-1
View File
@@ -23,7 +23,6 @@ if(ENABLE_MAN OR ENABLE_DOC)
if(ASCIIDOCTOR_FOUND)
# common asciidoctor arguments
set(ASCIIDOCTOR_ARGS
--failure-level=WARNING
-a experimental
-a reproducible
-a "prewrap!"
+5
View File
@@ -258,6 +258,11 @@ Liste von häufig verwendeten Optionen:
| ENABLE_DOC | `ON`, `OFF` | OFF
| erstellt die HTML Dokumentation.
// TRANSLATION MISSING
| ENABLE_DOC_INCOMPLETE | `ON`, `OFF` | OFF
| Force build of documentation even if some plugins are not compiled
(not recommended: docs will be incomplete).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF
| kompiliert <<spell_checking,Spell Erweiterung>> mittels Enchant.
+4
View File
@@ -250,6 +250,10 @@ List of commonly used options:
| ENABLE_DOC | `ON`, `OFF` | OFF
| Build HTML documentation.
| ENABLE_DOC_INCOMPLETE | `ON`, `OFF` | OFF
| Force build of documentation even if some plugins are not compiled
(not recommended: docs will be incomplete).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF
| Compile <<spell_checking,Spell plugin>> with Enchant.
+4
View File
@@ -250,6 +250,10 @@ Liste des options couramment utilisées :
| ENABLE_DOC | `ON`, `OFF` | OFF
| Construire la documentation HTML.
| ENABLE_DOC_INCOMPLETE | `ON`, `OFF` | OFF
| Forcer la construction de la documentation même si des extensions ne sont pas
compilées (déconseillé : les documentations seront incomplètes).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF
| Compiler <<spell_checking,l'extension Spell>> avec Enchant.
+5
View File
@@ -300,6 +300,11 @@ List of commonly used options:
| ENABLE_DOC | `ON`, `OFF` | OFF
| Build HTML documentation.
// TRANSLATION MISSING
| ENABLE_DOC_INCOMPLETE | `ON`, `OFF` | OFF
| Force build of documentation even if some plugins are not compiled
(not recommended: docs will be incomplete).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF
| Compile <<spell_checking,Spell plugin>> with Enchant.
+5
View File
@@ -275,6 +275,11 @@ CMake に対するオプションを指定するには、以下の書式を使
| ENABLE_DOC | `ON`, `OFF` | OFF
| HTML 文書のコンパイル。
// TRANSLATION MISSING
| ENABLE_DOC_INCOMPLETE | `ON`, `OFF` | OFF
| Force build of documentation even if some plugins are not compiled
(not recommended: docs will be incomplete).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF
| Enchant と含めた <<spell_checking,Spell プラグイン>>のコンパイル。
+5
View File
@@ -259,6 +259,11 @@ Lista popularnych opcji:
| ENABLE_DOC | `ON`, `OFF` | OFF
| Generowanie dokumentacji HTML.
// TRANSLATION MISSING
| ENABLE_DOC_INCOMPLETE | `ON`, `OFF` | OFF
| Force build of documentation even if some plugins are not compiled
(not recommended: docs will be incomplete).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF
| Kompilacja <<spell_checking,wtyczki spell>> z Enchant.
+5
View File
@@ -243,6 +243,11 @@ $ make install
| ENABLE_DOC | `ON`, `OFF` | OFF
| Изграђује HTML документацију.
// TRANSLATION MISSING
| ENABLE_DOC_INCOMPLETE | `ON`, `OFF` | OFF
| Force build of documentation even if some plugins are not compiled
(not recommended: docs will be incomplete).
| ENABLE_ENCHANT | `ON`, `OFF` | OFF
| Компајлира <<spell_checking,Spell додатак>> са Enchant.
+4 -3
View File
@@ -1618,9 +1618,10 @@ doc_generate (const char *path)
if (!weechat_plugins)
{
string_fprintf (stderr,
"doc generator: ERROR: plugins are not loaded\n");
goto end;
string_fprintf (
stderr,
"doc generator: WARNING: no plugins loaded, docs will be "
"incomplete!\n");
}
if (!dir_mkdir_parents (path, 0755))
+44
View File
@@ -48,10 +48,14 @@ include(CheckLibraryExists)
if(ENABLE_ALIAS)
add_subdirectory(alias)
else()
add_custom_target(alias COMMAND true)
endif()
if(ENABLE_BUFLIST)
add_subdirectory(buflist)
else()
add_custom_target(buflist COMMAND true)
endif()
if(ENABLE_CHARSET)
@@ -60,34 +64,50 @@ if(ENABLE_CHARSET)
else()
message(SEND_ERROR "Iconv not found")
endif()
else()
add_custom_target(charset COMMAND true)
endif()
if(ENABLE_EXEC)
add_subdirectory(exec)
else()
add_custom_target(exec COMMAND true)
endif()
if(ENABLE_FIFO)
add_subdirectory(fifo)
else()
add_custom_target(fifo COMMAND true)
endif()
if(ENABLE_FSET)
add_subdirectory(fset)
else()
add_custom_target(fset COMMAND true)
endif()
if(ENABLE_IRC)
add_subdirectory(irc)
else()
add_custom_target(irc COMMAND true)
endif()
if(ENABLE_LOGGER)
add_subdirectory(logger)
else()
add_custom_target(logger COMMAND true)
endif()
if(ENABLE_RELAY)
add_subdirectory(relay)
else()
add_custom_target(relay COMMAND true)
endif()
if(ENABLE_SCRIPT)
add_subdirectory(script)
else()
add_custom_target(script COMMAND true)
endif()
if(ENABLE_SCRIPTS AND ENABLE_PERL)
@@ -97,6 +117,8 @@ if(ENABLE_SCRIPTS AND ENABLE_PERL)
else()
message(SEND_ERROR "Perl not found")
endif()
else()
add_custom_target(perl COMMAND true)
endif()
if(ENABLE_SCRIPTS AND ENABLE_PYTHON)
@@ -106,6 +128,8 @@ if(ENABLE_SCRIPTS AND ENABLE_PYTHON)
else()
message(SEND_ERROR "Python not found")
endif()
else()
add_custom_target(python COMMAND true)
endif()
if(ENABLE_SCRIPTS AND ENABLE_RUBY)
@@ -115,6 +139,8 @@ if(ENABLE_SCRIPTS AND ENABLE_RUBY)
else()
message(SEND_ERROR "Ruby not found")
endif()
else()
add_custom_target(ruby COMMAND true)
endif()
if(ENABLE_SCRIPTS AND ENABLE_LUA)
@@ -124,6 +150,8 @@ if(ENABLE_SCRIPTS AND ENABLE_LUA)
else()
message(SEND_ERROR "Lua not found")
endif()
else()
add_custom_target(lua COMMAND true)
endif()
if(ENABLE_SCRIPTS AND ENABLE_TCL)
@@ -133,6 +161,8 @@ if(ENABLE_SCRIPTS AND ENABLE_TCL)
else()
message(SEND_ERROR "Tcl not found")
endif()
else()
add_custom_target(tcl COMMAND true)
endif()
if(ENABLE_SCRIPTS AND ENABLE_GUILE)
@@ -142,6 +172,8 @@ if(ENABLE_SCRIPTS AND ENABLE_GUILE)
else()
message(SEND_ERROR "Guile not found")
endif()
else()
add_custom_target(guile COMMAND true)
endif()
if(ENABLE_SCRIPTS AND ENABLE_JAVASCRIPT)
@@ -151,6 +183,8 @@ if(ENABLE_SCRIPTS AND ENABLE_JAVASCRIPT)
else()
message(SEND_ERROR "V8 (javascript) not found")
endif()
else()
add_custom_target(javascript COMMAND true)
endif()
if(ENABLE_SCRIPTS AND ENABLE_PHP)
@@ -160,6 +194,8 @@ if(ENABLE_SCRIPTS AND ENABLE_PHP)
else()
message(SEND_ERROR "Php not found")
endif()
else()
add_custom_target(php COMMAND true)
endif()
if(ENABLE_SPELL)
@@ -178,18 +214,26 @@ if(ENABLE_SPELL)
message(SEND_ERROR "Aspell not found")
endif()
endif()
else()
add_custom_target(spell COMMAND true)
endif()
if(ENABLE_TRIGGER)
add_subdirectory(trigger)
else()
add_custom_target(trigger COMMAND true)
endif()
if(ENABLE_TYPING)
add_subdirectory(typing)
else()
add_custom_target(typing COMMAND true)
endif()
if(ENABLE_XFER)
add_subdirectory(xfer)
else()
add_custom_target(xfer COMMAND true)
endif()
install(FILES weechat-plugin.h DESTINATION ${INCLUDEDIR})
@@ -60,15 +60,3 @@ index 428f11ce9..e88f167b8 100644
libxml2-dev,
libcurl4-gnutls-dev,
libgcrypt20-dev,
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index e3e5f7a85..af39249e4 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -23,7 +23,6 @@ if(ENABLE_MAN OR ENABLE_DOC)
if(ASCIIDOCTOR_FOUND)
# common asciidoctor arguments
set(ASCIIDOCTOR_ARGS
- --failure-level=WARNING
-a experimental
-a reproducible
-a "prewrap!"