diff options
author | David Tardon <dtardon@redhat.com> | 2011-12-25 10:28:44 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-12-25 10:28:44 +0100 |
commit | 78e56daa46a01f375684bc3d4c5767c6c0a9ac07 (patch) | |
tree | 226d63a91c6ac4c01e6d4a8d32df41ac8008ce5e | |
parent | use gb_Helper_get_rcfile here (diff) | |
download | core-78e56daa46a01f375684bc3d4c5767c6c0a9ac07.tar.gz core-78e56daa46a01f375684bc3d4c5767c6c0a9ac07.zip |
impl. package deps for JavaClassSet
-rw-r--r-- | solenv/gbuild/Jar.mk | 11 | ||||
-rw-r--r-- | solenv/gbuild/JavaClassSet.mk | 24 |
2 files changed, 33 insertions, 2 deletions
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk index f1fe1444c8f4..bf4ed12bd152 100644 --- a/solenv/gbuild/Jar.mk +++ b/solenv/gbuild/Jar.mk @@ -201,6 +201,16 @@ $(call gb_JavaClassSet_use_externals,$(call gb_Jar_get_classsetname,$(1)),$(2)) endef +define gb_Jar_add_package_dependency +$(call gb_JavaClassSet_add_package_dependency,$(call gb_Jar_get_classsetname,$(1)),$(2)) + +endef + +define gb_Jar_add_package_dependencies +$(call gb_JavaClassSet_add_package_dependencies,$(call gb_Jar_get_classsetname,$(1)),$(2)) + +endef + # possible directories for jar files containing UNO services gb_Jar_COMPONENTPREFIXES := \ OOO:vnd.sun.star.expand:\dLO_JAVA_DIR/ \ @@ -222,5 +232,4 @@ $(call gb_Jar_get_clean_target,$(1)) : $(call gb_ComponentTarget_get_clean_targe endef - # vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk index 6befda19aa2c..100976f231c5 100644 --- a/solenv/gbuild/JavaClassSet.mk +++ b/solenv/gbuild/JavaClassSet.mk @@ -29,6 +29,13 @@ gb_JavaClassSet_JAVACCOMMAND := $(JAVACOMPILER) gb_JavaClassSet_JAVACDEBUG := +# Enforce dependency ordering. +# +# This target is used to enforce correct dependency order for possibly +# generated stuff: generated sources, jars/classdirs etc. Everything but +# source files depends on it. +gb_JavaClassSet_get_preparation_target = $(WORKDIR)/JavaClassSet/$(1)/prepared + ifneq ($(gb_DEBUGLEVEL),0) gb_JavaClassSet_JAVACDEBUG := -g endif @@ -60,8 +67,12 @@ $(call gb_JavaClassSet_get_clean_target,%) : $(call gb_Helper_abbreviate_dirs,\ rm -rf $(dir $(call gb_JavaClassSet_get_target,$*))) +$(call gb_JavaClassSet_get_preparation_target,%) : + mkdir -p $(dir $@) && touch $@ + define gb_JavaClassSet_JavaClassSet $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS := +$(call gb_JavaClassSet_get_target,$(1)) :| $(call gb_JavaClassSet_get_preparation_target,$(1)) endef @@ -85,7 +96,7 @@ endef define gb_JavaClassSet_add_generated_sourcefile $(call gb_JavaClassSet_get_target,$(1)) : $(call gb_JavaClassSet__get_generated_sourcefile,$(2)) -$(call gb_JavaClassSet__get_generated_sourcefile,$(2)) : $(gb_Helper_PHONY) +$(call gb_JavaClassSet__get_generated_sourcefile,$(2)) :| $(call gb_JavaClassSet_get_preparation_target,$(1)) endef @@ -105,6 +116,7 @@ define gb_JavaClassSet_add_jar $(call gb_JavaClassSet_get_target,$(1)) : $(2) $(call gb_JavaClassSet_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(strip $(2)) $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2) +$(2) :| $(call gb_JavaClassSet_get_preparation_target,$(1)) endef @@ -139,4 +151,14 @@ $(foreach external,$(2),$(call gb_JavaClassSet_use_external,$(1),$(external))) endef +define gb_JavaClassSet_add_package_dependency +$(call gb_JavaClassSet_get_preparation_target,$(1)) :| $(call gb_Package_get_target,$(2)) + +endef + +define gb_JavaClassSet_add_package_dependencies +$(foreach dependency,$(2),$(call gb_JavaClassSet_add_package_dependency,$(1),$(dependency))) + +endef + # vim: set noet sw=4: |