[PATCH wayland v4 1/5] build/doc: Ensure destination dir exists despite VPATH

Emil Velikov emil.l.velikov at gmail.com
Wed Aug 29 16:46:46 UTC 2018


Hi Dan,

On 28 August 2018 at 23:19, Daniel Stone <daniels at collabora.com> wrote:
> Make considers a variable called VPATH when trying to satisfy
> dependencies, e.g. for a target 'foo', it will consider the target
> extant if VPATH is '../../bar' and '../../bar/foo' exists.
>
> Part of the doc build, the '$(alldirs)' target, exists to create the
> target directories if they do not exist. For example, before generating
> xml/wayland-architecture.png, it will ensure the 'xml' target is
> considered up-to-date thanks to the target dependency.
>
> Creating $(srcdir)/doc/doxygen/xml thus means that the 'xml' dependency
> will be satisfied, so we'll never create the output directory, and the
> doc build will fail.
>
> Change the alldirs target list to be absolute paths, so VPATH will not
> be consulted and defeat the entire point of what we're trying to do.
> This fixes the Meson build, where we later create
> doc/doxygen/xml/meson.build.
>
Have you tried something as trivial as the below sed?
s/$(AM_V_GEN)/$(AM_V_GEN)$(MKDIR_P) $@/g

It will allow you to remove the, dare I say it, bonkers "let's make a
target that only creates a folder".
Plus avoid all the complexity that you've proposing.

-Emil


More information about the wayland-devel mailing list