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