The logic which copies source documentation files into the build directory could use some improvements to its dependency management, so that when a source file changes, extract_content.py gets re-run. Make these changes as follows: - Add an --outputs flag to extract_content.py, so that the sources it depends on and generates can be saved into a file and thus made known to the build system - Change the way the sources and destination are specified in the extract_content.py command line so that the entire job can be done in a single command, rather than multiple (to avoid having to collate multiple --outputs files in CMake) - Extract the content at configure time with execute_process(), tracking all inputs and outputs within the build system itself. Use this information to make sure that each individual output depends on just its exact input file, ensuring updated inputs produce updated outputs without having to call extract_content.py again. - Ensure that the "content" build system target depends on all the outputs, transitively triggering a rebuild any time an input file (e.g. .rst documentation file or included image/source file) changes. Signed-off-by: Marti Bolivar <marti@foundries.io> |
||
|---|---|---|
| .. | ||
| extract_content.py | ||
| fix_tex.py | ||
| genrest.py | ||