0001 ##
0002 ## @brief Build documentation, XATMI API
0003 ##
0004 ## @file CMakeLists.txt
0005 ##
0006 ## -----------------------------------------------------------------------------
0007 ## Enduro/X Middleware Platform for Distributed Transaction Processing
0008 ## Copyright (C) 2009-2016, ATR Baltic, Ltd. All Rights Reserved.
0009 ## Copyright (C) 2017-2023, Mavimax, Ltd. All Rights Reserved.
0010 ## This software is released under one of the following licenses:
0011 ## AGPL (with Java and Go exceptions) or Mavimax's license for commercial use.
0012 ## See LICENSE file for full text.
0013 ## -----------------------------------------------------------------------------
0014 ## AGPL license:
0015 ##
0016 ## This program is free software; you can redistribute it and/or modify it under
0017 ## the terms of the GNU Affero General Public License, version 3 as published
0018 ## by the Free Software Foundation;
0019 ##
0020 ## This program is distributed in the hope that it will be useful, but WITHOUT ANY
0021 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0022 ## PARTICULAR PURPOSE. See the GNU Affero General Public License, version 3
0023 ## for more details.
0024 ##
0025 ## You should have received a copy of the GNU Affero General Public License along
0026 ## with this program; if not, write to the Free Software Foundation, Inc.,
0027 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0028 ##
0029 ## -----------------------------------------------------------------------------
0030 ## A commercial use license is available from Mavimax, Ltd
0031 ## contact@mavimax.com
0032 ## -----------------------------------------------------------------------------
0033 ##
0034 cmake_minimum_required(VERSION 3.5)
0035
0036 find_program(A2X_EXECUTABLE NAMES a2x)
0037
0038 set(MAN3_NAMES
0039 tpcall
0040 tpcancel
0041 tpconnect
0042 tpreturn
0043 tpforward
0044 tpdiscon
0045 tprecv
0046 tpsend
0047 tpservice
0048 tpbegin
0049 tpalloc
0050 tprealloc
0051 tpfree
0052 tptypes
0053 tpadvertise
0054 tpunadvertise
0055 tpgetrply
0056 tpabort
0057 tpcommit
0058 tpsuspend
0059 tpresume
0060 tpopen
0061 tpgetlev
0062 tpstrerror
0063 tpsubscribe
0064 tpunsubscribe
0065 tppost
0066 tpsrvgetctxdata
0067 tpsrvsetctxdata
0068 tpsrvfreectxdata
0069 tpgetctxt
0070 tpsetctxt
0071 tpnewctxt
0072 tpfreectxt
0073 tpcontinue
0074 tpgetnodeid
0075 tpclose
0076 tpinit
0077 tpterm
0078 tpsvrdone
0079 tpsvrinit
0080 tpext_addpollerfd
0081 tpext_delpollerfd
0082 tpext_addperiodcb
0083 tpext_delperiodcb
0084 tpext_addb4pollcb
0085 tpext_delb4pollcb
0086 tpgetsrvid
0087 tpjsontoubf
0088 tpubftojson
0089 tpenqueue
0090 tpdequeue
0091 ndrx_main
0092 ndrx_main_integra
0093 tpacall
0094 tplogdumpdiff
0095 tplogdump
0096 tplog
0097 tploggetreqfile
0098 tplogconfig
0099 tplogclosereqfile
0100 tplogclosethread
0101 tplogsetreqfile_direct
0102 tplogsetreqfile
0103 tploggetbufreqfile
0104 tplogdelbufreqfile
0105 tplogprintubf
0106 tplogqinfo
0107 tpisautobuf
0108 tpsetunsol
0109 tpnotify
0110 tpbroadcast
0111 tpchkunsol
0112 tpviewtojson
0113 tpjsontoview
0114 tpconvert
0115 tpurcode
0116 tptoutset
0117 tptoutget
0118 tpimport
0119 tpexport
0120 ndrx_fork
0121 ndrx_atfork_prepare
0122 ndrx_atfork_parent
0123 ndrx_atfork_child
0124 tuxgetenv
0125 tx_begin
0126 tx_close
0127 tx_info
0128 tx_commit
0129 tx_rollback
0130 tx_open
0131 tx_set_commit_return
0132 tx_set_transaction_control
0133 tx_set_transaction_timeout
0134 _tmstartserver
0135 tpgetconn
0136 tpscmt
0137 tpsvrthrinit
0138 tpsvrthrdone
0139 tpencrypt
0140 tpdecrypt
0141 tpexit
0142 tpsetcallinfo
0143 tpgetcallinfo
0144 ndrx_lcf_xadmin_add
0145 ndrx_lcf_func_add
0146 ndrx_lcf_publish
0147 tpsprio
0148 tpgprio
0149 tpsblktime
0150 tpgblktime
0151 tplogfplock
0152 tplogfpunlock
0153 tplogfpget
0154 )
0155 set(HTML_MAN_NAMES ${MAN3_NAMES})
0156
0157 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3
0158 ${CMAKE_CURRENT_BINARY_DIR}/html)
0159
0160 # Generate MAN3
0161 set(A2X_OPTS_MAN3 --format=manpage -D man3)
0162 set(MAN3_FILES)
0163 foreach(m IN LISTS MAN3_NAMES)
0164 set(mf ${CMAKE_CURRENT_BINARY_DIR}/man3/${m}.3)
0165 set(ms ${CMAKE_CURRENT_SOURCE_DIR}/${m}.adoc)
0166 add_custom_command(OUTPUT ${mf}
0167 COMMAND ${A2X_EXECUTABLE} ${A2X_OPTS_MAN3} ${ms}
0168 DEPENDS ${ms}
0169 WORKING_DIRECTORY .
0170 COMMENT "Building MAN 3 ${mf}"
0171 VERBATIM)
0172 list(APPEND MAN3_FILES ${mf})
0173 # Install the docs
0174 install (FILES
0175 ${mf}
0176 DESTINATION share/man/man3)
0177
0178 endforeach()
0179 add_custom_target(man3_xatmi ALL DEPENDS ${MAN3_FILES})
0180
0181 set(A2X_OPTS_XHTML_MAN -f xhtml -D html)
0182 set(HTML_FILES)
0183 foreach(m IN LISTS HTML_MAN_NAMES)
0184 set(mf ${CMAKE_CURRENT_BINARY_DIR}/html/${m}.html)
0185 set(ms ${CMAKE_CURRENT_SOURCE_DIR}/${m}.adoc)
0186 add_custom_command(OUTPUT ${mf}
0187 COMMAND ${A2X_EXECUTABLE} ${A2X_OPTS_XHTML_MAN} ${ms}
0188 DEPENDS ${ms}
0189 WORKING_DIRECTORY .
0190 COMMENT "Building HTML_MAN ${mf}"
0191 VERBATIM)
0192 list(APPEND HTML_FILES ${mf})
0193
0194 # Install the docs
0195 install (FILES
0196 ${mf}
0197 DESTINATION share/endurox/doc/html/api/xatmi)
0198
0199 endforeach()
0200
0201 install (FILES
0202 ${CMAKE_CURRENT_BINARY_DIR}/html/docbook-xsl.css
0203 DESTINATION share/endurox/doc/html/api/xatmi
0204 OPTIONAL)
0205
0206 add_custom_target(html_man3_xatmi ALL DEPENDS ${HTML_FILES})
0207
0208 # end.
0209
0210
0211 # vim: set ts=4 sw=4 et smartindent: