1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ		= ..$/..$/..$/..$/..
25PRJNAME = xmlhelp
26TARGET  = HelpLinker
27PACKAGE = com$/sun$/star$/help
28
29.IF "$(SOLAR_JAVA)"!=""
30# --- Settings -----------------------------------------------------
31
32.INCLUDE : settings.mk
33
34JAVACLASSFILES = \
35	$(CLASSDIR)$/$(PACKAGE)$/HelpSearch.class			        \
36	$(CLASSDIR)$/$(PACKAGE)$/HelpComponent.class			        \
37	$(CLASSDIR)$/$(PACKAGE)$/HelpIndexer.class
38
39TRANSEX3FILES = \
40		$(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpIndexerTool.class		\
41		$(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpFileDocument.class
42
43ADDFILES = $(subst,$(SOLARBINDIR)$/help,$(CLASSDIR) $(TRANSEX3FILES))
44
45JARFILES  = ridl.jar jurt.jar unoil.jar juh.jar
46.IF "$(SYSTEM_LUCENE)" == "YES"
47EXTRAJARFILES = $(LUCENE_CORE_JAR) $(LUCENE_ANALYZERS_JAR)
48JARCLASSPATH = $(EXTRAJARFILES)
49.ELSE
50JARFILES += lucene-core-2.9.4-dev.jar lucene-analyzers-2.9.4-dev.jar
51JARCLASSPATH = lucene-core-2.9.4-dev.jar lucene-analyzers-2.9.4-dev.jar
52.ENDIF
53
54JARTARGET	   	   = LuceneHelpWrapper.jar
55JARCOMPRESS        = TRUE
56CUSTOMMANIFESTFILE = MANIFEST.MF
57
58# --- Targets ------------------------------------------------------
59
60.INCLUDE :  target.mk
61
62.IF "$(JARTARGETN)"!=""
63$(JAVATARGET) : $(ADDFILES)
64$(JARTARGETN) : $(ADDFILES)
65.ENDIF
66
67$(ADDFILES) : $(SOLARBINDIR)$/help$/$(PACKAGE)$/$$(@:f)
68	$(MKDIRHIER) $(@:d)
69	$(COPY) $< $@
70
71fix_system_lucene:
72	@echo "Fix Java Class-Path entry for Lucene libraries from system."
73	@$(SED) -r -e "s#^(Class-Path:).*#\1 file://$(LUCENE_CORE_JAR) file://$(LUCENE_ANALYZERS_JAR)#" \
74	-i ../../../../../$(INPATH)/class/HelpLinker/META-INF/MANIFEST.MF
75
76ALLTAR : $(MISC)/LuceneHelpWrapper.component
77
78$(MISC)/LuceneHelpWrapper.component .ERRREMOVE : \
79        $(SOLARENV)/bin/createcomponent.xslt LuceneHelpWrapper.component
80    $(XSLTPROC) --nonet --stringparam uri \
81        '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
82        $(SOLARENV)/bin/createcomponent.xslt LuceneHelpWrapper.component
83.ELSE
84all:
85        @echo java disabled
86.ENDIF
87