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
24
25PRJ		= ..$/..
26PRJNAME = helpcontent2
27TARGET  = auxiliary
28
29# --- Settings -----------------------------------------------------
30
31.INCLUDE : settings.mk
32
33TREEFILES  = \
34	sbasic.tree \
35	simpress.tree \
36	scalc.tree \
37	smath.tree \
38	schart.tree \
39	swriter.tree \
40	shared.tree
41
42# --- Targets ------------------------------------------------------
43
44.INCLUDE :  target.mk
45.EXPORT : LOCALIZESDF LOCALIZATION_FOUND TRYSDF
46
47ALLTAR : aux_dirs $(COMMONMISC)$/treefiles.done $(COMMONBIN)$/helpimg.ilst
48
49.IF "$(WITH_LANG)"!=""
50t_aux_langdirs:=$(shell @find $(WITH_LANG) en-US -name "*.cfg" | sed "s/\.\/\///" | sed "s/\.\///" )
51
52aux_langdirs:=$(uniq $(t_aux_langdirs:d:d))
53
54aux_alllangiso:=$(foreach,i,$(alllangiso) $(foreach,j,$(aux_langdirs) $(eq,$i,$j  $i $(NULL))))
55
56WITH_LANG!:=$(aux_alllangiso)
57
58.EXPORT : WITH_LANG
59
60LOCTREEFILES:=$(foreach,i,$(aux_alllangiso) $(foreach,j,$(TREEFILES) $(COMMONMISC)$/$i$/$j))
61.ELSE			#IF "$(WITH_LANG)"!=""
62aux_langdirs:=en-US
63LOCTREEFILES:=$(foreach,j,$(TREEFILES) $(COMMONMISC)$/en-US$/$j)
64.ENDIF			#IF "$(WITH_LANG)"!=""
65
66$(COMMONMISC)$/treefiles.done : $(LOCTREEFILES)
67	+$(PERL) $(PRJ)$/helpers$/update_tree.pl && $(TOUCH) $@
68
69%.created:
70	@-$(MKDIRHIER) $(@:d) && $(TOUCH) $@
71
72$(LOCTREEFILES) : $(TREEFILES) $$(@:d)$/dir.created
73	@$(TOUCH) $@
74
75.IF "$(WITH_LANG)"!=""
76.IF "$(LOCALIZATION_FOUND)"=="YES"
77$(LOCTREEFILES) : $(TRYSDF:d:d:d:d)$/text$/shared/localize.sdf
78.ELSE			# "$(LOCALIZATION_FOUND)"=="YES"
79$(COMMONMISC)/unpack.done : $(SOLARCOMMONSDFDIR)$/$(PRJNAME).zip
80    @@-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)_$(TARGET)
81	unzip -o -d $(COMMONMISC)$/$(PRJNAME) $(SOLARCOMMONSDFDIR)$/$(PRJNAME).zip
82    $(TOUCH) $@
83
84$(LOCTREEFILES) : $(COMMONMISC)/unpack.done
85
86.ENDIF			# "$(LOCALIZATION_FOUND)"=="YES"
87.ENDIF			# "$(WITH_LANG)"!=""
88
89aux_dirs .PHONY :
90    echo aux_langdirs:=$(aux_langdirs) > $(LOCAL_COMMON_OUT)/inc$/aux_langs.mk
91
92$(COMMONBIN)$/helpimg.ilst .PHONY:
93	-$(RM) $@
94	$(PERL) $(PRJ)$/helpers$/create_ilst.pl -dir=$(SOLARSRC)/default_images/res/helpimg > $@.$(INPATH)
95	$(RENAME) $@.$(INPATH) $@
96
97
98