commit ef7a92eb598f5220ceafe8219cd904109809d076
parent 6da78d984e80d4b8d1741c77b88257f74ebe6b4d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 17 Oct 2022 15:56:56 +0200
Convert the man page source from asciidoc to scdoc
Diffstat:
4 files changed, 71 insertions(+), 74 deletions(-)
diff --git a/README.md b/README.md
@@ -8,7 +8,9 @@ This program relies on the [CMake](http://www.cmake.org) and the
[RCMake](https://gitlab.com/vaplv/rcmake/) packages to build.
It also depends on the
[RSys](https://gitlab.com/vaplv/rsys/), and
-[NetCDF](https://www.unidata.ucar.edu/software/netcdf/) C libraries.
+[NetCDF](https://www.unidata.ucar.edu/software/netcdf/) C libraries. It
+optionally depends on [scdoc](https://sr.ht/~sircmpwn/scdoc/) which, if
+available, is used to generate the man pages.
First ensure that CMake is installed on your system. Then install the RCMake
package as well as the aforementioned prerequisites. Finally generate the
@@ -18,13 +20,14 @@ resulting project can be edited, built, tested and installed as any CMake
project. Refer to the [CMake](https://cmake.org/documentation) for further
informations on CMake.
-## Licenses
+## Copyright
-Copyright (C) 2018, 2020, 2021 [|Meso|Star](http://www.meso-star.com)
-<contact@meso-star.com>. Copyright (C) 2018 Centre National de la Recherche
-Scientifique (CNRS), Université Paul Sabatier
-<contact-edstar@laplace.univ-tlse.fr>. HTMie is free software released under
-the GPL v3+ license: GNU GPL version 3 or later. You are welcome to
-redistribute it under certain conditions; refer to the COPYING file for
-details.
+Copyright (C) 2018, 2020, 2021 [|Meso|Star](http://www.meso-star.com) (<contact@meso-star.com>)
+Copyright (C) 2018 Centre National de la Recherche Scientifique (CNRS)
+Copyright (C) 2018 Université Paul Sabatier (<contact-edstar@laplace.univ-tlse.fr>)
+## License
+
+HTMie is free software released under the GPL v3+ license: GNU GPL version 3
+or later. You are welcome to redistribute it under certain conditions; refer
+to the COPYING file for details.
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -79,18 +79,16 @@ rcmake_setup_devel(htmie HTMIE ${VERSION} high_tune/htmie_version.h)
################################################################################
# Man pages
################################################################################
-find_program(A2X NAMES a2x a2x.py)
-if(NOT A2X)
+find_program(SCDOC NAMES scdoc)
+if(NOT SCDOC)
message(WARNING
- "The `a2x' program is missing. "
- "The htmie man pages cannot be generated.")
+ "The `scdoc' program is missing. "
+ "The High-Tune Mie man page cannot be generated.")
else()
- set(_src ${PROJECT_SOURCE_DIR}/../doc/htmie.5.txt)
- set(_txt ${CMAKE_CURRENT_BINARY_DIR}/htmie.5.txt)
+ set(_src ${PROJECT_SOURCE_DIR}/../doc/htmie.5.scd)
add_custom_command(
OUTPUT htmie.5
- COMMAND ${CMAKE_COMMAND} -E copy ${_src} ${_txt}
- COMMAND ${A2X} -dmanpage -fmanpage ${_txt}
+ COMMAND ${SCDOC} < ${_src} > htmie.5
DEPENDS ${_src}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Buid ROFF man page htmie.5"
diff --git a/doc/htmie.5.scd b/doc/htmie.5.scd
@@ -0,0 +1,53 @@
+htmie(5)
+
+; Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com)
+; Copyright (C) 2018 CNRS, Université Paul Sabatier
+;
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation, either version 3 of the License, or
+; (at your option) any later version.
+;
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# NAME
+
+htmie - High-Tune: Mie's data file format
+
+# DESCRIPTION
+
+*htmie* is the file format used by *htrdr*(1) to describe the optical
+properties of water droplets obtained by a Mie code. This format relies on the
+NetCDF data format [1]. To be a valid *htmie* file, the NetCDF file must
+define the following variables:
+
+*lambda*++
+ One dimensional array of floating point data that lists the wavelengths
+in nanometers for which the subsequent data are defined.
+
+*macs*++
+ One dimensional array of massic absorption cross-sections in kg of liquid
+water in suspension.
+
+*mscs*++
+ One dimensional array of massic scattering cross-sections in kg of liquid
+water in suspension.
+
+*g*++
+ One dimensional array of asymmetry parameters of the equivalent
+Henyey-Greenstein phase function.
+
+# NOTES
+
+. Network Common Data Form - <https://www.unidata.ucar.edu/software/netcdf/>
+
+# SEE ALSO
+
+*htrdr*(1)
+
diff --git a/doc/htmie.5.txt b/doc/htmie.5.txt
@@ -1,57 +0,0 @@
-// Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com)
-// Copyright (C) 2018 CNRS, Université Paul Sabatier
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-:toc:
-
-htmie(5)
-=======
-
-NAME
-----
-htmie - High-Tune: Mie's data file format
-
-DESCRIPTION
------------
-
-*htmie* is the file format used by *htrdr*(1) to describe the optical
-properties of water droplets obtained by a Mie code. This format relies on the
-NetCDF data format [1]. To be a valid *htmie* file, the NetCDF file must
-define the following variables:
-
-*lambda*::
- One dimensional array of floating point data that lists the wavelengths
- in nanometers for which the subsequent data are defined.
-
-*macs*::
- One dimensional array of massic absorption cross-sections in kg of liquid
- water in suspension.
-
-*mscs*::
- One dimensional array of massic scattering cross-sections in kg of liquid
- water in suspension.
-
-*g*::
- One dimensional array of asymmetry parameters of the equivalent
- Henyey-Greenstein phase function.
-
-NOTES
------
-1. Network Common Data Form -
-<https://www.unidata.ucar.edu/software/netcdf/>
-
-SEE ALSO
---------
-*htrdr*(1)
-