diff options
author | Michael Stahl <mst@openoffice.org> | 2011-04-01 20:47:04 +0000 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-17 09:44:49 +0200 |
commit | 4a435e341f618d0dc811f919fb7446a0771e2fd7 (patch) | |
tree | a8c7857684fa1f25659770740da744ba674cdf6b | |
parent | 05a4d9bd4dada1a3b3f28a7ea17e112b0aa54234 (diff) |
gnumake4: #i117340#: JavaClassSet: replace broken multi-repo support [hg:3c843d4c457b]
-rw-r--r-- | solenv/gbuild/Jar.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/JavaClassSet.mk | 36 | ||||
-rw-r--r-- | solenv/gbuild/JunitTest.mk | 2 |
3 files changed, 17 insertions, 23 deletions
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk index 4cb7ecf15a77..7e6a222a5f5e 100644 --- a/solenv/gbuild/Jar.mk +++ b/solenv/gbuild/Jar.mk @@ -81,7 +81,7 @@ $(call gb_Jar_get_target,$(1)) : CLASSPATH := $(value XCLASSPATH) $(call gb_Jar_get_target,$(1)) : MANIFEST := $(call gb_Jar_get_target,$(1)) : JARCLASSPATH := $(call gb_Jar_get_target,$(1)) : PACKAGEROOTS := -$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1))) +$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1)),$(2)) $(eval $(call gb_Module_register_target,$(call gb_Jar_get_final_target,$(1)),$(call gb_Jar_get_clean_target,$(1)))) $(call gb_Deliver_add_deliverable,$(call gb_Jar_get_outdir_target,$(1)),$(call gb_Jar_get_target,$(1))) $(call gb_Jar_get_outdir_target,$(1)) : $(call gb_Jar_get_target,$(1)) diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk index 3c1ddb3ecae2..d3e8d5803cee 100644 --- a/solenv/gbuild/JavaClassSet.mk +++ b/solenv/gbuild/JavaClassSet.mk @@ -38,37 +38,32 @@ $(call gb_Helper_abbreviate_dirs_native,\ endef -define gb_JavaClassSet__rules -$$(call gb_JavaClassSet_get_repo_target,$(1),%) : - $$(call gb_JavaClassSet__command,$$@,$$*,$$?,$$^) +$(call gb_JavaClassSet_get_clean_target,%) : vaClassSet_get_target,%) : + $(call gb_Output_announce,$*,$(true),JCS,3) + $(call gb_JavaClassSet__command,$@,$*,$?,$^) -$$(call gb_JavaClassSet_get_target,%) : $$(call gb_JavaClassSet_get_repo_target,$(1),%) - $$(call gb_Output_announce,$$*,$$(true),JCS,3) - $$(call gb_Helper_abbreviate_dirs,\ - touch $$@) - -endef - -$(call gb_JavaClassSet_get_clean_target,%) : - $(call gb_Output_announce,$*,$(false),JCS,3) +$(call gb_Output_announce,$*,$(false),JCS,3) $(call gb_Helper_abbreviate_dirs,\ rm -rf $(dir $(call gb_JavaClassSet_get_target,$*))) -$(foreach reponame,$(gb_JavaClassSet_REPOSITORYNAMES),$(eval $(call gb_JavaClassSet__rules,$(reponame)))) - # no initialization of scoped variable CLASSPATH as it is "inherited" from controlling instance (e.g. JUnitTest, Jar) +# UGLY: cannot use target local variable for REPO because it's needed in prereq define gb_JavaClassSet_JavaClassSet $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS := +$(if $(filter $(2),$(gb_JavaClassSet_REPOSITORYNAMES)),,\ + $(error JavaClassSet: no or invalid repository given; known repositories: \ + $(gb_JavaClassSet_REPOSITORYNAMES))) +gb_JavaClassSet_REPO_$(1) := $(2) +$(call gb_JavaClassSet_get_target,$(1)) : JARDEPS := endef define gb_JavaClassSet__get_sourcefile -$(1)/$(2).java +$($(1))/$(2).java endef define gb_JavaClassSet_add_sourcefile -$(foreach reponame,$(gb_JavaClassSet_REPOSITORYNAMES),\ - $(eval $(call gb_JavaClassSet_get_repo_target,$(reponame),$(1)) : $(call gb_JavaClassSet__get_sourcefile,$($(reponame)),$(2)))) - +$(eval $(call gb_JavaClassSet_get_target,$(1)) : \ + $(call gb_JavaClassSet__get_sourcefile,$(gb_JavaClassSet_REPO_$(1)),$(2))) endef define gb_JavaClassSet_add_sourcefiles @@ -84,9 +79,8 @@ endef # problem: currently we can't get these dependencies to work # build order dependency is a hack to get these prerequisites out of the way in the build command define gb_JavaClassSet_add_jar -$(foreach reponame,$(gb_JavaClassSet_REPOSITORYNAMES),\ -$(eval $(call gb_JavaClassSet_get_repo_target,$(reponame),$(1)) : $(2)) -$(eval $(call gb_JavaClassSet_get_repo_target,$(reponame),$(1)) : JARDEPS += $(2))) +$(eval $(call gb_JavaClassSet_get_target,$(1)) : $(2)) +$(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2)) endef # vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk index 4b6fe5e7fc56..5c84726958f2 100644 --- a/solenv/gbuild/JunitTest.mk +++ b/solenv/gbuild/JunitTest.mk @@ -54,7 +54,7 @@ $(call gb_JunitTest_get_target,$(1)) : CLASSPATH := $(value XCLASSPATH)$(gb_CLAS $(call gb_JunitTest_get_target,$(1)) : CLASSES := $(call gb_JunitTest_JunitTest_platform,$(1)) -$(call gb_JavaClassSet_JavaClassSet,$(call gb_JunitTest_get_classsetname,$(1))) +$(call gb_JavaClassSet_JavaClassSet,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) $(call gb_JunitTest_get_target,$(1)) : $(call gb_JavaClassSet_get_target,$(call gb_JunitTest_get_classsetname,$(1))) $(eval $(call gb_Module_register_target,$(call gb_JunitTest_get_target,$(1)),$(call gb_JunitTest_get_clean_target,$(1)))) endef |