diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-04-07 23:22:08 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-04-08 01:05:52 +0200 |
commit | c923f7d2c210dc7846767fc0ac6ece2a0d7812a8 (patch) | |
tree | 4895fcbbf423daf410da5a8ef8e09ef8064c5c67 /solenv/gbuild/JunitTest.mk | |
parent | a16060116346533923c607bd406d3fea511b41ec (diff) |
gbuild: "use" vs. "add":
Naming convention for gbuild methods:
- "add" is used for stuff that is logically a part of the target
(i.e. not registered at the Module, but defined in the target's makefile)
- "use" is used for stuff that is logically a different target
(i.e. it is registered at the Module, has it's own makefile, may be
in a different module than the target)
Diffstat (limited to 'solenv/gbuild/JunitTest.mk')
-rw-r--r-- | solenv/gbuild/JunitTest.mk | 67 |
1 files changed, 51 insertions, 16 deletions
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk index c861ea08b1ec..187b0678424e 100644 --- a/solenv/gbuild/JunitTest.mk +++ b/solenv/gbuild/JunitTest.mk @@ -73,7 +73,7 @@ $(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_add_system_jar,$(call gb_JunitTest_get_classsetname,$(1)),$(OOO_JUNIT_JAR)) +$(call gb_JavaClassSet_use_system_jar,$(call gb_JunitTest_get_classsetname,$(1)),$(OOO_JUNIT_JAR)) $(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 @@ -105,7 +105,12 @@ $(foreach sourcefile,$(2),$(call gb_JunitTest_add_sourcefile,$(1),$(sourcefile)) endef define gb_JunitTest_add_jar -$(call gb_JavaClassSet_add_jar,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) +$$(call gb_Output_error,\ + gb_JunitTest_add_jar: use gb_JunitTest_use_jar instead.) +endef + +define gb_JunitTest_use_jar +$(call gb_JavaClassSet_use_jar,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) $(call gb_JunitTest_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(2) $(call gb_JunitTest_get_target,$(1)) : $(2) $(2) :| $(gb_Helper_PHONY) @@ -113,34 +118,64 @@ $(2) :| $(gb_Helper_PHONY) endef define gb_JunitTest_add_jars -$(foreach jar,$(2),$(call gb_JunitTest_add_jar,$(1),$(jar))) +$$(call gb_Output_error,\ + gb_JunitTest_add_jars: use gb_JunitTest_use_jars instead.) +endef + +define gb_JunitTest_use_jars +$(foreach jar,$(2),$(call gb_JunitTest_use_jar,$(1),$(jar))) endef -# see gb_JavaClassSet_add_jar_classset define gb_JunitTest_add_jar_classset -$(call gb_JavaClassSet_add_jar_classset,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) +$$(call gb_Output_error,\ + gb_JunitTest_add_jar_classset: use gb_JunitTest_use_jar_classset instead.) +endef + +# see gb_JavaClassSet_use_jar_classset +define gb_JunitTest_use_jar_classset +$(call gb_JavaClassSet_use_jar_classset,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) $(call gb_JunitTest_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,$(2))) endef define gb_JunitTest_add_customtarget_dependency -$(call gb_JavaClassSet_add_customtarget_dependency,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) +$$(call gb_Output_error,\ + gb_JunitTest_add_customtarget_dependency: use gb_Jar_use_customtarget instead.) +endef + +define gb_JunitTest_use_customtarget +$(call gb_JavaClassSet_use_customtarget,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) endef define gb_JunitTest_add_customtarget_dependencies -$(foreach dependency,$(2),$(call gb_JunitTest_add_customtarget_dependency,$(1),$(dependency))) +$$(call gb_Output_error,\ + gb_JunitTest_add_customtarget_dependencies: use gb_Jar_use_customtargets instead.) +endef + +define gb_JunitTest_use_customtargets +$(foreach dependency,$(2),$(call gb_JunitTest_use_customtarget,$(1),$(dependency))) endef define gb_JunitTest_add_package_dependency -$(call gb_JavaClassSet_add_package_dependency,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) +$$(call gb_Output_error,\ + gb_JunitTest_add_package_dependency: use gb_JunitTest_use_package instead.) +endef + +define gb_JunitTest_use_package +$(call gb_JavaClassSet_use_package,$(call gb_JunitTest_get_classsetname,$(1)),$(2)) endef define gb_JunitTest_add_package_dependencies -$(foreach dependency,$(2),$(call gb_JunitTest_add_package_dependency,$(1),$(dependency))) +$$(call gb_Output_error,\ + gb_JunitTest_add_package_dependencies: use gb_JunitTest_use_packages instead.) +endef + +define gb_JunitTest_use_packages +$(foreach dependency,$(2),$(call gb_JunitTest_use_package,$(1),$(dependency))) endef @@ -160,13 +195,13 @@ gb_JunitTest_add_classes := gb_JunitTest_add_class := gb_JunitTest_add_sourcefile := gb_JunitTest_add_sourcefiles := -gb_JunitTest_add_jar := -gb_JunitTest_add_jars := -gb_JunitTest_add_jar_classset := -gb_JunitTest_add_customtarget_dependency := -gb_JunitTest_add_customtarget_dependencies := -gb_JunitTest_add_package_dependency := -gb_JunitTest_add_package_dependencies := +gb_JunitTest_use_jar := +gb_JunitTest_use_jars := +gb_JunitTest_use_jar_classset := +gb_JunitTest_use_customtarget := +gb_JunitTest_use_customtargets := +gb_JunitTest_use_package := +gb_JunitTest_use_packages := endif # OOO_JUNIT_JAR # vim: set noet sw=4: |