1*b1cdbd2cSJim Jagielski#**************************************************************
2*b1cdbd2cSJim Jagielski#
3*b1cdbd2cSJim Jagielski#  Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski#  or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski#  distributed with this work for additional information
6*b1cdbd2cSJim Jagielski#  regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski#  to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski#  "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski#  with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski#
11*b1cdbd2cSJim Jagielski#    http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski#
13*b1cdbd2cSJim Jagielski#  Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski#  software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski#  KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski#  specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski#  under the License.
19*b1cdbd2cSJim Jagielski#
20*b1cdbd2cSJim Jagielski#**************************************************************
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim Jagielskimy_cp:=$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/juh.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/parser.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/unoil.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/ridl.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/jurt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/xmlsearch.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/LuceneHelpWrapper.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/HelpIndexerTool.jar$
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski.IF "$(SYSTEM_LUCENE)" == "YES"
27*b1cdbd2cSJim Jagielskimy_cp!:=$(my_cp)$(PATH_SEPERATOR)$(LUCENE_CORE_JAR)$(PATH_SEPERATOR)$(LUCENE_ANALYZERS_JAR)
28*b1cdbd2cSJim Jagielski.ELSE
29*b1cdbd2cSJim Jagielskimy_cp!:=$(my_cp)$(PATH_SEPERATOR)$(SOLARBINDIR)/lucene-core-2.9.4-dev.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/lucene-analyzers-2.9.4-dev.jar
30*b1cdbd2cSJim Jagielski.ENDIF
31*b1cdbd2cSJim Jagielski
32*b1cdbd2cSJim Jagielski#aux_alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(aux_langdirs) $(eq,$i,$j  $i $(NULL))))
33*b1cdbd2cSJim Jagielskiaux_alllangiso*:=$(alllangiso)
34*b1cdbd2cSJim Jagielski
35*b1cdbd2cSJim Jagielski#########################################################
36*b1cdbd2cSJim Jagielski
37*b1cdbd2cSJim Jagielski
38*b1cdbd2cSJim JagielskiHELPLINKALLTARGETS=$(foreach,i,$(aux_alllangiso) $(MISC)/$(TARGET)_$(LINKNAME)_$i.done)
39*b1cdbd2cSJim JagielskiHELPLINKALLADDEDDEPS=$(foreach,i,$(aux_alllangiso) $(subst,LANGUAGE,$i $(LINKADDEDDPES)))
40*b1cdbd2cSJim Jagielski
41*b1cdbd2cSJim JagielskiALLTAR : $(HELPLINKALLTARGETS)
42*b1cdbd2cSJim Jagielski
43*b1cdbd2cSJim JagielskiXSL_DIR*:=$(SOLARBINDIR)
44*b1cdbd2cSJim JagielskiXHPLINKSRC*:=$(XHPDEST)
45*b1cdbd2cSJim JagielskiSTY_SWITCH:= -sty $(XSL_DIR)/embed.xsl
46*b1cdbd2cSJim Jagielski
47*b1cdbd2cSJim Jagielski.IF "$(XHPFILES)"!="" && "$(HELP_OUT)"!=""
48*b1cdbd2cSJim Jagielski$(foreach,i,$(LINKLINKFILES) $(XHPLINKSRC)/{$(aux_alllangiso)}/$i) : $(HELP_OUT)/$(TARGET).done
49*b1cdbd2cSJim JagielskiLINKDEPS+=$(HELP_OUT)/xhp_changed.flag
50*b1cdbd2cSJim Jagielski.ENDIF          # "$(XHPFILES)"!="" && "$(HELP_OUT)"!=""
51*b1cdbd2cSJim Jagielski
52*b1cdbd2cSJim Jagielski$(HELPLINKALLTARGETS) : $(foreach,i,$(LINKLINKFILES) $(XHPLINKSRC)/$$(@:b:s/_/./:e:s/.//)/$i) $(subst,LANGUAGE,$$(@:b:s/_/./:e:s/.//) $(LINKDEPS))
53*b1cdbd2cSJim Jagielski    @echo Building help index for $(@:b:s/_/./:e:s/.//)
54*b1cdbd2cSJim Jagielski	$(COMMAND_ECHO)$(HELPLINKER) -mod $(LINKNAME) -extlangsrc $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} $(STY_SWITCH) -extlangdest $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} -idxcaption $(XSL_DIR)/idxcaption.xsl -idxcontent $(XSL_DIR)/idxcontent.xsl $(LINKLINKFILES)
55*b1cdbd2cSJim Jagielski    $(COMMAND_ECHO)cd $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} && zip -u -r $(LINKNAME).jar $(PACKAGE)/* $(CHECKZIPRESULT)
56*b1cdbd2cSJim Jagielski.IF "$(SOLAR_JAVA)" == "TRUE"
57*b1cdbd2cSJim Jagielski# cleanup index dir
58*b1cdbd2cSJim Jagielski    -$(RM) $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))}/$(LINKNAME).idxl/*
59*b1cdbd2cSJim Jagielski.IF "$(CHECK_LUCENCE_INDEXER_OUTPUT)" == ""
60*b1cdbd2cSJim Jagielski	$(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVA_LIBRARY_PATH) -cp "$(my_cp)" com.sun.star.help.HelpIndexerTool -extension -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -zipdir $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} && $(TOUCH) $@
61*b1cdbd2cSJim Jagielski.ELSE
62*b1cdbd2cSJim Jagielski	$(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVA_LIBRARY_PATH) -cp "$(my_cp)" com.sun.star.help.HelpIndexerTool -extension -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -zipdir $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} -checkcfsandsegname _0 _3  && $(TOUCH) $@
63*b1cdbd2cSJim Jagielski.ENDIF
64*b1cdbd2cSJim Jagielski.ELSE
65*b1cdbd2cSJim Jagielski	-$(RM) $(XHPLINKSRC)/$(@:b)/content/*.*
66*b1cdbd2cSJim Jagielski	-$(RM) $(XHPLINKSRC)/$(@:b)/caption/*.*
67*b1cdbd2cSJim Jagielski.ENDIF
68*b1cdbd2cSJim Jagielski
69