diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2011-08-02 22:45:48 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2011-08-02 23:18:54 +0200 |
commit | 5c715d3708b6324a1d1a7d8b6607f9c92984a40f (patch) | |
tree | a8ba4dd25053cae3d5f81c88c30732c187a503bc | |
parent | 3f07bf808cf513f4d420470ea817d9c2785df5c1 (diff) |
convert i18nutil to gbuild
-rw-r--r-- | i18nutil/Library_i18nutil.mk | 54 | ||||
-rw-r--r-- | i18nutil/Makefile | 38 | ||||
-rw-r--r-- | i18nutil/Module_i18nutil.mk | 35 | ||||
-rw-r--r-- | i18nutil/Package_inc.mk | 37 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/casefolding.hxx | 3 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/i18nutildllapi.h | 16 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/oneToOneMapping.hxx | 13 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/unicode.hxx | 3 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/widthfolding.hxx | 3 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/x_rtl_ustring.h | 7 | ||||
-rw-r--r-- | i18nutil/prj/build.lst | 3 | ||||
-rw-r--r-- | i18nutil/prj/d.lst | 14 | ||||
-rw-r--r-- | i18nutil/prj/makefile.mk (renamed from i18nutil/source/utility/makefile.mk) | 60 |
13 files changed, 209 insertions, 77 deletions
diff --git a/i18nutil/Library_i18nutil.mk b/i18nutil/Library_i18nutil.mk new file mode 100644 index 000000000000..65f7beba6ed7 --- /dev/null +++ b/i18nutil/Library_i18nutil.mk @@ -0,0 +1,54 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,i18nutil)) + +$(eval $(call gb_Library_add_package_headers,i18nutil,i18nutil_inc)) + +$(eval $(call gb_Library_add_api,i18nutil,\ + udkapi \ + offapi \ +)) + +$(eval $(call gb_Library_add_defs,i18nutil,\ + -DI18NUTIL_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,i18nutil,\ + cppu \ + sal \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_Library_add_exception_objects,i18nutil,\ + i18nutil/source/utility/casefolding \ + i18nutil/source/utility/oneToOneMapping \ + i18nutil/source/utility/unicode \ + i18nutil/source/utility/widthfolding \ +)) + +# vim: set noet sw=4: diff --git a/i18nutil/Makefile b/i18nutil/Makefile new file mode 100644 index 000000000000..5bedaf0b9dcf --- /dev/null +++ b/i18nutil/Makefile @@ -0,0 +1,38 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) + +# vim: set noet sw=4 ts=4: diff --git a/i18nutil/Module_i18nutil.mk b/i18nutil/Module_i18nutil.mk new file mode 100644 index 000000000000..fbf194752f8a --- /dev/null +++ b/i18nutil/Module_i18nutil.mk @@ -0,0 +1,35 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Module_Module,i18nutil)) + +$(eval $(call gb_Module_add_targets,i18nutil,\ + Library_i18nutil \ + Package_inc \ +)) + +# vim: set noet sw=4: diff --git a/i18nutil/Package_inc.mk b/i18nutil/Package_inc.mk new file mode 100644 index 000000000000..05425d7892b7 --- /dev/null +++ b/i18nutil/Package_inc.mk @@ -0,0 +1,37 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,i18nutil_inc,$(SRCDIR)/i18nutil/inc)) + +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/i18nutildllapi.h,i18nutil/i18nutildllapi.h)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/casefolding.hxx,i18nutil/casefolding.hxx)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/oneToOneMapping.hxx,i18nutil/oneToOneMapping.hxx)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/unicode.hxx,i18nutil/unicode.hxx)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/widthfolding.hxx,i18nutil/widthfolding.hxx)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/x_rtl_ustring.h,i18nutil/x_rtl_ustring.h)) + +# vim: set noet sw=4: diff --git a/i18nutil/inc/i18nutil/casefolding.hxx b/i18nutil/inc/i18nutil/casefolding.hxx index 941b3772e5e0..f11d480e3b1f 100644 --- a/i18nutil/inc/i18nutil/casefolding.hxx +++ b/i18nutil/inc/i18nutil/casefolding.hxx @@ -32,6 +32,7 @@ #include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/uno/RuntimeException.hpp> +#include "i18nutildllapi.h" namespace com { namespace sun { namespace star { namespace i18n { @@ -71,7 +72,7 @@ struct MappingElement sal_Int8 current; }; -class casefolding +class I18NUTIL_DLLPUBLIC casefolding { public: static Mapping& getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, com::sun::star::lang::Locale& aLocale, sal_uInt8 nMappingType) throw (com::sun::star::uno::RuntimeException); diff --git a/i18nutil/inc/i18nutil/i18nutildllapi.h b/i18nutil/inc/i18nutil/i18nutildllapi.h new file mode 100644 index 000000000000..efb9f21efa6c --- /dev/null +++ b/i18nutil/inc/i18nutil/i18nutildllapi.h @@ -0,0 +1,16 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +#ifndef INCLUDED_I18NUTILDLLAPI_H +#define INCLUDED_I18NUTILDLLAPI_H + +#include "sal/types.h" + +#if defined(I18NUTIL_DLLIMPLEMENTATION) +#define I18NUTIL_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define I18NUTIL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif +#define I18NUTIL_DLLPRIVATE SAL_DLLPRIVATE + +#endif /* INCLUDED_I18NUTILDLLAPI_H */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18nutil/inc/i18nutil/oneToOneMapping.hxx b/i18nutil/inc/i18nutil/oneToOneMapping.hxx index 9ad5cb1256a2..a0ec1861c8d3 100644 --- a/i18nutil/inc/i18nutil/oneToOneMapping.hxx +++ b/i18nutil/inc/i18nutil/oneToOneMapping.hxx @@ -30,6 +30,7 @@ #include <utility> #include <rtl/ustring.hxx> +#include "i18nutildllapi.h" namespace com { namespace sun { namespace star { namespace i18n { @@ -47,12 +48,12 @@ typedef struct _UnicodePairWithFlag UnicodePairFlag flag; } UnicodePairWithFlag; -class oneToOneMapping +class I18NUTIL_DLLPUBLIC oneToOneMapping { private: // no copy, no substitution - oneToOneMapping( const oneToOneMapping& ); - oneToOneMapping& operator=( const oneToOneMapping& ); + I18NUTIL_DLLPRIVATE oneToOneMapping( const oneToOneMapping& ); + I18NUTIL_DLLPRIVATE oneToOneMapping& operator=( const oneToOneMapping& ); public: oneToOneMapping( OneToOneMappingTable_t *rpTable, const size_t rnSize, const size_t rnUnitSize = sizeof(OneToOneMappingTable_t) ); virtual ~oneToOneMapping(); @@ -68,14 +69,14 @@ protected: size_t mnSize; }; -class oneToOneMappingWithFlag : public oneToOneMapping +class I18NUTIL_DLLPUBLIC oneToOneMappingWithFlag : public oneToOneMapping { friend class widthfolding; private: // no copy, no substitution - oneToOneMappingWithFlag( const oneToOneMappingWithFlag& ); - oneToOneMappingWithFlag& operator=( const oneToOneMappingWithFlag& ); + I18NUTIL_DLLPRIVATE oneToOneMappingWithFlag( const oneToOneMappingWithFlag& ); + I18NUTIL_DLLPRIVATE oneToOneMappingWithFlag& operator=( const oneToOneMappingWithFlag& ); public: oneToOneMappingWithFlag( UnicodePairWithFlag *rpTableWF, const size_t rnSize, const UnicodePairFlag rnFlag ); virtual ~oneToOneMappingWithFlag(); diff --git a/i18nutil/inc/i18nutil/unicode.hxx b/i18nutil/inc/i18nutil/unicode.hxx index d6b33f188389..f865552f1709 100644 --- a/i18nutil/inc/i18nutil/unicode.hxx +++ b/i18nutil/inc/i18nutil/unicode.hxx @@ -30,6 +30,7 @@ #include <com/sun/star/i18n/UnicodeScript.hpp> #include <sal/types.h> +#include "i18nutildllapi.h" typedef struct _ScriptTypeList { sal_Int16 from; @@ -37,7 +38,7 @@ typedef struct _ScriptTypeList { sal_Int16 value; } ScriptTypeList; -class unicode +class I18NUTIL_DLLPUBLIC unicode { public: diff --git a/i18nutil/inc/i18nutil/widthfolding.hxx b/i18nutil/inc/i18nutil/widthfolding.hxx index 337fa34cad37..edb69058639b 100644 --- a/i18nutil/inc/i18nutil/widthfolding.hxx +++ b/i18nutil/inc/i18nutil/widthfolding.hxx @@ -31,12 +31,13 @@ #include <sal/types.h> #include <com/sun/star/uno/Sequence.hxx> #include <i18nutil/oneToOneMapping.hxx> +#include "i18nutildllapi.h" namespace com { namespace sun { namespace star { namespace i18n { #define WIDTHFOLDNIG_DONT_USE_COMBINED_VU 0x01 -class widthfolding +class I18NUTIL_DLLPUBLIC widthfolding { public: static oneToOneMapping& getfull2halfTable(); diff --git a/i18nutil/inc/i18nutil/x_rtl_ustring.h b/i18nutil/inc/i18nutil/x_rtl_ustring.h index 330c6bce3d6b..6b644afd1691 100644 --- a/i18nutil/inc/i18nutil/x_rtl_ustring.h +++ b/i18nutil/inc/i18nutil/x_rtl_ustring.h @@ -33,6 +33,7 @@ #endif #include <rtl/memory.h> #include <rtl/alloc.h> +#include "i18nutildllapi.h" /** @@ -44,14 +45,14 @@ * @param [output] newStr * @param [input] nLen */ -inline void SAL_CALL x_rtl_uString_new_WithLength( rtl_uString ** newStr, sal_Int32 nLen, sal_Int32 _refCount = 0 ) +I18NUTIL_DLLPUBLIC inline void SAL_CALL x_rtl_uString_new_WithLength( rtl_uString ** newStr, sal_Int32 nLen, sal_Int32 _refCount = 0 ) { *newStr = (rtl_uString*) rtl_allocateMemory ( sizeof(rtl_uString) + sizeof(sal_Unicode) * nLen); (*newStr)->refCount = _refCount; (*newStr)->length = nLen; } -inline rtl_uString * SAL_CALL x_rtl_uString_new_WithLength( sal_Int32 nLen, sal_Int32 _refCount = 0 ) +I18NUTIL_DLLPUBLIC inline rtl_uString * SAL_CALL x_rtl_uString_new_WithLength( sal_Int32 nLen, sal_Int32 _refCount = 0 ) { rtl_uString *newStr = (rtl_uString*) rtl_allocateMemory ( sizeof(rtl_uString) + sizeof(sal_Unicode) * nLen); newStr->refCount = _refCount; @@ -62,7 +63,7 @@ inline rtl_uString * SAL_CALL x_rtl_uString_new_WithLength( sal_Int32 nLen, sal_ /** * Release <code>rtl_uString</code> regardless its reference count. */ -inline void SAL_CALL x_rtl_uString_release( rtl_uString * value ) +I18NUTIL_DLLPUBLIC inline void SAL_CALL x_rtl_uString_release( rtl_uString * value ) { rtl_freeMemory(value); } diff --git a/i18nutil/prj/build.lst b/i18nutil/prj/build.lst index 55c86ad3038f..67296ade20d6 100644 --- a/i18nutil/prj/build.lst +++ b/i18nutil/prj/build.lst @@ -1,3 +1,2 @@ inu i18nutil : sal cppu offapi NULL -inu i18nutil usr1 - all inu_mkout NULL -inu i18nutil\source\utility nmake - all inu_utility NULL +inu i18nutil\prj nmake - all inu_prj NULL diff --git a/i18nutil/prj/d.lst b/i18nutil/prj/d.lst index 72625de7e392..e69de29bb2d1 100644 --- a/i18nutil/prj/d.lst +++ b/i18nutil/prj/d.lst @@ -1,14 +0,0 @@ - -mkdir: %_DEST%\inc\i18nutil - -..\inc\i18nutil\casefolding.hxx %_DEST%\inc\i18nutil\casefolding.hxx -..\inc\i18nutil\oneToOneMapping.hxx %_DEST%\inc\i18nutil\oneToOneMapping.hxx -..\inc\i18nutil\unicode.hxx %_DEST%\inc\i18nutil\unicode.hxx -..\inc\i18nutil\widthfolding.hxx %_DEST%\inc\i18nutil\widthfolding.hxx -..\inc\i18nutil\x_rtl_ustring.h %_DEST%\inc\i18nutil\x_rtl_ustring.h - -..\%__SRC%\bin\i18nutil*.dll %_DEST%\bin\i18nutil*.dll -..\%__SRC%\lib\libi18nutil*.so %_DEST%\lib\libi18nutil*.so -..\%__SRC%\lib\libi18nutil*.dylib %_DEST%\lib\libi18nutil*.dylib -..\%__SRC%\lib\libi18nutil*.a %_DEST%\lib\libi18nutil*.a -..\%__SRC%\lib\ii18nutil.lib %_DEST%\lib\ii18nutil.lib diff --git a/i18nutil/source/utility/makefile.mk b/i18nutil/prj/makefile.mk index cece2847e9b1..d30ff8a47e6b 100644 --- a/i18nutil/source/utility/makefile.mk +++ b/i18nutil/prj/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* -#* +# # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite @@ -23,56 +23,18 @@ # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # -#************************************************************************ -PRJ=..$/.. - -PRJNAME=i18nutil -TARGET=i18nutil -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- +#************************************************************************* -EXCEPTIONSFILES= \ - $(SLO)$/casefolding.obj +PRJ=.. +TARGET=prj -SLOFILES= \ - $(EXCEPTIONSFILES) \ - $(SLO)$/unicode.obj \ - $(SLO)$/widthfolding.obj \ - $(SLO)$/oneToOneMapping.obj +.INCLUDE : settings.mk -# Unicode utilities -SHL1TARGET= $(TARGET)$(COMID) -.IF "$(COM)" == "MSC" -SHL1IMPLIB= i$(TARGET) +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := .ELSE -SHL1IMPLIB= $(TARGET)$(COMID) +VERBOSEFLAG := -s .ENDIF -DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) -DEFLIB1NAME= $(SHL1TARGET) - -SHL1OBJS= $(SLOFILES) - -LIB1TARGET= $(SLB)$/$(SHL1TARGET).lib -LIB1OBJFILES=$(SHL1OBJS) - -SHL1STDLIBS= \ - $(CPPULIB) \ - $(SALLIB) - -# --- Targets ------------------------------------------------------ -.INCLUDE : target.mk - -$(MISC)$/$(SHL1TARGET).flt: makefile.mk - @echo ------------------------------ - @echo Making: $@ - @echo CLEAR_THE_FILE > $@ - @echo __CT >> $@ - +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog |