mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-02 15:13:50 +01:00
Merge pull request #368 from AnotherFoxGuy/scdoc-cmake
🎉 Generate manpage with scdoc
This commit is contained in:
7
.github/workflows/cmake_build.yml
vendored
7
.github/workflows/cmake_build.yml
vendored
@@ -122,6 +122,13 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
host-${{ matrix.config.name }}-
|
host-${{ matrix.config.name }}-
|
||||||
|
|
||||||
|
# Install scdoc with conan TODO: Move conan pkg to own repo
|
||||||
|
- name: "[Linux] Install scdoc"
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: |
|
||||||
|
conan remote add rigs-of-rods-deps https://conan.cloudsmith.io/rigs-of-rods/deps/
|
||||||
|
conan install scdoc/1.11.1@anotherfoxguy/stable -g=virtualenv --build=missing
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
env:
|
env:
|
||||||
# Apple code signing
|
# Apple code signing
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
include( CMakeDependentOption )
|
||||||
|
|
||||||
set( TARGET manual )
|
set( TARGET manual )
|
||||||
set( TARGET_ROOT ${topdir}/manual )
|
set( TARGET_ROOT ${topdir}/manual )
|
||||||
@@ -52,9 +53,25 @@ if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|||||||
if( NOT WIN32)
|
if( NOT WIN32)
|
||||||
install( DIRECTORY "${dst}" OPTIONAL
|
install( DIRECTORY "${dst}" OPTIONAL
|
||||||
DESTINATION "${_DATADIR}/tenacity/help" )
|
DESTINATION "${_DATADIR}/tenacity/help" )
|
||||||
install( FILES "${_SRCDIR}/tenacity.1"
|
|
||||||
DESTINATION "${_MANDIR}/man1" )
|
|
||||||
install( FILES "${_SRCDIR}/tenacity.appdata.xml"
|
install( FILES "${_SRCDIR}/tenacity.appdata.xml"
|
||||||
DESTINATION "${_DATADIR}/metainfo" )
|
DESTINATION "${_DATADIR}/metainfo" )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Test if scdoc is installed
|
||||||
|
find_program(SCDOC_CMD scdoc)
|
||||||
|
|
||||||
|
cmake_dependent_option(BUILD_MANPAGE "Build manpage" ON "NOT SCDOC_CMD STREQUAL SCDOC_CMD-NOTFOUND" OFF)
|
||||||
|
|
||||||
|
if( BUILD_MANPAGE )
|
||||||
|
add_custom_command( COMMENT "Generating manpage"
|
||||||
|
COMMAND ${SCDOC_CMD} < "${_SRCDIR}/tenacity.1.scd" > "${CMAKE_BINARY_DIR}/help/tenacity.1"
|
||||||
|
DEPENDS "${_SRCDIR}/tenacity.1.scd"
|
||||||
|
OUTPUT "${CMAKE_BINARY_DIR}/help/tenacity.1" )
|
||||||
|
|
||||||
|
add_custom_target( gen_manpage ALL DEPENDS "${CMAKE_BINARY_DIR}/help/tenacity.1")
|
||||||
|
|
||||||
|
install( FILES "${CMAKE_BINARY_DIR}/help/tenacity.1"
|
||||||
|
DESTINATION "${_MANDIR}/man1" )
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }
|
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }
|
||||||
|
|
||||||
|
if [ -f "activate.sh" ]; then
|
||||||
|
echo "Setting up conan venv"
|
||||||
|
source activate.sh
|
||||||
|
fi
|
||||||
|
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
conan --version # check it works
|
conan --version # check it works
|
||||||
|
|||||||
Reference in New Issue
Block a user