On 14 Apr, Carl Marcum wrote:
> Hi all,
> 
> I'm very new to the build system and I've run into an issue with a 
> target and needing to declare a dependency between targets.
> 
> This example is Module_javaunohelper.mk in the javaunohelper module 
> where I've added the last target Ant_juh shown below.
> This new target needs the Jar_juh target to have completed first (output 
> is a juh.jar file).
> Ant_juh calls an Ant build target that copies this file.
> 
> When I build with "build --all" everything works as expected.
> When I build with "build --all -P2 -- -P2" the file copy fails because 
> the juh.jar file isn't completed.
> I think it may be a multi-thread race condition and I'm wondering if I 
> can specify a dependency between targets.
> 
> I've tried adding a WaitFor condition in the Ant task but that seems to 
> hold up everything until it times out and fails.
> 
> ---
> $(eval $(call gb_Module_Module,javaunohelper))
> 
> $(eval $(call gb_Module_add_targets,javaunohelper,\
>      Jar_juh \
>      Library_juh \
>      Library_juhx \
>      Zip_juh_src \
>      Ant_juh \
> ))

I think that n your Ant_juh.mk you need to call
gb_Ant_add_dependency or gb_Ant_add_dependencies.  The latter should
already be getting called and I think it might just do the right thing
if Ant reports that juh.jar is a dependency.  It doesn't look like the
former is meant to be called directly, but I think it would be something
like:
$(call gb_Ant_add_dependency,$(call gb_Ant_get_target,juh),$(call 
gb_Jar_get_target,%))

Having both Ant and Jar targets for juh might be problematic.

It may by easier to move the Ant stuff into it's own module, which would
depend on the javaunohelper module.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to