diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-07-31 13:28:59 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-07-31 13:28:59 +0200 |
commit | 261efe6299710424812faadf03905198763e3014 (patch) | |
tree | 5b7780c8a8acb366abcb17f3bd405a79b187dd32 /doc | |
parent | 9951902c7b39a1e783bc1b0f903d616de5b848d8 (diff) | |
download | weechat-261efe6299710424812faadf03905198763e3014.zip |
core: add cmake option ENABLE_MAN to compile man page (on by default)
For configure, the option is "--disable-man".
Diffstat (limited to 'doc')
-rw-r--r-- | doc/CMakeLists.txt | 8 | ||||
-rw-r--r-- | doc/de/CMakeLists.txt | 132 | ||||
-rw-r--r-- | doc/de/Makefile.am | 29 | ||||
-rw-r--r-- | doc/de/weechat_user.de.txt | 9 | ||||
-rw-r--r-- | doc/en/CMakeLists.txt | 194 | ||||
-rw-r--r-- | doc/en/Makefile.am | 29 | ||||
-rw-r--r-- | doc/en/weechat_user.en.txt | 7 | ||||
-rw-r--r-- | doc/es/CMakeLists.txt | 24 | ||||
-rw-r--r-- | doc/es/Makefile.am | 32 | ||||
-rw-r--r-- | doc/fr/CMakeLists.txt | 154 | ||||
-rw-r--r-- | doc/fr/Makefile.am | 29 | ||||
-rw-r--r-- | doc/fr/weechat_user.fr.txt | 7 | ||||
-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 | ||||
-rw-r--r-- | doc/ja/CMakeLists.txt | 132 | ||||
-rw-r--r-- | doc/ja/Makefile.am | 29 | ||||
-rw-r--r-- | doc/ja/weechat_user.ja.txt | 9 | ||||
-rw-r--r-- | doc/pl/CMakeLists.txt | 84 | ||||
-rw-r--r-- | doc/pl/Makefile.am | 32 | ||||
-rw-r--r-- | doc/ru/CMakeLists.txt | 24 | ||||
-rw-r--r-- | doc/ru/Makefile.am | 32 |
22 files changed, 700 insertions, 487 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 1c3d31c78..09aa57c49 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -18,11 +18,11 @@ # along with WeeChat. If not, see <http://www.gnu.org/licenses/>. # -IF(ENABLE_DOC) +IF(ENABLE_MAN OR ENABLE_DOC) FIND_PACKAGE(Sourcehighlight) FIND_PACKAGE(Asciidoc) - IF(ASCIIDOC_FOUND AND SOURCEHIGHLIGHT_FOUND) + IF(ASCIIDOC_FOUND) ADD_SUBDIRECTORY( en ) ADD_SUBDIRECTORY( fr ) ADD_SUBDIRECTORY( it ) @@ -31,6 +31,6 @@ IF(ENABLE_DOC) ADD_SUBDIRECTORY( es ) ADD_SUBDIRECTORY( ru ) ADD_SUBDIRECTORY( ja ) - ENDIF(ASCIIDOC_FOUND AND SOURCEHIGHLIGHT_FOUND) + ENDIF(ASCIIDOC_FOUND) -ENDIF(ENABLE_DOC) +ENDIF(ENABLE_MAN OR ENABLE_DOC) diff --git a/doc/de/CMakeLists.txt b/doc/de/CMakeLists.txt index 59a50b50c..8d6c8de63 100644 --- a/doc/de/CMakeLists.txt +++ b/doc/de/CMakeLists.txt @@ -17,71 +17,77 @@ # 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=de -a revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.de.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.de.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.de.txt - COMMENT "Building weechat-curses.1 (de)" -) -ADD_CUSTOM_TARGET(doc-man-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/de/man1) +IF (ENABLE_MAN) + # man page + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 + COMMAND ${A2X_EXECUTABLE} ARGS -a lang=de -a revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.de.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.de.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.de.txt + COMMENT "Building weechat-curses.1 (de)" + ) + ADD_CUSTOM_TARGET(doc-man-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/de/man1) +ENDIF (ENABLE_MAN) -# user's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.de.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.de.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.de.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.de.txt - ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt - COMMENT "Building weechat_user.de.html" -) -ADD_CUSTOM_TARGET(doc-user-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.de.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) +IF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) -# scripting guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.de.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.de.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.de.txt - COMMENT "Building weechat_scripting.de.html" -) -ADD_CUSTOM_TARGET(doc-scripting-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.de.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # user's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.de.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.de.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.de.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.de.txt + ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt + COMMENT "Building weechat_user.de.html" + ) + ADD_CUSTOM_TARGET(doc-user-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.de.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# FAQ -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.de.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.de.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.de.txt - COMMENT "Building weechat_faq.de.html" -) -ADD_CUSTOM_TARGET(doc-faq-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.de.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # scripting guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.de.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.de.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.de.txt + COMMENT "Building weechat_scripting.de.html" + ) + ADD_CUSTOM_TARGET(doc-scripting-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.de.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# quickstart -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.de.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.de.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.de.txt - COMMENT "Building weechat_quickstart.de.html" -) -ADD_CUSTOM_TARGET(doc-quickstart-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.de.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # FAQ + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.de.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.de.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.de.txt + COMMENT "Building weechat_faq.de.html" + ) + ADD_CUSTOM_TARGET(doc-faq-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.de.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# tester's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.de.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.de.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.de.txt - COMMENT "Building weechat_tester.de.html" -) -ADD_CUSTOM_TARGET(doc-tester-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.de.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # quickstart + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.de.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.de.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.de.txt + COMMENT "Building weechat_quickstart.de.html" + ) + ADD_CUSTOM_TARGET(doc-quickstart-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.de.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + + # tester's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.de.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=de -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.de.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.de.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.de.txt + COMMENT "Building weechat_tester.de.html" + ) + ADD_CUSTOM_TARGET(doc-tester-de ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.de.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.de.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + +ENDIF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) diff --git a/doc/de/Makefile.am b/doc/de/Makefile.am index 41a27730c..2edef5dc9 100644 --- a/doc/de/Makefile.am +++ b/doc/de/Makefile.am @@ -30,12 +30,21 @@ EXTRA_DIST = CMakeLists.txt \ weechat_tester.de.txt \ $(wildcard autogen/user/*.txt) -all-local: weechat-curses.1 \ - weechat_user.de.html \ +if MAN + man_targets = weechat-curses.1 + man_install = install-man + man_uninstall = uninstall-man +endif +if DOC + doc_targets = weechat_user.de.html \ weechat_scripting.de.html \ weechat_faq.de.html \ weechat_quickstart.de.html \ weechat_tester.de.html + doc_install = install-doc + doc_uninstall = uninstall-doc +endif +all-local: $(man_targets) $(doc_targets) # man page weechat-curses.1: weechat-curses.1.de.txt cmdline_options.de.txt @@ -61,19 +70,27 @@ weechat_quickstart.de.html: weechat_quickstart.de.txt weechat_tester.de.html: weechat_tester.de.txt $(ASCIIDOC) -a lang=de -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -a stylesheet=$(abs_top_srcdir)/doc/asciidoc.css -n -o weechat_tester.de.html $(abs_top_srcdir)/doc/de/weechat_tester.de.txt -# install docs +# install man/docs -install-data-hook: +install-data-hook: $(man_install) $(doc_install) + +install-man: $(mkinstalldirs) $(DESTDIR)$(mandir)/de/man1/ $(INSTALL_DATA) *.1 $(DESTDIR)$(mandir)/de/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)/de/man1/weechat-curses.1 -rmdir $(DESTDIR)$(mandir)/de/man1 + +uninstall-doc: $(RM) $(DESTDIR)$(docdir)/*.de.html -rmdir $(DESTDIR)$(docdir) diff --git a/doc/de/weechat_user.de.txt b/doc/de/weechat_user.de.txt index cb09c9fdc..53e504e36 100644 --- a/doc/de/weechat_user.de.txt +++ b/doc/de/weechat_user.de.txt @@ -102,8 +102,9 @@ welche Pakete optional genutzt werden können. | liblua5.1-0-dev | | | lua Erweiterung | tcl-dev | ≥ 8.5 | | tcl Erweiterung | guile-2.0-dev | ≥ 2.0 | | guile (scheme) Erweiterung -| asciidoc | ≥ 8.5.0 | | erstellt Dokumentation (HTML Dateien) -| source-highlight | | | Syntax Highlight für Quelltext in HTML Dokumentation +// TRANSLATION MISSING +| asciidoc | ≥ 8.5.0 | | build man page and documentation +| source-highlight | | | Syntax Highlight für Quelltext in Dokumentation | xsltproc, docbook-xml, docbook-xsl | | | erstellt man page |======================================== @@ -177,6 +178,10 @@ Liste von häufig verwendeten Optionen: kompiliert Demo-Erweiterung. // TRANSLATION MISSING +| ENABLE_MAN | `ON`, `OFF` | ON | + Compile man page. + +// TRANSLATION MISSING | ENABLE_DOC | `ON`, `OFF` | OFF | kompiliert Dokumentation (it takes a long time, recommended only if you build a binary package embedding documentation or if you can't browse documentation diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt index 109ed9727..ae9a03d15 100644 --- a/doc/en/CMakeLists.txt +++ b/doc/en/CMakeLists.txt @@ -17,105 +17,111 @@ # 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 revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.en.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.en.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.en.txt - COMMENT "Building weechat-curses.1 (en)" -) -ADD_CUSTOM_TARGET(doc-man-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/man1) +IF(ENABLE_MAN) + # man page + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 + COMMAND ${A2X_EXECUTABLE} ARGS -a revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.en.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.en.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.en.txt + COMMENT "Building weechat-curses.1 (en)" + ) + ADD_CUSTOM_TARGET(doc-man-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/man1) +ENDIF(ENABLE_MAN) -# user's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.en.txt - ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt - COMMENT "Building weechat_user.en.html" -) -ADD_CUSTOM_TARGET(doc-user-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.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.en.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt - ${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt - COMMENT "Building weechat_plugin_api.en.html" -) -ADD_CUSTOM_TARGET(doc-plugin-api-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # user's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.en.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.en.txt + ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt + COMMENT "Building weechat_user.en.html" + ) + ADD_CUSTOM_TARGET(doc-user-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# scripting guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt - COMMENT "Building weechat_scripting.en.html" -) -ADD_CUSTOM_TARGET(doc-scripting-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # plugin API reference + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.en.txt + ${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt + COMMENT "Building weechat_plugin_api.en.html" + ) + ADD_CUSTOM_TARGET(doc-plugin-api-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# FAQ -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.en.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.en.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.en.txt - COMMENT "Building weechat_faq.en.html" -) -ADD_CUSTOM_TARGET(doc-faq-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.en.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # scripting guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.en.txt + COMMENT "Building weechat_scripting.en.html" + ) + ADD_CUSTOM_TARGET(doc-scripting-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# quickstart -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.en.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.en.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.en.txt - COMMENT "Building weechat_quickstart.en.html" -) -ADD_CUSTOM_TARGET(doc-quickstart-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.en.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # FAQ + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.en.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.en.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.en.txt + COMMENT "Building weechat_faq.en.html" + ) + ADD_CUSTOM_TARGET(doc-faq-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.en.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# tester's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.en.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.en.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.en.txt - COMMENT "Building weechat_tester.en.html" -) -ADD_CUSTOM_TARGET(doc-tester-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.en.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # quickstart + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.en.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.en.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.en.txt + COMMENT "Building weechat_quickstart.en.html" + ) + ADD_CUSTOM_TARGET(doc-quickstart-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.en.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# developer's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_dev.en.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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_dev.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_dev.en.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_dev.en.txt - COMMENT "Building weechat_dev.en.html" -) -ADD_CUSTOM_TARGET(doc-dev-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_dev.en.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_dev.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # tester's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.en.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.en.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.en.txt + COMMENT "Building weechat_tester.en.html" + ) + ADD_CUSTOM_TARGET(doc-tester-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.en.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# relay protocol -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_relay_protocol.en.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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_relay_protocol.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_relay_protocol.en.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_relay_protocol.en.txt - COMMENT "Building weechat_relay_protocol.en.html" -) -ADD_CUSTOM_TARGET(doc-relay-protocol-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_relay_protocol.en.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_relay_protocol.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # developer's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_dev.en.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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_dev.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_dev.en.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_dev.en.txt + COMMENT "Building weechat_dev.en.html" + ) + ADD_CUSTOM_TARGET(doc-dev-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_dev.en.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_dev.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + + # relay protocol + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_relay_protocol.en.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -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_relay_protocol.en.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_relay_protocol.en.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_relay_protocol.en.txt + COMMENT "Building weechat_relay_protocol.en.html" + ) + ADD_CUSTOM_TARGET(doc-relay-protocol-en ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_relay_protocol.en.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_relay_protocol.en.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + +ENDIF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am index 75568f80d..836b6c2d4 100644 --- a/doc/en/Makefile.am +++ b/doc/en/Makefile.am @@ -34,8 +34,13 @@ EXTRA_DIST = CMakeLists.txt \ $(wildcard autogen/user/*.txt) \ $(wildcard autogen/plugin_api/*.txt) -all-local: weechat-curses.1 \ - weechat_user.en.html \ +if MAN + man_targets = weechat-curses.1 + man_install = install-man + man_uninstall = uninstall-man +endif +if DOC + doc_targets = weechat_user.en.html \ weechat_plugin_api.en.html \ weechat_scripting.en.html \ weechat_faq.en.html \ @@ -43,6 +48,10 @@ all-local: weechat-curses.1 \ weechat_tester.en.html \ weechat_dev.en.html \ weechat_relay_protocol.en.html + doc_install = install-doc + doc_uninstall = uninstall-doc +endif +all-local: $(man_targets) $(doc_targets) # man page weechat-curses.1: weechat-curses.1.en.txt cmdline_options.en.txt @@ -80,19 +89,27 @@ weechat_dev.en.html: weechat_dev.en.txt weechat_relay_protocol.en.html: weechat_relay_protocol.en.txt $(ASCIIDOC) -a toc -a toclevels=4 -a date=`date "+%F"` -a revision="$(VERSION)" -a stylesheet=$(abs_top_srcdir)/doc/asciidoc.css -f $(abs_top_srcdir)/doc/asciidoc.conf -n -o weechat_relay_protocol.en.html $(abs_top_srcdir)/doc/en/weechat_relay_protocol.en.txt -# install docs +# install man/docs -install-data-hook: +install-data-hook: $(man_install) $(doc_install) + +install-man: $(mkinstalldirs) $(DESTDIR)$(mandir)/man1/ $(INSTALL_DATA) *.1 $(DESTDIR)$(mandir)/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)/man1/weechat-curses.1 -rmdir $(DESTDIR)$(mandir)/man1 + +uninstall-doc: $(RM) $(DESTDIR)$(docdir)/*.en.html -rmdir $(DESTDIR)$(docdir) diff --git a/doc/en/weechat_user.en.txt b/doc/en/weechat_user.en.txt index 366cf8dc3..572d09ebf 100644 --- a/doc/en/weechat_user.en.txt +++ b/doc/en/weechat_user.en.txt @@ -102,8 +102,8 @@ compile WeeChat. | liblua5.1-0-dev | | | lua plugin | tcl-dev | ≥ 8.5 | | tcl plugin | guile-2.0-dev | ≥ 2.0 | | guile (scheme) plugin -| asciidoc | ≥ 8.5.0 | | build documentation (HTML files) -| source-highlight | | | syntax highlight for sources in HTML documentation +| asciidoc | ≥ 8.5.0 | | build man page and documentation +| source-highlight | | | syntax highlight for sources in documentation | xsltproc, docbook-xml, docbook-xsl | | | build man page |======================================== @@ -175,6 +175,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 diff --git a/doc/es/CMakeLists.txt b/doc/es/CMakeLists.txt index 03620f638..5b4e227b9 100644 --- a/doc/es/CMakeLists.txt +++ b/doc/es/CMakeLists.txt @@ -17,13 +17,17 @@ # along with WeeChat. If not, see <http://www.gnu.org/licenses/>. # -# quickstart -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.es.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=es -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.es.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.es.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.es.txt - COMMENT "Building weechat_quickstart.es.html" -) -ADD_CUSTOM_TARGET(doc-quickstart-es ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.es.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.es.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) +IF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) + + # quickstart + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.es.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=es -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.es.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.es.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.es.txt + COMMENT "Building weechat_quickstart.es.html" + ) + ADD_CUSTOM_TARGET(doc-quickstart-es ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.es.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.es.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + +ENDIF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) diff --git a/doc/es/Makefile.am b/doc/es/Makefile.am index abf7f87c2..03132317e 100644 --- a/doc/es/Makefile.am +++ b/doc/es/Makefile.am @@ -22,21 +22,43 @@ docdir = $(datadir)/doc/$(PACKAGE) EXTRA_DIST = CMakeLists.txt \ weechat_quickstart.es.txt -all-local: weechat_quickstart.es.html +if MAN + man_targets = + man_install = + man_uninstall = +endif +if DOC + doc_targets = weechat_quickstart.es.html + doc_install = install-doc + doc_uninstall = uninstall-doc +endif +all-local: $(man_targets) $(doc_targets) # quickstart weechat_quickstart.es.html: weechat_quickstart.es.txt $(ASCIIDOC) -a lang=es -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -a stylesheet=$(abs_top_srcdir)/doc/asciidoc.css -n -o weechat_quickstart.es.html $(abs_top_srcdir)/doc/es/weechat_quickstart.es.txt -# install docs +# install man/docs -install-data-hook: +install-data-hook: $(man_install) $(doc_install) + +install-man: + $(mkinstalldirs) $(DESTDIR)$(mandir)/es/man1/ + $(INSTALL_DATA) *.1 $(DESTDIR)$(mandir)/es/man1/ + +install-doc: $(mkinstalldirs) $(DESTDIR)$(docdir)/ $(INSTALL_DATA) *.html $(DESTDIR)$(docdir)/ -# uninstall docs +# uninstall man/docs + +uninstall-hook: $(man_uninstall) $(doc_uninstall) + +uninstall-man: + $(RM) $(DESTDIR)$(mandir)/es/man1/weechat-curses.1 + -rmdir $(DESTDIR)$(mandir)/es/man1 -uninstall-hook: +uninstall-doc: $(RM) $(DESTDIR)$(docdir)/*.es.html -rmdir $(DESTDIR)$(docdir) diff --git a/doc/fr/CMakeLists.txt b/doc/fr/CMakeLists.txt index 1d7d2f240..06f0ef151 100644 --- a/doc/fr/CMakeLists.txt +++ b/doc/fr/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=fr -a revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.fr.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.fr.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.fr.txt - COMMENT "Building weechat-curses.1 (fr)" -) -ADD_CUSTOM_TARGET(doc-man-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/fr/man1) +IF (ENABLE_MAN) + # man page + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 + COMMAND ${A2X_EXECUTABLE} ARGS -a lang=fr -a revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.fr.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.fr.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.fr.txt + COMMENT "Building weechat-curses.1 (fr)" + ) + ADD_CUSTOM_TARGET(doc-man-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/fr/man1) +ENDIF (ENABLE_MAN) -# user's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.fr.txt - ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt - COMMENT "Building weechat_user.fr.html" -) -ADD_CUSTOM_TARGET(doc-user-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.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.fr.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt - ${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt - COMMENT "Building weechat_plugin_api.fr.html" -) -ADD_CUSTOM_TARGET(doc-plugin-api-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # user's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.fr.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.fr.txt + ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt + COMMENT "Building weechat_user.fr.html" + ) + ADD_CUSTOM_TARGET(doc-user-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# scripting guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt - COMMENT "Building weechat_scripting.fr.html" -) -ADD_CUSTOM_TARGET(doc-scripting-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # plugin API reference + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_plugin_api.fr.txt + ${CMAKE_CURRENT_SOURCE_DIR}/autogen/plugin_api/*.txt + COMMENT "Building weechat_plugin_api.fr.html" + ) + ADD_CUSTOM_TARGET(doc-plugin-api-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# FAQ -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt - COMMENT "Building weechat_faq.fr.html" -) -ADD_CUSTOM_TARGET(doc-faq-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # scripting guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.fr.txt + COMMENT "Building weechat_scripting.fr.html" + ) + ADD_CUSTOM_TARGET(doc-scripting-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# quickstart -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt - COMMENT "Building weechat_quickstart.fr.html" -) -ADD_CUSTOM_TARGET(doc-quickstart-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # FAQ + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.fr.txt + COMMENT "Building weechat_faq.fr.html" + ) + ADD_CUSTOM_TARGET(doc-faq-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# tester's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt - COMMENT "Building weechat_tester.fr.html" -) -ADD_CUSTOM_TARGET(doc-tester-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # quickstart + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.fr.txt + COMMENT "Building weechat_quickstart.fr.html" + ) + ADD_CUSTOM_TARGET(doc-quickstart-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + + # tester's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=fr -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.fr.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.fr.txt + COMMENT "Building weechat_tester.fr.html" + ) + ADD_CUSTOM_TARGET(doc-tester-fr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.fr.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + +ENDIF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) diff --git a/doc/fr/Makefile.am b/doc/fr/Makefile.am index 3cafbe21e..3dfc3cd75 100644 --- a/doc/fr/Makefile.am +++ b/doc/fr/Makefile.am @@ -32,13 +32,22 @@ EXTRA_DIST = CMakeLists.txt \ $(wildcard autogen/user/*.txt) \ $(wildcard autogen/plugin_api/*.txt) -all-local: weechat-curses.1 \ - weechat_user.fr.html \ +if MAN + man_targets = weechat-curses.1 + man_install = install-man + man_uninstall = uninstall-man +endif +if DOC + doc_targets = weechat_user.fr.html \ weechat_plugin_api.fr.html \ weechat_scripting.fr.html \ weechat_faq.fr.html \ weechat_quickstart.fr.html \ weechat_tester.fr.html + doc_install = install-doc + doc_uninstall = uninstall-doc +endif +all-local: $(man_targets) $(doc_targets) # man page weechat-curses.1: weechat-curses.1.fr.txt cmdline_options.fr.txt @@ -68,19 +77,27 @@ weechat_quickstart.fr.html: weechat_quickstart.fr.txt weechat_tester.fr.html: weechat_tester.fr.txt $(ASCIIDOC) -a lang=fr -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -a stylesheet=$(abs_top_srcdir)/doc/asciidoc.css -n -o weechat_tester.fr.html $(abs_top_srcdir)/doc/fr/weechat_tester.fr.txt -# install docs +# install man/docs -install-data-hook: +install-data-hook: $(man_install) $(doc_install) + +install-man: $(mkinstalldirs) $(DESTDIR)$(mandir)/fr/man1/ $(INSTALL_DATA) *.1 $(DESTDIR)$(mandir)/fr/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)/fr/man1/weechat-curses.1 -rmdir $(DESTDIR)$(mandir)/fr/man1 + +uninstall-doc: $(RM) $(DESTDIR)$(docdir)/*.fr.html -rmdir $(DESTDIR)$(docdir) diff --git a/doc/fr/weechat_user.fr.txt b/doc/fr/weechat_user.fr.txt index 544530001..c77509a80 100644 --- a/doc/fr/weechat_user.fr.txt +++ b/doc/fr/weechat_user.fr.txt @@ -104,8 +104,8 @@ compiler WeeChat. | liblua5.1-0-dev | | | extension lua | tcl-dev | ≥ 8.5 | | extension tcl | guile-2.0-dev | ≥ 2.0 | | extension guile (scheme) -| asciidoc | ≥ 8.5.0 | | construction de la documentation (fichiers HTML) -| source-highlight | | | coloration des sources dans la documentation HTML +| asciidoc | ≥ 8.5.0 | | construction de la page man et de la documentation +| source-highlight | | | coloration des sources dans la documentation | xsltproc, docbook-xml, docbook-xsl | | | construction de la page de manuel |======================================== @@ -177,6 +177,9 @@ Liste des options couramment utilisées : | ENABLE_DEMO | `ON`, `OFF` | OFF | Compiler l'extension Demo. +| ENABLE_MAN | `ON`, `OFF` | ON | + Compiler la page man. + | ENABLE_DOC | `ON`, `OFF` | OFF | Compiler la documentation (cela prend beaucoup de temps, recommandé seulement si vous construisez un paquet binaire intégrant la documentation ou 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 diff --git a/doc/ja/CMakeLists.txt b/doc/ja/CMakeLists.txt index e1c6fe76d..6f821d792 100644 --- a/doc/ja/CMakeLists.txt +++ b/doc/ja/CMakeLists.txt @@ -17,71 +17,77 @@ # 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=ja -a revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.ja.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.ja.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.ja.txt - COMMENT "Building weechat-curses.1 (ja)" -) -ADD_CUSTOM_TARGET(doc-man-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/ja/man1) +IF (ENABLE_MAN) + # man page + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 + COMMAND ${A2X_EXECUTABLE} ARGS -a lang=ja -a revision='WeeChat ${VERSION}' -d manpage -f manpage -L -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.ja.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat-curses.1.ja.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.ja.txt + COMMENT "Building weechat-curses.1 (ja)" + ) + ADD_CUSTOM_TARGET(doc-man-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat-curses.1 DESTINATION ${MANDIR}/ja/man1) +ENDIF (ENABLE_MAN) -# user's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.ja.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=4 -a toc-title='目次' -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.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.ja.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.ja.txt - ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.ja.txt - ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt - COMMENT "Building weechat_user.ja.html" -) -ADD_CUSTOM_TARGET(doc-user-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.ja.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) +IF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) -# scripting guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.ja.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a toc-title='目次' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.ja.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.ja.txt - COMMENT "Building weechat_scripting.ja.html" -) -ADD_CUSTOM_TARGET(doc-scripting-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.ja.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # user's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.ja.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=4 -a toc-title='目次' -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.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.ja.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_user.ja.txt + ${CMAKE_CURRENT_SOURCE_DIR}/cmdline_options.ja.txt + ${CMAKE_CURRENT_SOURCE_DIR}/autogen/user/*.txt + COMMENT "Building weechat_user.ja.html" + ) + ADD_CUSTOM_TARGET(doc-user-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.ja.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_user.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# FAQ -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.ja.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='目次' -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.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.ja.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.ja.txt - COMMENT "Building weechat_faq.ja.html" -) -ADD_CUSTOM_TARGET(doc-faq-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.ja.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # scripting guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.ja.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a toc-title='目次' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.ja.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.ja.txt + COMMENT "Building weechat_scripting.ja.html" + ) + ADD_CUSTOM_TARGET(doc-scripting-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.ja.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# quickstart -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ja.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='目次' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.ja.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.ja.txt - COMMENT "Building weechat_quickstart.ja.html" -) -ADD_CUSTOM_TARGET(doc-quickstart-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ja.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # FAQ + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.ja.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='目次' -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.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.ja.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.ja.txt + COMMENT "Building weechat_faq.ja.html" + ) + ADD_CUSTOM_TARGET(doc-faq-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.ja.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# tester's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.ja.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='目次' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.ja.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.ja.txt - COMMENT "Building weechat_tester.ja.html" -) -ADD_CUSTOM_TARGET(doc-tester-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.ja.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # quickstart + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ja.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='目次' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.ja.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.ja.txt + COMMENT "Building weechat_quickstart.ja.html" + ) + ADD_CUSTOM_TARGET(doc-quickstart-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ja.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + + # tester's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.ja.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='目次' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.ja.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.ja.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.ja.txt + COMMENT "Building weechat_tester.ja.html" + ) + ADD_CUSTOM_TARGET(doc-tester-ja ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.ja.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.ja.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + +ENDIF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) diff --git a/doc/ja/Makefile.am b/doc/ja/Makefile.am index 096523a4c..67ba8bb53 100644 --- a/doc/ja/Makefile.am +++ b/doc/ja/Makefile.am @@ -30,12 +30,21 @@ EXTRA_DIST = CMakeLists.txt \ $(wildcard autogen/user/*.txt) \ $(wildcard autogen/plugin_api/*.txt) -all-local: weechat-curses.1 \ - weechat_user.ja.html \ +if MAN + man_targets = weechat-curses.1 + man_install = install-man + man_uninstall = uninstall-man +endif +if DOC + doc_targets = weechat_user.ja.html \ weechat_scripting.ja.html \ weechat_faq.ja.html \ weechat_quickstart.ja.html \ weechat_tester.ja.html + doc_install = install-doc + doc_uninstall = uninstall-doc +endif +all-local: $(man_targets) $(doc_targets) # man page weechat-curses.1: weechat-curses.1.ja.txt cmdline_options.ja.txt @@ -61,19 +70,27 @@ weechat_quickstart.ja.html: weechat_quickstart.ja.txt weechat_tester.ja.html: weechat_tester.ja.txt $(ASCIIDOC) -a toc -a toc-title='目次' -a date=`date "+%F"` -a revision="$(VERSION)" -a stylesheet=$(abs_top_srcdir)/doc/asciidoc.css -n -o weechat_tester.ja.html $(abs_top_srcdir)/doc/ja/weechat_tester.ja.txt -# install docs +# install man/docs -install-data-hook: +install-data-hook: $(man_install) $(doc_install) + +install-man: $(mkinstalldirs) $(DESTDIR)$(mandir)/ja/man1/ $(INSTALL_DATA) *.1 $(DESTDIR)$(mandir)/ja/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)/ja/man1/weechat-curses.1 -rmdir $(DESTDIR)$(mandir)/ja/man1 + +uninstall-doc: $(RM) $(DESTDIR)$(docdir)/*.ja.html -rmdir $(DESTDIR)$(docdir) diff --git a/doc/ja/weechat_user.ja.txt b/doc/ja/weechat_user.ja.txt index 81f2a8c89..9da7a2ae0 100644 --- a/doc/ja/weechat_user.ja.txt +++ b/doc/ja/weechat_user.ja.txt @@ -95,8 +95,10 @@ WeeChat は cmake または autotools を使ってコンパイルできます (c | liblua5.1-0-dev | | | lua プラグイン | tcl-dev | ≥ 8.5 | | tcl プラグイン | guile-2.0-dev | ≥ 2.0 | | guile (scheme) プラグイン -| asciidoc | ≥ 8.5.0 | | 文書の生成 (HTML ファイル) -| source-highlight | | | HTML 文書に含まれるソースコードのシンタックスハイライト +// TRANSLATION MISSING +| asciidoc | ≥ 8.5.0 | | build man page and documentation +// TRANSLATION MISSING +| source-highlight | | | syntax highlight for sources in documentation // TRANSLATION MISSING | xsltproc, docbook-xml, docbook-xsl | | | build man page @@ -171,6 +173,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 diff --git a/doc/pl/CMakeLists.txt b/doc/pl/CMakeLists.txt index 7b0c5c7a2..4c9f9a7e1 100644 --- a/doc/pl/CMakeLists.txt +++ b/doc/pl/CMakeLists.txt @@ -17,46 +17,50 @@ # along with WeeChat. If not, see <http://www.gnu.org/licenses/>. # -# scripting guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.pl.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a toc-title='Spis treści' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.pl.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.pl.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.pl.txt - COMMENT "Building weechat_scripting.pl.html" -) -ADD_CUSTOM_TARGET(doc-scripting-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.pl.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.pl.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) +IF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) -# FAQ -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.pl.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='Spis treści' -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.pl.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.pl.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.pl.txt - COMMENT "Building weechat_faq.pl.html" -) -ADD_CUSTOM_TARGET(doc-faq-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.pl.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.pl.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # scripting guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.pl.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toclevels=3 -a toc-title='Spis treści' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.pl.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.pl.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_scripting.pl.txt + COMMENT "Building weechat_scripting.pl.html" + ) + ADD_CUSTOM_TARGET(doc-scripting-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.pl.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.pl.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# quickstart -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.pl.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='Spis treści' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.pl.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.pl.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.pl.txt - COMMENT "Building weechat_quickstart.pl.html" -) -ADD_CUSTOM_TARGET(doc-quickstart-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.pl.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.pl.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # FAQ + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.pl.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='Spis treści' -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.pl.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.pl.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_faq.pl.txt + COMMENT "Building weechat_faq.pl.html" + ) + ADD_CUSTOM_TARGET(doc-faq-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.pl.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.pl.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) -# tester's guide -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.pl.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='Spis treści' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.pl.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.pl.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.pl.txt - COMMENT "Building weechat_tester.pl.html" -) -ADD_CUSTOM_TARGET(doc-tester-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.pl.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.pl.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + # quickstart + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.pl.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='Spis treści' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.pl.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.pl.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.pl.txt + COMMENT "Building weechat_quickstart.pl.html" + ) + ADD_CUSTOM_TARGET(doc-quickstart-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.pl.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.pl.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + + # tester's guide + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.pl.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a toc -a toc-title='Spis treści' -a date=`date "+%F"` -a revision="${VERSION}" -a stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/../asciidoc.css -n -o ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.pl.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.pl.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_tester.pl.txt + COMMENT "Building weechat_tester.pl.html" + ) + ADD_CUSTOM_TARGET(doc-tester-pl ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.pl.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_tester.pl.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + +ENDIF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) diff --git a/doc/pl/Makefile.am b/doc/pl/Makefile.am index 29be533b2..636a1b987 100644 --- a/doc/pl/Makefile.am +++ b/doc/pl/Makefile.am @@ -26,10 +26,20 @@ EXTRA_DIST = CMakeLists.txt \ weechat_quickstart.pl.txt \ weechat_tester.pl.txt -all-local: weechat_scripting.pl.html \ +if MAN + man_targets = + man_install = + man_uninstall = +endif +if DOC + doc_targets = weechat_scripting.pl.html \ weechat_faq.pl.html \ weechat_quickstart.pl.html \ weechat_tester.pl.html + doc_install = install-doc + doc_uninstall = uninstall-doc +endif +all-local: $(man_targets) $(doc_targets) # scripting guide weechat_scripting.pl.html: weechat_scripting.pl.txt @@ -47,15 +57,27 @@ weechat_quickstart.pl.html: weechat_quickstart.pl.txt weechat_tester.pl.html: weechat_tester.pl.txt $(ASCIIDOC) -a toc -a toc-title='Spis treści' -a date=`date "+%F"` -a revision="$(VERSION)" -a stylesheet=$(abs_top_srcdir)/doc/asciidoc.css -n -o weechat_tester.pl.html $(abs_top_srcdir)/doc/pl/weechat_tester.pl.txt -# install docs +# install man/docs -install-data-hook: +install-data-hook: $(man_install) $(doc_install) + +install-man: + $(mkinstalldirs) $(DESTDIR)$(mandir)/pl/man1/ + $(INSTALL_DATA) *.1 $(DESTDIR)$(mandir)/pl/man1/ + +install-doc: $(mkinstalldirs) $(DESTDIR)$(docdir)/ $(INSTALL_DATA) *.html $(DESTDIR)$(docdir)/ -# uninstall docs +# uninstall man/docs + +uninstall-hook: $(man_uninstall) $(doc_uninstall) + +uninstall-man: + $(RM) $(DESTDIR)$(mandir)/pl/man1/weechat-curses.1 + -rmdir $(DESTDIR)$(mandir)/pl/man1 -uninstall-hook: +uninstall-doc: $(RM) $(DESTDIR)$(docdir)/*.pl.html -rmdir $(DESTDIR)$(docdir) diff --git a/doc/ru/CMakeLists.txt b/doc/ru/CMakeLists.txt index 6efc4a974..34f300962 100644 --- a/doc/ru/CMakeLists.txt +++ b/doc/ru/CMakeLists.txt @@ -17,13 +17,17 @@ # along with WeeChat. If not, see <http://www.gnu.org/licenses/>. # -# quickstart -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ru.html - COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=ru -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.ru.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.ru.txt - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.ru.txt - COMMENT "Building weechat_quickstart.ru.html" -) -ADD_CUSTOM_TARGET(doc-quickstart-ru ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ru.html) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ru.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) +IF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) + + # quickstart + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ru.html + COMMAND ${ASCIIDOC_EXECUTABLE} ARGS -a lang=ru -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.ru.html ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.ru.txt + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/weechat_quickstart.ru.txt + COMMENT "Building weechat_quickstart.ru.html" + ) + ADD_CUSTOM_TARGET(doc-quickstart-ru ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ru.html) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.ru.html DESTINATION ${SHAREDIR}/doc/${PROJECT_NAME}) + +ENDIF(ENABLE_DOC AND SOURCEHIGHLIGHT_FOUND) diff --git a/doc/ru/Makefile.am b/doc/ru/Makefile.am index bcb753485..3b7f72830 100644 --- a/doc/ru/Makefile.am +++ b/doc/ru/Makefile.am @@ -22,21 +22,43 @@ docdir = $(datadir)/doc/$(PACKAGE) EXTRA_DIST = CMakeLists.txt \ weechat_quickstart.ru.txt -all-local: weechat_quickstart.ru.html +if MAN + man_targets = + man_install = + man_uninstall = +endif +if DOC + doc_targets = weechat_quickstart.ru.html + doc_install = install-doc + doc_uninstall = uninstall-doc +endif +all-local: $(man_targets) $(doc_targets) # quickstart weechat_quickstart.ru.html: weechat_quickstart.ru.txt $(ASCIIDOC) -a lang=ru -a toc -a date=`date "+%F"` -a revision="$(VERSION)" -a stylesheet=$(abs_top_srcdir)/doc/asciidoc.css -n -o weechat_quickstart.ru.html $(abs_top_srcdir)/doc/ru/weechat_quickstart.ru.txt -# install docs +# install man/docs -install-data-hook: +install-data-hook: $(man_install) $(doc_install) + +install-man: + $(mkinstalldirs) $(DESTDIR)$(mandir)/ru/man1/ + $(INSTALL_DATA) *.1 $(DESTDIR)$(mandir)/ru/man1/ + +install-doc: $(mkinstalldirs) $(DESTDIR)$(docdir)/ $(INSTALL_DATA) *.html $(DESTDIR)$(docdir)/ -# uninstall docs +# uninstall man/docs + +uninstall-hook: $(man_uninstall) $(doc_uninstall) + +uninstall-man: + $(RM) $(DESTDIR)$(mandir)/ru/man1/weechat-curses.1 + -rmdir $(DESTDIR)$(mandir)/ru/man1 -uninstall-hook: +uninstall-doc: $(RM) $(DESTDIR)$(docdir)/*.ru.html -rmdir $(DESTDIR)$(docdir) |