# expect variables IN and OUT | |
EXECUTE_PROCESS(COMMAND mandoc -T man ${IN} OUTPUT_VARIABLE MAN) | |
STRING(REGEX REPLACE "NetBSD [0-9.]*" "NiH" MAN "${MAN}") | |
FILE(WRITE ${OUT}.new "${MAN}") | |
CONFIGURE_FILE(${OUT}.new ${OUT} COPYONLY) | |
FILE(REMOVE ${OUT}.new) | |