1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org.  If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28PRJ		= ..$/..$/..$/..$/..
29PRJNAME = xmlhelp
30TARGET  = HelpLinker
31PACKAGE = com$/sun$/star$/help
32
33.IF "$(SOLAR_JAVA)"!=""
34# --- Settings -----------------------------------------------------
35
36.INCLUDE : settings.mk
37
38JAVACLASSFILES = \
39	$(CLASSDIR)$/$(PACKAGE)$/HelpSearch.class			        \
40	$(CLASSDIR)$/$(PACKAGE)$/HelpComponent.class			        \
41	$(CLASSDIR)$/$(PACKAGE)$/HelpIndexer.class
42
43TRANSEX3FILES = \
44		$(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpIndexerTool.class		\
45		$(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpFileDocument.class
46
47ADDFILES = $(subst,$(SOLARBINDIR)$/help,$(CLASSDIR) $(TRANSEX3FILES))
48
49JARFILES  = ridl.jar jurt.jar unoil.jar juh.jar
50.IF "$(SYSTEM_LUCENE)" == "YES"
51EXTRAJARFILES = $(LUCENE_CORE_JAR) $(LUCENE_ANALYZERS_JAR)
52JARCLASSPATH = $(EXTRAJARFILES)
53.ELSE
54JARFILES += lucene-core-2.3.jar lucene-analyzers-2.3.jar
55JARCLASSPATH = lucene-core-2.3.jar lucene-analyzers-2.3.jar
56.ENDIF
57
58JARTARGET	   	   = LuceneHelpWrapper.jar
59JARCOMPRESS        = TRUE
60CUSTOMMANIFESTFILE = MANIFEST.MF
61
62# --- Targets ------------------------------------------------------
63
64.INCLUDE :  target.mk
65
66.IF "$(JARTARGETN)"!=""
67$(JAVATARGET) : $(ADDFILES)
68$(JARTARGETN) : $(ADDFILES)
69.ENDIF
70
71$(ADDFILES) : $(SOLARBINDIR)$/help$/$(PACKAGE)$/$$(@:f)
72	$(MKDIRHIER) $(@:d)
73	$(COPY) $< $@
74
75fix_system_lucene:
76	@echo "Fix Java Class-Path entry for Lucene libraries from system."
77	@$(SED) -r -e "s#^(Class-Path:).*#\1 file://$(LUCENE_CORE_JAR) file://$(LUCENE_ANALYZERS_JAR)#" \
78	-i ../../../../../$(INPATH)/class/HelpLinker/META-INF/MANIFEST.MF
79
80ALLTAR : $(MISC)/LuceneHelpWrapper.component
81
82$(MISC)/LuceneHelpWrapper.component .ERRREMOVE : \
83        $(SOLARENV)/bin/createcomponent.xslt LuceneHelpWrapper.component
84    $(XSLTPROC) --nonet --stringparam uri \
85        '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
86        $(SOLARENV)/bin/createcomponent.xslt LuceneHelpWrapper.component
87.ELSE
88all:
89        @echo java disabled
90.ENDIF
91