+ <!-- the following code is mostly equivalent to a:
+ <dependency-of>$(id)</dependency-of>
+ put into the __mkdir_tgt target, except that it does _prepend_
+ the __mkdir_tgt dependency instead of appending it.
+
+ This is required because some compilers (e.g. MSVC) need to store in the
+ output folder some files (e.g. the PDB file) while compiling and thus
+ the library output folder must have been created before _any_ source file
+ is compiled, not just before the library is linked.
+ -->
+ <modify-target target="$(id)">
+ <set var="__deps" prepend="1">
+ $(substitute(__mkdir_tgt, lambda x: ref('__depname', x), 'DEP'))
+ </set>
+ </modify-target>
+ </if>