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#************************************************************************/ 27PRJ=..$/.. 28PRJNAME=i18npool 29TARGET=breakiterator 30 31TARGETTYPE=CUI 32ENABLE_EXCEPTIONS=TRUE 33 34# --- Settings ----------------------------------------------------- 35 36.INCLUDE : settings.mk 37 38# --- Files -------------------------------------------------------- 39 40# grab all .txt files under data directory, which are breakiterator rule files. 41MY_BRK_TXTFILES:=$(shell @ls data/*.txt) 42 43# insert "OpenOffice" as icu package name in front of the name of each rule file for searching on application provided data 44MY_BRK_BRKFILES:=$(subst,data/,$(MISC)$/ $(MY_BRK_TXTFILES:s/.txt/.brk/)) 45 46# OpenOffice_dat.c is a generated file from the rule file list by gencmn 47MY_MISC_CXXFILES := \ 48 $(MISC)$/OpenOffice_dat.c \ 49 $(MY_BRK_BRKFILES:s/.brk/_brk.c/) 50 51SLOFILES= \ 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/)) 59 60OBJFILES = $(OBJ)$/gendict.obj 61 62APP1TARGET = gendict 63APP1RPATH = NONE 64 65DEPOBJFILES = $(OBJ)$/gendict.obj 66APP1OBJS = $(DEPOBJFILES) 67 68APP1STDLIBS = $(SALLIB) 69 70# --- Targets ------------------------------------------------------ 71 72.IF "$(SYSTEM_ICU)" == "YES" 73GENCMN:=$(SYSTEM_GENCMN) 74GENBRK:=$(SYSTEM_GENBRK) 75GENCCODE:=$(SYSTEM_GENCCODE) 76.ELSE 77GENCMN:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/gencmn 78GENBRK:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/genbrk 79GENCCODE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/genccode 80.ENDIF 81 82.INCLUDE .IGNORE : icuversion.mk 83 84$(MISC)$/%.txt : data/%.txt 85# fdo#31271 ")" reclassified in more recent ICU/Unicode Standards 86.IF "$(ICU_MAJOR)" >= "5" || ("$(ICU_MAJOR)" == "4" && "$(ICU_MINOR)" >= "4") 87 $(SED) "s#\[:LineBreak = Close_Punctuation:\]#\[\[:LineBreak = Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@ 88.ELSE 89 $(COPY) $< $@ 90.ENDIF 91 92$(MISC)$/%.brk : $(MISC)/%.txt 93 $(WRAPCMD) $(GENBRK) -r $< -o $(MISC)$/$*.brk 94 95$(MISC)$/%_brk.c : $(MISC)$/%.brk 96 $(WRAPCMD) $(GENCCODE) -n OpenOffice -d $(MISC)$ $(MISC)$/$*.brk 97 98# 'gencmn', 'genbrk' and 'genccode' are tools generated and delivered by icu project to process icu breakiterator rules. 99# The output of gencmn generates warnings under Windows. We want to minimize the patches to external tools, 100# so the output (OpenOffice_icu_dat.c) is changed here to include a pragma to disable the warnings. 101# Output of gencmn is redirected to OpenOffice_icu_tmp.c with the -t switch. 102$(MISC)$/OpenOffice_%.c : $(MY_BRK_BRKFILES:s/.brk/_brk.c/) 103 $(WRAPCMD) $(GENCMN) -n OpenOffice -t tmp -S -d $(MISC) O $(mktmp $(subst,$(MISC)$/, $(MY_BRK_BRKFILES:t"\n"))) 104 echo $(USQ)#ifdef _MSC_VER$(USQ) > $@ 105 echo $(USQ)#pragma warning( disable : 4229 4668 )$(USQ) >> $@ 106 echo $(USQ)#endif$(USQ) >> $@ 107 $(TYPE) $(@:s/_dat/_tmp/) >> $@ 108 109.INCLUDE : target.mk 110 111