1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License or as specified alternatively below. You may obtain a copy of
7 # the License at http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
14 # The Initial Developer of the Original Code is
15 # Matúš Kukan <matus.kukan@gmail.com>
16 # Portions created by the Initial Developer are Copyright (C) 2011 the
17 # Initial Developer. All Rights Reserved.
19 # Major Contributor(s):
21 # For minor contributions see the git repository.
23 # Alternatively, the contents of this file may be used under the terms of
24 # either the GNU General Public License Version 3 or later (the "GPLv3+"), or
25 # the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
26 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
27 # instead of those above.
29 all : OpenOffice_dat.c data
/dict_ja.
cxx data
/dict_zh.
cxx
32 include $(GBUILDDIR
)/gbuild_simple.mk
37 data
/dict_
%.
cxx : data
/dict_
%_invis.
cxx
38 sed
's/\tconst/\tSAL_DLLPUBLIC_EXPORT const/' $< > $@
40 data
/dict_
%_invis.
cxx : $(realpath
$(SRC_ROOT
)/i18npool
/source
/breakiterator
/data
)/%.dic data
41 ifeq ($(OS_FOR_BUILD
),WNT
)
42 $(gb_Helper_execute
)gendict
`cygpath -m $<` $@
44 $(gb_Helper_execute
)gendict
$< $@
47 ifeq ($(SYSTEM_GENBRK
),)
48 GENBRK
:= $(gb_Helper_execute
)genbrk
50 GENBRK
:= $(SYSTEM_GENBRK
)
53 ifeq ($(SYSTEM_GENCCODE
),)
54 GENCCODE
:= $(gb_Helper_execute
)genccode
56 GENCCODE
:= $(SYSTEM_GENCCODE
)
59 ifeq ($(SYSTEM_GENCMN
),)
60 GENCMN
:= $(gb_Helper_execute
)gencmn
62 GENCMN
:= $(SYSTEM_GENCMN
)
65 TEMPFILE
:= $(shell $(gb_MKTEMP
))
66 BRKFILES
:= $(notdir $(subst .txt
,.brk
,$(wildcard $(SRC_ROOT
)/i18npool
/source
/breakiterator
/data
/*.txt
)))
68 # 'gencmn', 'genbrk' and 'genccode' are tools generated and delivered by icu project to process icu breakiterator rules.
69 # The output of gencmn generates warnings under Windows. We want to minimize the patches to external tools,
70 # so the output (OpenOffice_dat.c) is changed here to include a pragma to disable the warnings.
71 # Output of gencmn is redirected to OpenOffice_icu_tmp.c with the -t switch.
72 OpenOffice_dat.c
: $(subst .brk
,_brk.c
,$(BRKFILES
))
73 $(foreach brkfile
,$(BRKFILES
),$(shell echo
$(brkfile
) >> $(TEMPFILE
)))
74 $(GENCMN
) -n OpenOffice
-t tmp
-S
-d .
/ 0 $(TEMPFILE
)
75 echo
'#ifdef _MSC_VER' > $@
76 echo
'#pragma warning( disable : 4229 4668 )' >> $@
78 cat
$(subst _dat
,_tmp
,$@
) >> $@
81 $(GENCCODE
) -n OpenOffice
-d .
/ $<
86 # fdo#31271 ")" reclassified in more recent ICU/Unicode Standards
87 %.txt.p
: $(realpath
$(SRC_ROOT
)/i18npool
/source
/breakiterator
/data
)/%.txt
88 ifeq ($(ICU_RECLASSIFIED_CLOSE_PARENTHESIS
),YES
)
89 sed
"s#\[:LineBreak = Close_Punctuation:\]#\[\[:LineBreak = Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@
95 # vim: set noet sw=4 ts=4: