diff options
Diffstat (limited to 'doc/it')
-rw-r--r-- | doc/it/CMakeLists.txt | 154 | ||||
-rw-r--r-- | doc/it/Makefile.am | 29 | ||||
-rw-r--r-- | doc/it/weechat_user.it.txt | 8 |
3 files changed, 109 insertions, 82 deletions
diff --git a/doc/it/CMakeLists.txt b/doc/it/CMakeLists.txt index 135323cb3..76aaf5b4e 100644 --- a/doc/it/CMakeLists.txt +++ b/doc/it/CMakeLists.txt @@ -17,83 +17,89 @@ # along with WeeChat. If not, see <http://www.gnu.org/licenses/>. # -# man page -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 - COMMAND ${A2X_EXECUTABLE} ARGS -a lang=it -a revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.it.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.it.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.it.txt - COMMENT "Building weechat-curses.1 (it)" -) -ADD_CUSTOM_TARGET(doc-man-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/it/man1) +IF (ENABLE_MAN) + # man page + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 + COMMAND ${A2X_EXECUTABLE} ARGS -a lang=it -a revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.it.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.it.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.it.txt + COMMENT "Building weechat-curses.1 (it)" + ) + ADD_CUSTOM_TARGET(doc-man-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/it/man1) +ENDIF (ENABLE_MAN) -# user's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.it.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a toclevels=4 -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -f ${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.conf -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.it.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.it.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.it.txt - ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt - COMMENT "Building weechat_user.it.html" -) -ADD_CUSTOM_TARGET(doc-user-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.it.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) +IF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) -# plugin API reference -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.it.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a toclevels=4 -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.it.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.it.txt - ${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt - COMMENT "Building weechat_plugin_api.it.html" -) -ADD_CUSTOM_TARGET(doc-plugin-api-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.it.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # user's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.it.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a toclevels=4 -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -f ${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.conf -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.it.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.it.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.it.txt + ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt + COMMENT "Building weechat_user.it.html" + ) + ADD_CUSTOM_TARGET(doc-user-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.it.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# scripting guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.it.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.it.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.it.txt - COMMENT "Building weechat_scripting.it.html" -) -ADD_CUSTOM_TARGET(doc-scripting-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.it.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # plugin API reference + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.it.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a toclevels=4 -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.it.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.it.txt + ${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt + COMMENT "Building weechat_plugin_api.it.html" + ) + ADD_CUSTOM_TARGET(doc-plugin-api-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.it.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# FAQ -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.it.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -f ${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.conf -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.it.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.it.txt - COMMENT "Building weechat_faq.it.html" -) -ADD_CUSTOM_TARGET(doc-faq-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.it.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # scripting guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.it.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a toclevels=3 -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.it.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.it.txt + COMMENT "Building weechat_scripting.it.html" + ) + ADD_CUSTOM_TARGET(doc-scripting-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.it.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# quickstart -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.it.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.it.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.it.txt - COMMENT "Building weechat_quickstart.it.html" -) -ADD_CUSTOM_TARGET(doc-quickstart-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.it.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # FAQ + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.it.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -f ${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.conf -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.it.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.it.txt + COMMENT "Building weechat_faq.it.html" + ) + ADD_CUSTOM_TARGET(doc-faq-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.it.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# tester's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.it.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.it.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.it.txt - COMMENT "Building weechat_tester.it.html" -) -ADD_CUSTOM_TARGET(doc-tester-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.it.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # quickstart + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.it.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.it.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.it.txt + COMMENT "Building weechat_quickstart.it.html" + ) + ADD_CUSTOM_TARGET(doc-quickstart-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.it.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + + # tester's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.it.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=it -a toc -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.it.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.it.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.it.txt + COMMENT "Building weechat_tester.it.html" + ) + ADD_CUSTOM_TARGET(doc-tester-it ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.it.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.it.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + +ENDIF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) diff --git a/doc/it/Makefile.am b/doc/it/Makefile.am index ed97f951e..0c1bfb660 100644 --- a/doc/it/Makefile.am +++ b/doc/it/Makefile.am @@ -31,13 +31,22 @@ EXTRA_DIST = CMakeLists.txt \ $(wildcard autogen/user/*.txt) \ $(wildcard autogen/plugin_api/*.txt) -all-local: weechat-curses.1 \ - weechat_user.it.html \ +if MAN + man_targets = weechat-curses.1 + man_install = install-man + man_uninstall = uninstall-man +endif +if DOC + doc_targets = weechat_user.it.html \ weechat_plugin_api.it.html \ weechat_scripting.it.html \ weechat_faq.it.html \ weechat_quickstart.it.html \ weechat_tester.it.html + doc_install = install-doc + doc_uninstall = uninstall-doc +endif +all-local: $(man_targets) $(doc_targets) # man page weechat-curses.1: weechat-curses.1.it.txt cmdline_options.it.txt @@ -67,19 +76,27 @@ weechat_quickstart.it.html: weechat_quickstart.it.txt weechat_tester.it.html: weechat_tester.it.txt $(ASCIIDOC) -a lang=it -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -a stylesheet=$(abs_top_srcdir)/doc/asciidoc.css -n -o weechat_tester.it.html $(abs_top_srcdir)/doc/it/weechat_tester.it.txt -# install docs +# install man/docs -install-data-hook: +install-data-hook: $(man_install) $(doc_install) + +install-man: $(mkinstalldirs) $(DESTDIR)$(mandir)/it/man1/ $(INSTALL_DATA) *.1 $(DESTDIR)$(mandir)/it/man1/ + +install-doc: $(mkinstalldirs) $(DESTDIR)$(docdir)/ $(INSTALL_DATA) *.html $(DESTDIR)$(docdir)/ -# uninstall docs +# uninstall man/docs -uninstall-hook: +uninstall-hook: $(man_uninstall) $(doc_uninstall) + +uninstall-man: $(RM) $(DESTDIR)$(mandir)/it/man1/weechat-curses.1 -rmdir $(DESTDIR)$(mandir)/it/man1 + +uninstall-doc: $(RM) $(DESTDIR)$(docdir)/*.it.html -rmdir $(DESTDIR)$(docdir) diff --git a/doc/it/weechat_user.it.txt b/doc/it/weechat_user.it.txt index a1e638613..f908d5a6a 100644 --- a/doc/it/weechat_user.it.txt +++ b/doc/it/weechat_user.it.txt @@ -109,8 +109,9 @@ compilare WeeChat. | liblua5.1-0-dev | | | plugin lua | tcl-dev | ≥ 8.5 | | plugin tcl | guile-2.0-dev | ≥ 2.0 | | plugin guile (scheme) -| asciidoc | ≥ 8.5.0 | | compilazione della documentazione (file HTML) -| source-highlight | | | evidenziazione della sintassi per i sorgenti nella documentazione HTML +// TRANSLATION MISSING +| asciidoc | ≥ 8.5.0 | | build man page and documentation +| source-highlight | | | evidenziazione della sintassi per i sorgenti nella documentazione // TRANSLATION MISSING | xsltproc, docbook-xml, docbook-xsl | | | build man page @@ -186,6 +187,9 @@ List of commonly used options: | ENABLE_DEMO | `ON`, `OFF` | OFF | Compile Demo plugin. +| ENABLE_MAN | `ON`, `OFF` | ON | + Compile man page. + | ENABLE_DOC | `ON`, `OFF` | OFF | Compile documentation (it takes a long time, recommended only if you build a binary package embedding documentation or if you can't browse documentation |