[Libreoffice-commits] .: solenv/gbuild
Tor Lillqvist
tml at kemper.freedesktop.org
Fri Dec 9 04:47:43 PST 2011
solenv/gbuild/JavaClassSet.mk | 10 +++++-----
solenv/gbuild/JunitTest.mk | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
New commits:
commit 91af205a93440b82ff1730528e98e6355092e02c
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Fri Dec 9 14:31:53 2011 +0200
Don't misuse CLASSPATH for what goes into the -cp option to javac
CLASSPATH is supposed to show where to find the classes needed by Java
programs running at build time. The -cp switch to javac tells where to
find classes referenced by the code being compiled. These are
different things. (But it doesn't seem to have mattered much in our
build system.) So use T_CP instead, named in the same fashion as
T_CXXFLAGS etc.
But... for some reason this change, which as such should be just more
or less cosmetic, also fixes a build problem in the "scripting" module
on Windows, seen by Noel Grandin
(http://comments.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/19016
) and me.
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index cea27c0..16d914a 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -43,7 +43,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
$(filter-out $(JARDEPS),$(4))))) && \
$(if $(3),$(gb_JavaClassSet_JAVACCOMMAND) \
$(gb_JavaClassSet_JAVACDEBUG) \
- -cp "$(CLASSPATH)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \
+ -cp "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \
-d $(call gb_JavaClassSet_get_classdir,$(2)) \
@$$RESPONSEFILE &&) \
rm -f $$RESPONSEFILE && \
@@ -60,8 +60,8 @@ $(call gb_JavaClassSet_get_clean_target,%) :
$(call gb_Helper_abbreviate_dirs,\
rm -rf $(dir $(call gb_JavaClassSet_get_target,$*)))
-# 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
+# No idea what above comment means, and whether still relevant
define gb_JavaClassSet_JavaClassSet
$(call gb_JavaClassSet_get_target,$(1)) : JARDEPS :=
endef
@@ -81,7 +81,7 @@ $(foreach sourcefile,$(2),$(call gb_JavaClassSet_add_sourcefile,$(1),$(sourcefil
endef
define gb_JavaClassSet_set_classpath
-$(eval $(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := $(2))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : T_CP := $(2))
endef
@@ -89,13 +89,13 @@ endef
# build order dependency is a hack to get these prerequisites out of the way in the build command
define gb_JavaClassSet_add_jar
$(eval $(call gb_JavaClassSet_get_target,$(1)) : $(2))
-$(eval $(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := $$(CLASSPATH)$(gb_CLASSPATHSEP)$(strip $(2)))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(strip $(2)))
$(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2))
endef
# this does not generate dependency on the jar
define gb_JavaClassSet_add_system_jar
-$(eval $(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := $$(CLASSPATH)$(gb_CLASSPATHSEP)$(strip $(2)))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(strip $(2)))
$(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2))
endef
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 5afe595..177cad6 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -47,7 +47,7 @@ $(call gb_JunitTest_get_target,%) :
rm -rf $(call gb_JunitTest_get_userdir,$*) && \
mkdir -p $(call gb_JunitTest_get_userdir,$*) && \
(DBGSV_ERROR_OUT=shell $(gb_JunitTest_JAVACOMMAND) \
- -cp "$(CLASSPATH)" \
+ -cp "$(T_CP)" \
$(DEFS) \
org.junit.runner.JUnitCore \
$(CLASSES) > $@.log 2>&1 || \
@@ -69,7 +69,7 @@ $(call gb_JunitTest_get_target,%) :
$(CLEAN_CMD)
define gb_JunitTest_JunitTest
-$(call gb_JunitTest_get_target,$(1)) : CLASSPATH := $(value XCLASSPATH)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$(gb_CLASSPATHSEP)$(OUTDIR)/lib
+$(call gb_JunitTest_get_target,$(1)) : T_CP := $(value XCLASSPATH)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$(gb_CLASSPATHSEP)$(OUTDIR)/lib
$(call gb_JunitTest_get_target,$(1)) : CLASSES :=
$(call gb_JunitTest_JunitTest_platform,$(1))
@@ -105,12 +105,12 @@ $(foreach sourcefile,$(2),$(call gb_JunitTest_add_sourcefile,$(1),$(sourcefile))
endef
define gb_JunitTest_set_classpath
-$(call gb_JunitTest_get_target,$(1)) : CLASSPATH := $(2)
+$(call gb_JunitTest_get_target,$(1)) : T_CP := $(2)
endef
define gb_JunitTest_add_jar
-$(call gb_JunitTest_get_target,$(1)) : CLASSPATH := $$(CLASSPATH)$(gb_CLASSPATHSEP)$(2)
+$(call gb_JunitTest_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(2)
$(call gb_JunitTest_get_target,$(1)) : $(2)
endef
More information about the Libreoffice-commits
mailing list