[Libreoffice-commits] core.git: Branch 'aoo/trunk' - Module_ooo.mk store/inc store/Library_store.mk store/Makefile store/Module_store.mk store/Package_inc.mk store/Package_xml.mk store/prj store/source

Damjan Jovanovic damjan at apache.org
Fri Mar 23 01:09:20 UTC 2018


 Module_ooo.mk            |    1 
 store/Library_store.mk   |   60 +++++++++++++++++++++++++++++++++++++++++++++++
 store/Makefile           |   32 +++++++++++++++++++++++++
 store/Module_store.mk    |   32 +++++++++++++++++++++++++
 store/Package_inc.mk     |   29 ++++++++++++++++++++++
 store/Package_xml.mk     |   26 ++++++++++++++++++++
 store/inc/store/dllapi.h |   36 ++++++++++++++++++++++++++++
 store/prj/build.lst      |    5 ---
 store/prj/d.lst          |   14 ----------
 store/prj/makefile.mk    |   44 ++++++++++++++++++++++++++++++++++
 store/source/store.cxx   |   51 ++++++++++++++++++++-------------------
 11 files changed, 287 insertions(+), 43 deletions(-)

New commits:
commit 5834b49bda6a4a8fbca19a0dc38f5ad4f4f16f53
Author: Damjan Jovanovic <damjan at apache.org>
Date:   Fri Mar 23 00:18:40 2018 +0000

    Port main/store to gbuild.
    
    Patch by: me

diff --git a/Module_ooo.mk b/Module_ooo.mk
index e01beeae1d80..3ca9deb8ed6b 100644
--- a/Module_ooo.mk
+++ b/Module_ooo.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
     slideshow \
     sot \
     starmath \
+    store \
     svgio \
     svl \
     svtools \
