summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-04-14 20:38:38 +0200
committerMichael Stahl <mstahl@redhat.com>2012-04-14 21:07:15 +0200
commit5b3a8606767929e349fd4034fbf8e2243c34cfc5 (patch)
tree2c4d0222d5c943079f12fe6eff96009366194985 /solenv
parent946e7180be96178937e7be1b0bd7132902709a87 (diff)
JavaClassSet.mk: remove the output directory before calling javac
When removing a source file, the outdated class file would still end up in the jar otherwise.
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/JavaClassSet.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index 7e0954a49e2f..1830d0130736 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -31,7 +31,7 @@ gb_JavaClassSet_JAVACDEBUG :=
# Enforces correct dependency order for possibly generated stuff:
# generated sources, jars/classdirs etc.
-gb_JavaClassSet_get_preparation_target = $(WORKDIR)/JavaClassSet/$(1)/prepared
+gb_JavaClassSet_get_preparation_target = $(WORKDIR)/JavaClassSet/$(1).prepared
ifneq ($(gb_DEBUGLEVEL),0)
gb_JavaClassSet_JAVACDEBUG := -g
@@ -41,6 +41,7 @@ define gb_JavaClassSet__command
$(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) && \
$(if $(filter-out $(JARDEPS),$(4)), \
+ rm -rf $(call gb_JavaClassSet_get_classdir,$(2))/* && \
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\
$(call gb_Helper_native_path,\
$(filter-out $(JARDEPS),$(4)))) && \
@@ -61,7 +62,8 @@ $(call gb_JavaClassSet_get_target,%) :
$(call gb_JavaClassSet_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),JCS,3)
$(call gb_Helper_abbreviate_dirs,\
- rm -rf $(dir $(call gb_JavaClassSet_get_target,$*)))
+ rm -rf $(dir $(call gb_JavaClassSet_get_target,$*))) \
+ $(call gb_JavaClassSet_get_preparation_target,$*)
$(call gb_JavaClassSet_get_preparation_target,%) :
mkdir -p $(dir $@) && touch $@