Replies: 1 comment
-
Another example of where this could be useful: I'm building a project that uses Lua, and documenting both the Lua and C code with LDoc. I tried the following docs = custom_target('docs',
command: [ldoc, '-d', '@OUTDIR@/doc', '@SOURCE_DIR@'],
output: 'doc',
install: true,
install_dir: get_option('datadir') / 'doc' / meson.project_name(),
) But unfortunately, LDoc gets confused and can't find the files it's looking for, like README.md, as it's looking for a relative path as specified in -- ...
topics = {"README.md"}
file = "lege"
examples = "examples" I suppose I could canonicalize the paths in |
Beta Was this translation helpful? Give feedback.
-
Hi,
having a workdir parameter for custom_target() would be very handy.
I have a project which is a lot of C, but also some go, which currently uses cmake. Compiling the go stuff is done through custom targets.
Since
go build
only works in the source tree, but allows writing the output somewhere else, the custom target in cmake looks something like this:With meson, it is not possible to specify a workdir for such a scenario. The only alternative I see is to introduce a script which takes the souce and target directory as arguments and does the computation itself (using
readlink -f
).I think such a change should be possible by using absolute paths to replace
@INPUT@
,@OUTPUT@
and similar placeholders ifworkdir
is set (instead of therel_to_builddir()
).Any thoughts about this idea?
Beta Was this translation helpful? Give feedback.
All reactions