[Libreoffice-commits] .: i18nutil/inc i18nutil/Library_i18nutil.mk i18nutil/Makefile i18nutil/Module_i18nutil.mk i18nutil/Package_inc.mk i18nutil/prj i18nutil/source
Matus Kukan
mkukan at kemper.freedesktop.org
Tue Aug 2 14:19:52 PDT 2011
i18nutil/Library_i18nutil.mk | 54 ++++++++++++++++++++
i18nutil/Makefile | 38 ++++++++++++++
i18nutil/Module_i18nutil.mk | 35 +++++++++++++
i18nutil/Package_inc.mk | 37 ++++++++++++++
i18nutil/inc/i18nutil/casefolding.hxx | 3 -
i18nutil/inc/i18nutil/i18nutildllapi.h | 16 ++++++
i18nutil/inc/i18nutil/oneToOneMapping.hxx | 13 ++---
i18nutil/inc/i18nutil/unicode.hxx | 3 -
i18nutil/inc/i18nutil/widthfolding.hxx | 3 -
i18nutil/inc/i18nutil/x_rtl_ustring.h | 7 +-
i18nutil/prj/build.lst | 3 -
i18nutil/prj/d.lst | 14 -----
i18nutil/prj/makefile.mk | 40 +++++++++++++++
i18nutil/source/utility/makefile.mk | 78 ------------------------------
14 files changed, 238 insertions(+), 106 deletions(-)
New commits:
commit c45e4f6761741836484e43b8102fe11e34b83ee8
Author: Matúš Kukan <matus.kukan at gmail.com>
Date: Tue Aug 2 22:45:48 2011 +0200
convert i18nutil to gbuild
diff --git a/i18nutil/Library_i18nutil.mk b/i18nutil/Library_i18nutil.mk
new file mode 100644
index 0000000..65f7beb
--- /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 0000000..5bedaf0
--- /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 0000000..fbf1947
--- /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 0000000..05425d7
--- /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 12e3472..4d217aa 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 0000000..efb9f21
--- /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 5e84e37..a84540e 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 d8fcd06..e48dadf 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 7acefbb..094047a 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 07efa5d..8a0f865 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 55c86ad..67296ad 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 72625de..e69de29 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/prj/makefile.mk b/i18nutil/prj/makefile.mk
new file mode 100644
index 0000000..d30ff8a
--- /dev/null
+++ b/i18nutil/prj/makefile.mk
@@ -0,0 +1,40 @@
+#*************************************************************************
+#
+# 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
+#
+# 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.
+#
+#*************************************************************************
+
+PRJ=..
+TARGET=prj
+
+.INCLUDE : settings.mk
+
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/i18nutil/source/utility/makefile.mk b/i18nutil/source/utility/makefile.mk
deleted file mode 100644
index cece284..0000000
--- a/i18nutil/source/utility/makefile.mk
+++ /dev/null
@@ -1,78 +0,0 @@
-#*************************************************************************
-#*
-# 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
-#
-# 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.
-#
-#************************************************************************
-PRJ=..$/..
-
-PRJNAME=i18nutil
-TARGET=i18nutil
-LIBTARGET=NO
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/casefolding.obj
-
-SLOFILES= \
- $(EXCEPTIONSFILES) \
- $(SLO)$/unicode.obj \
- $(SLO)$/widthfolding.obj \
- $(SLO)$/oneToOneMapping.obj
-
-# Unicode utilities
-SHL1TARGET= $(TARGET)$(COMID)
-.IF "$(COM)" == "MSC"
-SHL1IMPLIB= i$(TARGET)
-.ELSE
-SHL1IMPLIB= $(TARGET)$(COMID)
-.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 >> $@
-
More information about the Libreoffice-commits
mailing list