17871dc3eSAndrew Rist#**************************************************************
27871dc3eSAndrew Rist#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
107871dc3eSAndrew Rist#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
127871dc3eSAndrew Rist#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
197871dc3eSAndrew Rist#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir
25cdf0e10cSrcweirPRJ		= ..$/..
26cdf0e10cSrcweirPRJNAME = helpcontent2
27cdf0e10cSrcweirTARGET  = auxiliary
28cdf0e10cSrcweir
29cdf0e10cSrcweir# --- Settings -----------------------------------------------------
30cdf0e10cSrcweir
31cdf0e10cSrcweir.INCLUDE : settings.mk
32cdf0e10cSrcweir
33cdf0e10cSrcweirTREEFILES  = \
34cdf0e10cSrcweir	sbasic.tree \
35cdf0e10cSrcweir	simpress.tree \
36cdf0e10cSrcweir	scalc.tree \
37cdf0e10cSrcweir	smath.tree \
38cdf0e10cSrcweir	schart.tree \
39cdf0e10cSrcweir	swriter.tree \
40cdf0e10cSrcweir	shared.tree
41cdf0e10cSrcweir
42cdf0e10cSrcweir# --- Targets ------------------------------------------------------
43cdf0e10cSrcweir
44cdf0e10cSrcweir.INCLUDE :  target.mk
45cdf0e10cSrcweir.EXPORT : LOCALIZESDF LOCALIZATION_FOUND TRYSDF
46cdf0e10cSrcweir
47cdf0e10cSrcweirALLTAR : aux_dirs $(COMMONMISC)$/treefiles.done $(COMMONBIN)$/helpimg.ilst
48cdf0e10cSrcweir
49cdf0e10cSrcweir.IF "$(WITH_LANG)"!=""
50*a6640286SHerbert Dürrt_aux_langdirs:=$(shell @find $(WITH_LANG) en-US -name "*.cfg" | sed "s/\.\/\///" | sed "s/\.\///" )
51cdf0e10cSrcweir
52cdf0e10cSrcweiraux_langdirs:=$(uniq $(t_aux_langdirs:d:d))
53cdf0e10cSrcweir
54cdf0e10cSrcweiraux_alllangiso:=$(foreach,i,$(alllangiso) $(foreach,j,$(aux_langdirs) $(eq,$i,$j  $i $(NULL))))
55cdf0e10cSrcweir
56cdf0e10cSrcweirWITH_LANG!:=$(aux_alllangiso)
57cdf0e10cSrcweir
58cdf0e10cSrcweir.EXPORT : WITH_LANG
59cdf0e10cSrcweir
60cdf0e10cSrcweirLOCTREEFILES:=$(foreach,i,$(aux_alllangiso) $(foreach,j,$(TREEFILES) $(COMMONMISC)$/$i$/$j))
61cdf0e10cSrcweir.ELSE			#IF "$(WITH_LANG)"!=""
62cdf0e10cSrcweiraux_langdirs:=en-US
63cdf0e10cSrcweirLOCTREEFILES:=$(foreach,j,$(TREEFILES) $(COMMONMISC)$/en-US$/$j)
64cdf0e10cSrcweir.ENDIF			#IF "$(WITH_LANG)"!=""
65cdf0e10cSrcweir
66cdf0e10cSrcweir$(COMMONMISC)$/treefiles.done : $(LOCTREEFILES)
67cdf0e10cSrcweir	+$(PERL) $(PRJ)$/helpers$/update_tree.pl && $(TOUCH) $@
68cdf0e10cSrcweir
69cdf0e10cSrcweir%.created:
70cdf0e10cSrcweir	@-$(MKDIRHIER) $(@:d) && $(TOUCH) $@
71cdf0e10cSrcweir
72cdf0e10cSrcweir$(LOCTREEFILES) : $(TREEFILES) $$(@:d)$/dir.created
73cdf0e10cSrcweir	@$(TOUCH) $@
74cdf0e10cSrcweir
75cdf0e10cSrcweir.IF "$(WITH_LANG)"!=""
76cdf0e10cSrcweir.IF "$(LOCALIZATION_FOUND)"=="YES"
77cdf0e10cSrcweir$(LOCTREEFILES) : $(TRYSDF:d:d:d:d)$/text$/shared/localize.sdf
78cdf0e10cSrcweir.ELSE			# "$(LOCALIZATION_FOUND)"=="YES"
79cdf0e10cSrcweir$(COMMONMISC)/unpack.done : $(SOLARCOMMONSDFDIR)$/$(PRJNAME).zip
80cdf0e10cSrcweir    @@-$(MKDIRHIER) $(COMMONMISC)$/$(PRJNAME)_$(TARGET)
81cdf0e10cSrcweir	unzip -o -d $(COMMONMISC)$/$(PRJNAME) $(SOLARCOMMONSDFDIR)$/$(PRJNAME).zip
82cdf0e10cSrcweir    $(TOUCH) $@
83cdf0e10cSrcweir
84cdf0e10cSrcweir$(LOCTREEFILES) : $(COMMONMISC)/unpack.done
85cdf0e10cSrcweir
86cdf0e10cSrcweir.ENDIF			# "$(LOCALIZATION_FOUND)"=="YES"
87cdf0e10cSrcweir.ENDIF			# "$(WITH_LANG)"!=""
88cdf0e10cSrcweir
89cdf0e10cSrcweiraux_dirs .PHONY :
90cdf0e10cSrcweir    echo aux_langdirs:=$(aux_langdirs) > $(LOCAL_COMMON_OUT)/inc$/aux_langs.mk
91cdf0e10cSrcweir
92cdf0e10cSrcweir$(COMMONBIN)$/helpimg.ilst .PHONY:
93cdf0e10cSrcweir	-$(RM) $@
94cdf0e10cSrcweir	$(PERL) $(PRJ)$/helpers$/create_ilst.pl -dir=$(SOLARSRC)/default_images/res/helpimg > $@.$(INPATH)
95cdf0e10cSrcweir	$(RENAME) $@.$(INPATH) $@
96cdf0e10cSrcweir
97cdf0e10cSrcweir
98