Opened 11 years ago
Closed 10 years ago
#6691 closed Feature Requests (fixed)
Add option to emit file dependencies to quickbook
Reported by: | Mathias Gaunard | Owned by: | Daniel James |
---|---|---|---|
Milestone: | To Be Determined | Component: | quickbook |
Version: | Boost Development Trunk | Severity: | Cosmetic |
Keywords: | Cc: |
Description
This is a feature request: add an option to emit the list of files included directly or indirectly from a qbk file (not counting xincludes).
This would make it easier to integrate Quickbook in build systems.
Change History (8)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 11 years ago
One file per line would be most convenient for my personal usage. The path to the files should be either absolute or relative to the current working directory.
comment:3 by , 11 years ago
(In [77442]) Quickbook: Rough stab at outputting dependencies. Refs #6691
Adds --output-deps
flag. To write out dependencies to deps.txt
:
quickbook --output-deps deps.txt source.qbk
If --output-deps
is specified, quickbook won't generate an output file
unless one is specified with --output-file
. If there is an error it
will return an error code, but it will still write out all the opened
files.
Known issues:
- If the same file is included/imported twice it may or may not list it twice. Should be consistent.
- Doesn't include SVG files. It probably should as they can affect the output.
- Need to check some of the path issues for things such as xinclude paths which depend on the output file path.
- Needs tests and documentation.
comment:4 by , 11 years ago
comment:5 by , 11 years ago
I was just writing the tests and I realised that I missed a case. If a file is added before the currently used file on the include path it will replace that file, so this really should include the location of non-existent files that would change the build. Should they be marked differently?
There are also plans to add support for loading files using globs (implemented on the quickbook-dev branch, but I've backed it out on trunk as there are problems with the implementation). If the happens then the file list will need to include globs as well, will that be a problem?
comment:6 by , 11 years ago
(In [77598]) Quickbook: Further dependencies development. Refs #6691
- Include relevant locations on path where file wasn't found.
- Improve
include_search
while I'm at it. - Normalize paths for non-existent files.
- Tests, not integrated with Boost.Build yet. Needs to check that python is available then run the script with the location of the quickbook executable.
comment:7 by , 11 years ago
(In [77973]) Quickbook: Deal with checked paths that aren't present. Refs #6691.
I think that the dependencies should just be files that were loaded, so
I changed it to do that, but added an extra (hidden for now) option to
list all paths that were checked, staring with a +
for files that are
present, and -
for files that are absent.
Also fixed a bug with the path resolver.
comment:8 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Shouldn't be too hard. Is there any particular form that would be convenient?