summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripting/java/build.xml23
-rw-r--r--xmlhelp/source/com/sun/star/help/makefile.mk10
2 files changed, 32 insertions, 1 deletions
diff --git a/scripting/java/build.xml b/scripting/java/build.xml
index 6fa3f77101..985af1b87f 100755
--- a/scripting/java/build.xml
+++ b/scripting/java/build.xml
@@ -74,6 +74,24 @@
<pathelement path="${jardir}"/>
<pathelement path="${netbeans.install.path}/modules/ext/nb-editor.jar"/>
</path>
+
+ <condition property="boot_refID" value="macPath" else="nonMacPath">
+ <and>
+ <os family="mac"/>
+ <os family="unix"/>
+ </and>
+ </condition>
+ <path id="macPath" location="${java.home}/../Classes/classes.jar"/>
+ <!-- rhino.jar from OpenJDK breaks build -->
+ <path id="nonMacPath">
+ <fileset dir="${java.home}/">
+ <include name="jre/lib/*.jar"/>
+ <include name="lib/*.jar"/>
+ <exclude name="jre/lib/rhino.jar"/>
+ <exclude name="lib/rhino.jar"/>
+ </fileset>
+ </path>
+ <path id="my.bootstrap.classpath" refID="${boot_refID}"/>
<!-- ===================== Prepare Directories ========================= -->
<target name="prepare">
@@ -84,10 +102,13 @@
<target name="compile" depends="prepare">
<javac srcdir="com" destdir="${jardir}"
includes="**/*.java" classpathref="idlclasspath"
- debug="${debug}" optimize="${optimize}" deprecation="off"/>
+ debug="${debug}" optimize="${optimize}" deprecation="off">
+ <compilerarg value="-Xbootclasspath:${toString:my.bootstrap.classpath}"/>
+ </javac>
<javac srcdir="Framework/" destdir="${jardir}"
includes="**/*.java" classpathref="idlclasspath" debug="${debug}"
optimize="${optimize}" deprecation="off">
+ <compilerarg value="-Xbootclasspath:${toString:my.bootstrap.classpath}"/>
</javac>
</target>
diff --git a/xmlhelp/source/com/sun/star/help/makefile.mk b/xmlhelp/source/com/sun/star/help/makefile.mk
index 373e8f6c67..730121fd71 100644
--- a/xmlhelp/source/com/sun/star/help/makefile.mk
+++ b/xmlhelp/source/com/sun/star/help/makefile.mk
@@ -104,6 +104,7 @@ JAVACLASSFILES = \
JARFILES = ridl.jar jurt.jar unoil.jar juh.jar
.IF "$(SYSTEM_LUCENE)" == "YES"
XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(LUCENE_CORE_JAR)$(PATH_SEPERATOR)$(LUCENE_ANALYZERS_JAR)
+COMP=fix_system_lucene
.ELSE
JARFILES += lucene-core-2.3.jar lucene-analyzers-2.3.jar
.ENDIF
@@ -116,3 +117,12 @@ CUSTOMMANIFESTFILE = MANIFEST.MF
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+.IF "$(JARTARGETN)"!=""
+$(JARTARGETN) : $(COMP)
+.ENDIF
+
+fix_system_lucene:
+ @echo "Fix Java Class-Path entry for Lucene libraries from system."
+ @$(SED) -r -e "s#^(Class-Path:).*#\1 file://$(LUCENE_CORE_JAR) file://$(LUCENE_ANALYZERS_JAR)#" \
+ -i ../../../../../$(INPATH)/class/HelpLinker/META-INF/MANIFEST.MF