1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
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.
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).
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.
26 #************************************************************************/
32 ENABLE_EXCEPTIONS
=TRUE
34 # --- Settings -----------------------------------------------------
36 .INCLUDE
: settings.mk
38 # --- Files --------------------------------------------------------
40 # grab all .txt files under data directory, which are breakiterator rule files.
41 MY_BRK_TXTFILES
:=$(shell @ls data
/*.txt
)
43 # insert "OpenOffice" as icu package name in front of the name of each rule file for searching on application provided data
44 MY_BRK_BRKFILES
:=$(subst,data
/,$(MISC
)$/ $(MY_BRK_TXTFILES
:s
/.txt
/.brk
/))
46 # OpenOffice_dat.c is a generated file from the rule file list by gencmn
48 $(MISC
)$/OpenOffice_dat.c \
49 $(MY_BRK_BRKFILES
:s
/.brk
/_brk.c
/)
52 $(SLO
)$/breakiteratorImpl.obj \
53 $(SLO
)$/breakiterator_cjk.obj \
54 $(SLO
)$/breakiterator_ctl.obj \
55 $(SLO
)$/breakiterator_th.obj \
56 $(SLO
)$/breakiterator_unicode.obj \
57 $(SLO
)$/xdictionary.obj \
58 $(subst,$(MISC
)$/,$(SLO
)$/ $(MY_MISC_CXXFILES
:s
/.c
/.obj
/))
60 OBJFILES
= $(OBJ
)$/gendict.obj
65 DEPOBJFILES
= $(OBJ
)$/gendict.obj
66 APP1OBJS
= $(DEPOBJFILES
)
68 APP1STDLIBS
= $(SALLIB
)
70 # --- Targets ------------------------------------------------------
72 .IF
"$(SYSTEM_ICU)" == "YES"
73 GENCMN
:=$(SYSTEM_GENCMN
)
74 GENBRK
:=$(SYSTEM_GENBRK
)
75 GENCCODE
:=$(SYSTEM_GENCCODE
)
77 GENCMN
:=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)$/gencmn
78 GENBRK
:=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)$/genbrk
79 GENCCODE
:=$(AUGMENT_LIBRARY_PATH
) $(SOLARBINDIR
)$/genccode
82 $(MISC
)$/%.brk
: data
/%.txt
83 $(WRAPCMD
) $(GENBRK
) -r
$< -o
$(MISC
)$/$*.brk
85 $(MISC
)$/%_brk.c
: $(MISC
)$/%.brk
86 $(WRAPCMD
) $(GENCCODE
) -n OpenOffice
-d
$(MISC
)$ $(MISC
)$/$*.brk
88 # 'gencmn', 'genbrk' and 'genccode' are tools generated and delivered by icu project to process icu breakiterator rules.
89 # The output of gencmn generates warnings under Windows. We want to minimize the patches to external tools,
90 # so the output (OpenOffice_icu_dat.c) is changed here to include a pragma to disable the warnings.
91 # Output of gencmn is redirected to OpenOffice_icu_tmp.c with the -t switch.
92 $(MISC
)$/OpenOffice_
%.c
: $(MY_BRK_BRKFILES
:s
/.brk
/_brk.c
/)
93 $(WRAPCMD
) $(GENCMN
) -n OpenOffice
-t tmp
-S
-d
$(MISC
) O
$(mktmp
$(subst,$(MISC
)$/, $(MY_BRK_BRKFILES
:t
"\n")))
94 echo
$(USQ
)#ifdef _MSC_VER$(USQ) > $@
95 echo
$(USQ
)#pragma warning( disable : 4229 4668 )$(USQ) >> $@
96 echo
$(USQ
)#endif$(USQ) >> $@
97 $(TYPE
) $(@
:s
/_dat
/_tmp
/) >> $@