summaryrefslogtreecommitdiff
path: root/solenv/gbuild/Jar.mk
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2013-06-18 23:34:59 +0200
committerMichael Stahl <mstahl@redhat.com>2013-09-09 22:09:15 +0200
commit64405aa69f3c4e305f11f2d3ddbddd2bbedbb264 (patch)
treef33b5146aa933e8f4f9de3befede54d65c21fd6d /solenv/gbuild/Jar.mk
parentd33b6ccda7e52e7111c0299db9a6e60400abb13b (diff)
gbuild: avoid packages when copying files into instdir
There should be only two ways how to add file into instdir: - gb_Helper_install used in gbuild - gb_Package_set_outdir used also elsewhere, preferably with scp2 containing its .filelist. Change-Id: I75ec0ba63f32acf4b56b17dc972f4488edf6a777
Diffstat (limited to 'solenv/gbuild/Jar.mk')
-rw-r--r--solenv/gbuild/Jar.mk24
1 files changed, 6 insertions, 18 deletions
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
index 99f02d9548fe..7ef7212e4a6c 100644
--- a/solenv/gbuild/Jar.mk
+++ b/solenv/gbuild/Jar.mk
@@ -23,7 +23,7 @@ gb_Jar_JAVACOMMAND := $(JAVAINTERPRETER)
gb_Jar_JARCOMMAND := jar
gb_Jar_LAYER_DIRS := \
- OOO:program/classes \
+ OOO:$(gb_PROGRAMDIRNAME)/classes \
URE:ure/share/java
# location of files going to be packed into .jar file
@@ -36,11 +36,9 @@ define gb_Jar_get_manifest_target
$(call gb_Jar_get_workdir,$(1))/META-INF/MANIFEST.MF
endef
-gb_Jar_get_packagename = Jar/$(1)
-
gb_Jar__get_layer = $(strip $(foreach group,$(gb_Jar_VALIDGROUPS),$(if $(filter $(1),$(gb_Jar_$(group))),$(group))))
-gb_Jar__get_dir_for_layer = $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Jar_LAYER_DIRS)))
-gb_Jar__get_instdir = $(call gb_Jar__get_dir_for_layer,$(call gb_Jar__get_layer,$(1)))
+gb_Jar__get_dir_for_layer = $(patsubst $(1):%,$(INSTDIR)/%,$(filter $(1):%,$(gb_Jar_LAYER_DIRS)))
+gb_Jar_get_install_target = $(call gb_Jar__get_dir_for_layer,$(call gb_Jar__get_layer,$(1)))/$(1).jar
# creates classset and META-INF folders if they don't exist
# adds manifest version, class path, solarversion and content from sources to manifest file
@@ -105,24 +103,14 @@ $(call gb_Jar_get_outdir_target,$(1)) :| $(dir $(call gb_Jar_get_outdir_target,$
ifneq ($(gb_RUNNABLE_INSTDIR),)
$(if $(filter OOO URE,$(call gb_Jar__get_layer,$(1))),\
- $(call gb_Jar__Jar_package,$(1),$(call gb_Jar_get_packagename,$(1)),$(notdir $(call gb_Jar_get_target,$(1)))) \
+$(call gb_Helper_install,$(call gb_Jar_get_outdir_target,$(1)), \
+ $(call gb_Jar_get_install_target,$(1)), \
+ $(call gb_Jar_get_target,$(1))) \
)
endif
endef
-# gb_Jar__Jar_package jar package filename
-define gb_Jar__Jar_package
-$(call gb_Package_Package_internal,$(2),$(WORKDIR)/Jar)
-$(call gb_Package_set_outdir,$(2),$(INSTDIR))
-$(call gb_Package_add_file,$(2),$(call gb_Jar__get_instdir,$(1))/$(3),$(3))
-
-$(call gb_Package_get_target,$(2)) : $(call gb_Jar_get_target,$(1))
-$(call gb_Jar_get_outdir_target,$(1)) : $(call gb_Package_get_target,$(2))
-$(call gb_Jar_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(2))
-
-endef
-
# source files are forwarded to the ClassSet
define gb_Jar_add_sourcefile
$(call gb_JavaClassSet_add_sourcefile,$(call gb_Jar_get_classsetname,$(1)),$(2))