[doc] preproc: translate {{INSTALL_PREFIX}}
preproc.sh now translates the {{INSTALL_PREFIX}} string as well as the {{OWLPS_VERSION}} string. Both values are now obtained from the corresponding environment variables (OWLPS_VERSION was previously obtained through a special git command).
This commit is contained in:
parent
c48ee0c555
commit
9d02312603
|
@ -40,7 +40,7 @@ else()
|
|||
# Command to generate the man page
|
||||
add_custom_command(
|
||||
OUTPUT "${TARGET}"
|
||||
COMMAND "${PREPROC_MAN}" "${SOURCE}" | "${TXT2TAGS_EXECUTABLE}" -q --infile=- --outfile="${TARGET}" -t man
|
||||
COMMAND OWLPS_VERSION=${OWLPS_VERSION} INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} "${PREPROC_MAN}" "${SOURCE}" | "${TXT2TAGS_EXECUTABLE}" -q --infile=- --outfile="${TARGET}" -t man
|
||||
DEPENDS "${SOURCE}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Generating ${TARGETNAME}")
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
# This script is for preprocessing the files before to call txt2tags.
|
||||
#
|
||||
# Modifications done:
|
||||
# - Replaces all the occurrences of {{OWLPS_VERSION}} by the current Git
|
||||
# version (as provided by git describe).
|
||||
# - Replaces all the occurrences of {{OWLPS_VERSION}} by the value of
|
||||
# the OWLPS_VERSION environment variable.
|
||||
# - Replaces all the occurrences of {{INSTALL_PREFIX}} by the value of
|
||||
# the INSTALL_PREFIX environment variable.
|
||||
|
||||
# OwlPS source version
|
||||
OWLPS_VERSION=$(git describe 2>/dev/null || echo 'UNKNOWN_VERSION')
|
||||
|
||||
sed "s/{{OWLPS_VERSION}}/${OWLPS_VERSION}/g" $@
|
||||
sed "{ \
|
||||
s/{{OWLPS_VERSION}}/${OWLPS_VERSION}/g ; \
|
||||
s@{{INSTALL_PREFIX}}@${INSTALL_PREFIX}@g }" $@
|
||||
|
|
Loading…
Reference in New Issue