diff --git a/store/Library_store.mk b/store/Library_store.mk
new file mode 100644
index 000000000000..d0ab42300e18
--- /dev/null
+++ b/store/Library_store.mk
@@ -0,0 +1,60 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+
+
+$(eval $(call gb_Library_Library,store))
+
+$(eval $(call gb_Library_add_precompiled_header,store,$(SRCDIR)/store/inc/pch/precompiled_store))
+
+$(eval $(call gb_Library_set_versionmap,store,$(SRCDIR)/store/util/store.map))
+
+$(eval $(call gb_Library_set_include,store,\
+        $$(INCLUDE) \
+	-I$(SRCDIR)/store/inc \
+	-I$(SRCDIR)/store/inc/pch \
+))
+
+$(eval $(call gb_Library_add_defs,store,\
+	-DSTORE_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,store,\
+	sal \
+	$(gb_STDLIBS) \
+))
+
+
+$(eval $(call gb_Library_add_noexception_objects,store,\
+	store/source/object \
+	store/source/lockbyte \
+	store/source/storbase \
+	store/source/storbios \
+	store/source/storcach \
+	store/source/stordata \
+	store/source/stordir \
+	store/source/storlckb \
+	store/source/stortree \
+	store/source/storpage \
+	store/source/store \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/store/Makefile b/store/Makefile
new file mode 100644
index 000000000000..c1d144cbd4c9
--- /dev/null
+++ b/store/Makefile
@@ -0,0 +1,32 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the 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/store/Module_store.mk b/store/Module_store.mk
new file mode 100644
index 000000000000..1da703ced721
--- /dev/null
+++ b/store/Module_store.mk
@@ -0,0 +1,32 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+
+
+$(eval $(call gb_Module_Module,store))
+
+$(eval $(call gb_Module_add_targets,store,\
+	Library_store \
+	Package_inc \
+	Package_xml \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/store/Package_inc.mk b/store/Package_inc.mk
new file mode 100644
index 000000000000..8609c1b9021b
--- /dev/null
+++ b/store/Package_inc.mk
@@ -0,0 +1,29 @@
+###############################################################
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+###############################################################
+
+
+
+$(eval $(call gb_Package_Package,store_inc,$(SRCDIR)/store/inc))
+
+$(eval $(call gb_Package_add_file,store_inc,inc/store/dllapi.h,store/dllapi.h))
+$(eval $(call gb_Package_add_file,store_inc,inc/store/store.h,store/store.h))
+$(eval $(call gb_Package_add_file,store_inc,inc/store/store.hxx,store/store.hxx))
+$(eval $(call gb_Package_add_file,store_inc,inc/store/types.h,store/types.h))
diff --git a/store/Package_xml.mk b/store/Package_xml.mk
new file mode 100644
index 000000000000..07e3a57530b1
--- /dev/null
+++ b/store/Package_xml.mk
@@ -0,0 +1,26 @@
+###############################################################
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+###############################################################
+
+
+
+$(eval $(call gb_Package_Package,store_xml,$(SRCDIR)/store/util))
+
+$(eval $(call gb_Package_add_file,store_xml,xml/store.xml,store.xml))
diff --git a/store/inc/store/dllapi.h b/store/inc/store/dllapi.h
new file mode 100644
index 000000000000..631589cb4972
--- /dev/null
+++ b/store/inc/store/dllapi.h
@@ -0,0 +1,36 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+
+#ifndef STORE_DLLAPI_H
+#define STORE_DLLAPI_H
+
+#include "sal/config.h"
+#include "sal/types.h"
+
+#if defined STORE_DLLIMPLEMENTATION
+#define STORE_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define STORE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+#endif
diff --git a/store/prj/build.lst b/store/prj/build.lst
index 938d95ebc029..8f9f8662ad5b 100644
--- a/store/prj/build.lst
+++ b/store/prj/build.lst
@@ -1,5 +1,2 @@
 s8	store	:	sal NULL
-s8	store									usr1	-	all	s8_mkout NULL
-s8	store\inc								nmake	-	all	s8_inc NULL
-s8	store\source							nmake	-	all	s8_source s8_inc NULL
-s8	store\util								nmake	-	all	s8_util s8_source NULL
+s8	store\prj							nmake	-	all	s8_prj NULL
diff --git a/store/prj/d.lst b/store/prj/d.lst
index 0b5e2739aaa6..e69de29bb2d1 100644
--- a/store/prj/d.lst
+++ b/store/prj/d.lst
@@ -1,14 +0,0 @@
-mkdir: %_DEST%\inc%_EXT%\store
-..\inc\store\*.h %_DEST%\inc%_EXT%\store\*.h
-..\inc\store\store.hxx %_DEST%\inc%_EXT%\store\store.hxx
-..\inc\store\store.inl %_DEST%\inc%_EXT%\store\store.inl
-..\util\store.xml %_DEST%\xml%_EXT%\store.xml
-
-..\%__SRC%\lib\istore.lib %_DEST%\lib%_EXT%\istore.lib
-..\%__SRC%\lib\store*.lib %_DEST%\lib%_EXT%\store*.lib
-..\%__SRC%\lib\libstore.*.* %_DEST%\lib%_EXT%\*
-..\%__SRC%\bin\sto*.dll %_DEST%\bin%_EXT%\sto*.dll
-
-
-
-linklib: libstore.*.*
diff --git a/store/prj/makefile.mk b/store/prj/makefile.mk
new file mode 100644
index 000000000000..c62c6a657d16
--- /dev/null
+++ b/store/prj/makefile.mk
@@ -0,0 +1,44 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+
+
+PRJ=..
+TARGET=prj
+
+.INCLUDE : settings.mk
+
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+.IF "$(DEBUG)"!=""
+DEBUG_ARGUMENT=DEBUG=$(DEBUG)
+.ELIF "$(debug)"!=""
+DEBUG_ARGUMENT=debug=$(debug)
+.ELSE
+DEBUG_ARGUMENT=
+.ENDIF
+
+all:
+    cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/store/source/store.cxx b/store/source/store.cxx
index 90789d631653..2b49ee9f460e 100644
--- a/store/source/store.cxx
+++ b/store/source/store.cxx
@@ -25,6 +25,7 @@
 #include "precompiled_store.hxx"
 
 #include "store/store.h"
+#include "store/dllapi.h"
 
 #include <sal/types.h>
 #include <rtl/memory.h>
@@ -74,7 +75,7 @@ using namespace store;
 /*
  * store_acquireHandle.
  */
-storeError SAL_CALL store_acquireHandle (
+STORE_DLLPUBLIC storeError SAL_CALL store_acquireHandle (
     storeHandle Handle
 ) SAL_THROW_EXTERN_C()
 {
@@ -89,7 +90,7 @@ storeError SAL_CALL store_acquireHandle (
 /*
  * store_releaseHandle.
  */
-storeError SAL_CALL store_releaseHandle (
+STORE_DLLPUBLIC storeError SAL_CALL store_releaseHandle (
     storeHandle Handle
 ) SAL_THROW_EXTERN_C()
 {
@@ -109,7 +110,7 @@ storeError SAL_CALL store_releaseHandle (
 /*
  * store_createMemoryFile.
  */
-storeError SAL_CALL store_createMemoryFile (
+STORE_DLLPUBLIC storeError SAL_CALL store_createMemoryFile (
     sal_uInt16       nPageSize,
     storeFileHandle *phFile
 ) SAL_THROW_EXTERN_C()
@@ -143,7 +144,7 @@ storeError SAL_CALL store_createMemoryFile (
 /*
  * store_openFile.
  */
-storeError SAL_CALL store_openFile (
+STORE_DLLPUBLIC storeError SAL_CALL store_openFile (
     rtl_uString     *pFilename,
     storeAccessMode  eAccessMode,
     sal_uInt16       nPageSize,
@@ -181,7 +182,7 @@ storeError SAL_CALL store_openFile (
 /*
  * store_closeFile.
  */
-storeError SAL_CALL store_closeFile (
+STORE_DLLPUBLIC storeError SAL_CALL store_closeFile (
     storeFileHandle Handle
 ) SAL_THROW_EXTERN_C()
 {
@@ -198,7 +199,7 @@ storeError SAL_CALL store_closeFile (
 /*
  * store_flushFile.
  */
-storeError SAL_CALL store_flushFile (
+STORE_DLLPUBLIC storeError SAL_CALL store_flushFile (
     storeFileHandle Handle
 ) SAL_THROW_EXTERN_C()
 {
@@ -213,7 +214,7 @@ storeError SAL_CALL store_flushFile (
 /*
  * store_getFileRefererCount.
  */
-storeError SAL_CALL store_getFileRefererCount (
+STORE_DLLPUBLIC storeError SAL_CALL store_getFileRefererCount (
     storeFileHandle  Handle,
     sal_uInt32      *pnRefCount
 ) SAL_THROW_EXTERN_C()
@@ -233,7 +234,7 @@ storeError SAL_CALL store_getFileRefererCount (
 /*
  * store_getFileSize.
  */
-storeError SAL_CALL store_getFileSize (
+STORE_DLLPUBLIC storeError SAL_CALL store_getFileSize (
     storeFileHandle  Handle,
     sal_uInt32      *pnSize
 ) SAL_THROW_EXTERN_C()
@@ -252,7 +253,7 @@ storeError SAL_CALL store_getFileSize (
 /*
  * store_rebuildFile.
  */
-storeError SAL_CALL store_rebuildFile (
+STORE_DLLPUBLIC storeError SAL_CALL store_rebuildFile (
     rtl_uString *pSrcFilename,
     rtl_uString *pDstFilename
 ) SAL_THROW_EXTERN_C()
@@ -289,7 +290,7 @@ storeError SAL_CALL store_rebuildFile (
 /*
  * store_openDirectory.
  */
-storeError SAL_CALL store_openDirectory (
+STORE_DLLPUBLIC storeError SAL_CALL store_openDirectory (
     storeFileHandle       hFile,
     rtl_uString          *pPath,
     rtl_uString          *pName,
@@ -329,7 +330,7 @@ storeError SAL_CALL store_openDirectory (
 /*
  * store_closeDirectory.
  */
-storeError SAL_CALL store_closeDirectory (
+STORE_DLLPUBLIC storeError SAL_CALL store_closeDirectory (
     storeDirectoryHandle Handle
 ) SAL_THROW_EXTERN_C()
 {
@@ -345,7 +346,7 @@ storeError SAL_CALL store_closeDirectory (
 /*
  * store_findFirst.
  */
-storeError SAL_CALL store_findFirst (
+STORE_DLLPUBLIC storeError SAL_CALL store_findFirst (
     storeDirectoryHandle  Handle,
     storeFindData        *pFindData
 ) SAL_THROW_EXTERN_C()
@@ -369,7 +370,7 @@ storeError SAL_CALL store_findFirst (
 /*
  * store_findNext.
  */
-storeError SAL_CALL store_findNext (
+STORE_DLLPUBLIC storeError SAL_CALL store_findNext (
     storeDirectoryHandle  Handle,
     storeFindData        *pFindData
 ) SAL_THROW_EXTERN_C()
@@ -399,7 +400,7 @@ storeError SAL_CALL store_findNext (
 /*
  * store_openStream
  */
-storeError SAL_CALL store_openStream (
+STORE_DLLPUBLIC storeError SAL_CALL store_openStream (
     storeFileHandle    hFile,
     rtl_uString       *pPath,
     rtl_uString       *pName,
@@ -439,7 +440,7 @@ storeError SAL_CALL store_openStream (
 /*
  * store_closeStream.
  */
-storeError SAL_CALL store_closeStream (
+STORE_DLLPUBLIC storeError SAL_CALL store_closeStream (
     storeStreamHandle Handle
 ) SAL_THROW_EXTERN_C()
 {
@@ -455,7 +456,7 @@ storeError SAL_CALL store_closeStream (
 /*
  * store_readStream.
  */
-storeError SAL_CALL store_readStream (
+STORE_DLLPUBLIC storeError SAL_CALL store_readStream (
     storeStreamHandle  Handle,
     sal_uInt32         nOffset,
     void              *pBuffer,
@@ -477,7 +478,7 @@ storeError SAL_CALL store_readStream (
 /*
  * store_writeStream.
  */
-storeError SAL_CALL store_writeStream (
+STORE_DLLPUBLIC storeError SAL_CALL store_writeStream (
     storeStreamHandle  Handle,
     sal_uInt32         nOffset,
     const void        *pBuffer,
@@ -499,7 +500,7 @@ storeError SAL_CALL store_writeStream (
 /*
  * store_flushStream.
  */
-storeError SAL_CALL store_flushStream (
+STORE_DLLPUBLIC storeError SAL_CALL store_flushStream (
     storeStreamHandle Handle
 ) SAL_THROW_EXTERN_C()
 {
@@ -514,7 +515,7 @@ storeError SAL_CALL store_flushStream (
 /*
  * store_getStreamSize.
  */
-storeError SAL_CALL store_getStreamSize (
+STORE_DLLPUBLIC storeError SAL_CALL store_getStreamSize (
     storeStreamHandle  Handle,
     sal_uInt32        *pnSize
 ) SAL_THROW_EXTERN_C()
@@ -533,7 +534,7 @@ storeError SAL_CALL store_getStreamSize (
 /*
  * store_setStreamSize.
  */
-storeError SAL_CALL store_setStreamSize (
+STORE_DLLPUBLIC storeError SAL_CALL store_setStreamSize (
     storeStreamHandle Handle,
     sal_uInt32        nSize
 ) SAL_THROW_EXTERN_C()
@@ -554,7 +555,7 @@ storeError SAL_CALL store_setStreamSize (
 /*
  * store_attrib.
  */
-storeError SAL_CALL store_attrib (
+STORE_DLLPUBLIC storeError SAL_CALL store_attrib (
     storeFileHandle Handle,
     rtl_uString    *pPath,
     rtl_uString    *pName,
@@ -595,7 +596,7 @@ storeError SAL_CALL store_attrib (
 /*
  * store_link.
  */
-storeError SAL_CALL store_link (
+STORE_DLLPUBLIC storeError SAL_CALL store_link (
     storeFileHandle Handle,
     rtl_uString *pSrcPath, rtl_uString *pSrcName,
     rtl_uString *pDstPath, rtl_uString *pDstName
@@ -645,7 +646,7 @@ storeError SAL_CALL store_link (
 /*
  * store_symlink.
  */
-storeError SAL_CALL store_symlink (
+STORE_DLLPUBLIC storeError SAL_CALL store_symlink (
     storeFileHandle Handle,
     rtl_uString *pSrcPath, rtl_uString *pSrcName,
     rtl_uString *pDstPath, rtl_uString *pDstName
@@ -688,7 +689,7 @@ storeError SAL_CALL store_symlink (
 /*
  * store_rename.
  */
-storeError SAL_CALL store_rename (
+STORE_DLLPUBLIC storeError SAL_CALL store_rename (
     storeFileHandle Handle,
     rtl_uString *pSrcPath, rtl_uString *pSrcName,
     rtl_uString *pDstPath, rtl_uString *pDstName
@@ -731,7 +732,7 @@ storeError SAL_CALL store_rename (
 /*
  * store_remove.
  */
-storeError SAL_CALL store_remove (
+STORE_DLLPUBLIC storeError SAL_CALL store_remove (
     storeFileHandle Handle,
     rtl_uString    *pPath,
     rtl_uString    *pName


More information about the Libreoffice-commits mailing list