diff options
author | Michael Stahl <mst@openoffice.org> | 2011-09-15 13:51:54 +0200 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2011-09-15 14:07:26 +0200 |
commit | 2bf365dce817e02037c04d15d7b0dfc78cf9c91f (patch) | |
tree | d477ae82493091f533373bca4d733914d6341f72 /solenv | |
parent | Rewrite a bit so that Windows dbgutils build does not shout (diff) | |
download | core-2bf365dce817e02037c04d15d7b0dfc78cf9c91f.tar.gz core-2bf365dce817e02037c04d15d7b0dfc78cf9c91f.zip |
Jar.mk: remove target in case jar program exits with error
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/Jar.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk index 92ec247cccb7..652331aa4155 100644 --- a/solenv/gbuild/Jar.mk +++ b/solenv/gbuild/Jar.mk @@ -42,7 +42,9 @@ endef # adds manifest version, class path, solarversion and content from sources to manifest file # creates the target folder of the jar file if it doesn't exist # creates the jar file +# jar program does not remove the target in case of error, so rm it manually define gb_Jar__command + $(call gb_Output_announce,$*,$(true),JAR,3) $(call gb_Helper_abbreviate_dirs_native,\ mkdir -p $(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,$(1)))/META-INF && \ echo Manifest-Version: 1.0 > $(call gb_Jar_get_manifest_target,$(1)) && \ @@ -50,7 +52,10 @@ define gb_Jar__command echo "Solar-Version: $(RSCREVISION)" >> $(call gb_Jar_get_manifest_target,$(1)) && \ cat $(MANIFEST) >> $(call gb_Jar_get_manifest_target,$(1)) && \ mkdir -p $(dir $(2)) && \ - cd $(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,$(1))) && $(gb_Jar_JARCOMMAND) cfm $(2) $(call gb_Jar_get_manifest_target,$(1)) META-INF $(PACKAGEROOTS) ) + cd $(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,$(1))) && \ + $(gb_Jar_JARCOMMAND) cfm $(2) $(call gb_Jar_get_manifest_target,$(1)) \ + META-INF $(PACKAGEROOTS) \ + || (rm $(2); false) ) endef # clean target reuses clean target of ClassSet |