Back to home page

Enduro/X

 
 

    


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     Bchg
0040     CBchg
0041     Berror
0042     B_error
0043     Bstrerror
0044     Blen
0045     Badd
0046     CBadd
0047     CBget
0048     Bget
0049     Bdel
0050     Bdelall
0051     Bpres
0052     Bproj
0053     Bprojcpy
0054     Bfldid
0055     Bfname
0056     Bcpy
0057     Binit
0058     Bnext
0059     Bnext2
0060     Bboolco
0061     Bboolpr
0062     Bboolprcb
0063     Bfind
0064     CBfind
0065     Bboolev
0066     Bfloatev
0067     Bmkfldid
0068     Boccur
0069     Bused
0070     Bunused
0071     Bfldtype
0072     Bdelete
0073     Bfldno
0074     Bsizeof
0075     Btype
0076     Bfree
0077     Balloc
0078     Brealloc
0079     Bupdate
0080     CBfindocc
0081     Bfindocc
0082     CBgetalloc
0083     Bgetalloc
0084     Bfindlast
0085     Bgetlast
0086     Bprint
0087     Bfprint
0088     Bfprintcb
0089     Btypcvt
0090     Bextread
0091     Bextreadcb
0092     Bread
0093     Breadcb
0094     Bwrite
0095     Bwritecb
0096     Btreefree
0097     Bboolsetcbf
0098     Bboolsetcbf2
0099     Badds
0100     Bchgs
0101     Bgets
0102     Bgetsa
0103     Bfinds
0104     Bisubf
0105     Bindex
0106     Bunindex
0107     Bidxused
0108     Brstrindex
0109     Bvstof
0110     Bvftos
0111     Bvselinit
0112     Bvsinit
0113     Bvopt
0114     Bvnull
0115     Bconcat
0116     CBvget
0117     CBvchg
0118     Bvsizeof
0119     Bvcpy
0120     Bvoccur
0121     Bvsetoccur
0122     Bvnext
0123     Bvcmp
0124     Baddfast
0125     CBaddfast
0126     Bcmp
0127     Bsubset
0128     Bfldddbgetenv
0129     Bflddbload
0130     Bflddbid
0131     Bflddbget
0132     Bflddbunlink
0133     Bflddbunload
0134     Bflddbdrop
0135     Bflddbdel
0136     Bflddbadd
0137     Bflddbname
0138     Bnum
0139     Bjoin
0140     Bojoin
0141     Bneeded
0142     Bgetr
0143     Bgetrv
0144     CBgetr
0145     CBgetrv
0146     Bfindr
0147     Bfindrv
0148     CBfindr
0149     CBfindrv
0150     Bpresr
0151     Bpresrv
0152     CBvgetr
0153     CBvgetrv
0154     Bvnullr
0155     Bvnullrv
0156     Bvprint
0157     Bvfprint
0158     Bvfprintcb
0159     Bvextread
0160     Bvextreadcb
0161     CBgetallocr
0162     CBgetallocrv
0163     CBvgetalloc
0164     CBvgetallocrv
0165     CBvgetallocr
0166    )
0167 set(HTML_MAN_NAMES ${MAN3_NAMES})
0168 
0169 file(MAKE_DIRECTORY     ${CMAKE_CURRENT_BINARY_DIR}/man3
0170                         ${CMAKE_CURRENT_BINARY_DIR}/html)
0171 
0172 # Generate MAN3
0173 set(A2X_OPTS_MAN3 --format=manpage -D man3)
0174 set(MAN3_FILES)
0175 foreach(m IN LISTS MAN3_NAMES)
0176   set(mf ${CMAKE_CURRENT_BINARY_DIR}/man3/${m}.3)
0177   set(ms ${CMAKE_CURRENT_SOURCE_DIR}/${m}.adoc)
0178   add_custom_command(OUTPUT ${mf}
0179     COMMAND ${A2X_EXECUTABLE} ${A2X_OPTS_MAN3} ${ms}
0180     DEPENDS ${ms}
0181     WORKING_DIRECTORY .
0182     COMMENT "Building MAN 3 ${mf}"
0183     VERBATIM)
0184   list(APPEND MAN3_FILES ${mf})
0185   # Install the docs
0186   install (FILES
0187     ${mf}
0188     DESTINATION share/man/man3)
0189 
0190 endforeach()
0191 add_custom_target(man3_ubf ALL DEPENDS ${MAN3_FILES})
0192 
0193 set(A2X_OPTS_XHTML_MAN -f xhtml -D html)
0194 set(HTML_FILES)
0195 foreach(m IN LISTS HTML_MAN_NAMES)
0196   set(mf ${CMAKE_CURRENT_BINARY_DIR}/html/${m}.html)
0197   set(ms ${CMAKE_CURRENT_SOURCE_DIR}/${m}.adoc)
0198   add_custom_command(OUTPUT ${mf}
0199     COMMAND ${A2X_EXECUTABLE} ${A2X_OPTS_XHTML_MAN} ${ms}
0200     DEPENDS ${ms}
0201     WORKING_DIRECTORY .
0202     COMMENT "Building HTML_MAN ${mf}"
0203     VERBATIM)
0204   list(APPEND HTML_FILES ${mf})
0205 
0206   # Install the docs
0207   install (FILES
0208     ${mf}
0209     DESTINATION share/endurox/doc/html/api/ubf)
0210 
0211 endforeach()
0212 
0213 install (FILES
0214   ${CMAKE_CURRENT_BINARY_DIR}/html/docbook-xsl.css
0215   DESTINATION share/endurox/doc/html/api/ubf
0216   OPTIONAL)
0217 
0218 add_custom_target(html_man3_ubf ALL DEPENDS ${HTML_FILES})
0219 
0220 # end.
0221 
0222 
0223 # vim: set ts=4 sw=4 et smartindent: