commit ad57ee84405fb19e30f60162120f42beb3df76b7
parent eefd8f18f273f0b96b3b33c9efd104aaf5e40f88
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 15 Jul 2022 16:21:31 +0200
Write the man page of the materials list fileformat
Diffstat:
2 files changed, 74 insertions(+), 10 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -113,18 +113,23 @@ if(NOT SCDOC)
"The `scdoc' program is missing. "
"The Rad Net GRounD man page cannot be generated.")
else()
- set(_src ${PROJECT_SOURCE_DIR}/../doc/rnsp.5.scd)
- add_custom_command(
- OUTPUT rnsp.5
- COMMAND ${SCDOC} < ${_src} > rnsp.5
- DEPENDS ${_src}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMENT "Buid ROFF man page rnsp.5"
- VERBATIM)
- add_custom_target(man-roff ALL DEPENDS rnsp.5)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rnsp.5 DESTINATION share/man/man5)
+ set(_man_names rnml.5 rnsp.5)
+
+ foreach(_man IN LISTS _man_names)
+ set(_src ${PROJECT_SOURCE_DIR}/../doc/${_man}.scd)
+ add_custom_command(
+ OUTPUT ${_man}
+ COMMAND ${SCDOC} < ${_src} > ${_man}
+ DEPENDS ${_src}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "Buid ROFF man page ${_man}"
+ VERBATIM)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_man} DESTINATION share/man/man5)
+ endforeach()
+ add_custom_target(man-roff ALL DEPENDS ${_man_names})
endif()
+
################################################################################
# Define output & install directories
################################################################################
diff --git a/doc/rnml.5.scd b/doc/rnml.5.scd
@@ -0,0 +1,59 @@
+rnml(5)
+
+; Copyright (C) 2022 Centre National de la Recherche Scientifique
+; Copyright (C) 2022 Institut de Physique du Globe de Paris
+; Copyright (C) 2022 |Méso|Star> (contact@meso-star.com)
+; Copyright (C) 2022 Université de Reims Champagne-Ardenne
+; Copyright (C) 2022 Université de Versaille Saint-Quentin
+; Copyright (C) 2022 Université Paul Sabatier (contact@laplace.univ-tlse.fr)
+;
+; 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
+
+rnml - Rad-Net Materials List file format
+
+# DESCRIPTION
+
+*rnml* is a text file format that lists the filenames of materials saved in the
+*mrumtl*(5) file format. The material filenames are expanded before they are
+loaded and therefore can be composed of variables (e.g. _"${MY_PATH}/mtl.mrumtl"_)
+
+Characters behind the hash mark (#) are considered comments and are therefore
+ignored, as well as empty lines, i.e. lines without characters or composed
+only of spaces and tabs.
+
+# GRAMMAR
+
+```
+<rnml> ::= <materials-count>
+ <material-filename>
+ [ <material-filename> ... ]
+
+<materials-count> ::= INTGER
+<material-filename> ::= STRING
+```
+
+# EXEMPLE
+
+```
+3
+mtl_000.dat
+mtl_001.dat
+mtl_002.dat
+```
+
+# SEE ALSO
+
+*mrumtl*(5)