summaryrefslogtreecommitdiff
path: root/libwps
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-09-04 12:55:40 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-09-08 12:49:24 +0200
commit71a3db78930b7b804231e2a6c576cad672d39c8d (patch)
tree4d01a87feabd53258930250a92f89a6ae68fc4c3 /libwps
parent97ed2616bdc104a86655f4f629870193a6b222ce (diff)
libwps: convert to gbuild
Change-Id: I8f5312d9751d4bc4f26feb1d58b1c4b3184441c0
Diffstat (limited to 'libwps')
-rw-r--r--libwps/Makefile7
-rw-r--r--libwps/Module_libwps.mk22
-rw-r--r--libwps/Package_libwps.mk19
-rw-r--r--libwps/StaticLibrary_wps.mk46
-rw-r--r--libwps/UnpackedTarball_wps.mk14
-rw-r--r--libwps/makefile.mk62
-rw-r--r--libwps/prj/d.lst5
-rw-r--r--libwps/prj/dmake0
8 files changed, 108 insertions, 67 deletions
diff --git a/libwps/Makefile b/libwps/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/libwps/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/libwps/Module_libwps.mk b/libwps/Module_libwps.mk
new file mode 100644
index 000000000000..aacdb0e274b5
--- /dev/null
+++ b/libwps/Module_libwps.mk
@@ -0,0 +1,22 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,libwps))
+
+ifeq ($(SYSTEM_LIBWPS),NO)
+
+$(eval $(call gb_Module_add_targets,libwps,\
+ Package_libwps \
+ StaticLibrary_wps \
+ UnpackedTarball_wps \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/libwps/Package_libwps.mk b/libwps/Package_libwps.mk
new file mode 100644
index 000000000000..6ebee913b92d
--- /dev/null
+++ b/libwps/Package_libwps.mk
@@ -0,0 +1,19 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Package_Package,libwps_inc,$(call gb_UnpackedTarball_get_dir,wps/src/lib)))
+
+$(eval $(call gb_Package_use_unpacked,libwps_inc,wps))
+
+$(eval $(call gb_Package_add_files,libwps_inc,inc/external/libwps,\
+ libwps.h \
+ WPSDocument.h \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/libwps/StaticLibrary_wps.mk b/libwps/StaticLibrary_wps.mk
new file mode 100644
index 000000000000..150d8cd98f05
--- /dev/null
+++ b/libwps/StaticLibrary_wps.mk
@@ -0,0 +1,46 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,wpslib))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,wpslib))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,wpslib,wps))
+
+$(eval $(call gb_StaticLibrary_use_package,wpslib,libwps_inc))
+
+$(eval $(call gb_StaticLibrary_use_externals,wpslib,\
+ wpd \
+))
+
+$(eval $(call gb_StaticLibrary_set_cxx_suffix,wpslib,cpp))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,wpslib,\
+ UnpackedTarball/wps/src/lib/libwps_internal \
+ UnpackedTarball/wps/src/lib/libwps_tools_win \
+ UnpackedTarball/wps/src/lib/WPS4 \
+ UnpackedTarball/wps/src/lib/WPS4Graph \
+ UnpackedTarball/wps/src/lib/WPS4Text \
+ UnpackedTarball/wps/src/lib/WPS8 \
+ UnpackedTarball/wps/src/lib/WPSCell \
+ UnpackedTarball/wps/src/lib/WPSContentListener \
+ UnpackedTarball/wps/src/lib/WPSDebug \
+ UnpackedTarball/wps/src/lib/WPSDocument \
+ UnpackedTarball/wps/src/lib/WPSHeader \
+ UnpackedTarball/wps/src/lib/WPSList \
+ UnpackedTarball/wps/src/lib/WPSOLEParser \
+ UnpackedTarball/wps/src/lib/WPSOLEStream \
+ UnpackedTarball/wps/src/lib/WPSPageSpan \
+ UnpackedTarball/wps/src/lib/WPSParagraph \
+ UnpackedTarball/wps/src/lib/WPSParser \
+ UnpackedTarball/wps/src/lib/WPSSubDocument \
+ UnpackedTarball/wps/src/lib/WPSTable \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/libwps/UnpackedTarball_wps.mk b/libwps/UnpackedTarball_wps.mk
new file mode 100644
index 000000000000..c5698f7fc94a
--- /dev/null
+++ b/libwps/UnpackedTarball_wps.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,wps))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,wps,$(WPS_TARBALL)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/libwps/makefile.mk b/libwps/makefile.mk
deleted file mode 100644
index cea290effc2f..000000000000
--- a/libwps/makefile.mk
+++ /dev/null
@@ -1,62 +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=wps
-TARGET=wps
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(SYSTEM_LIBWPS)" == "YES"
-@all:
- @echo "Using system libwps..."
-.ENDIF
-
-# libwps depends on the libwpd framework
-.IF "$(SYSTEM_LIBWPD)" == "YES"
-INCPRE+=$(WPD_CFLAGS)
-.ELSE
-INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd
-INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd-stream
-.ENDIF
-
-TARFILE_NAME=libwps-0.2.7
-TARFILE_MD5=d197bd6211669a2fa4ca648faf04bcb1
-
-BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
-BUILD_DIR=src/lib
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_ext.mk
diff --git a/libwps/prj/d.lst b/libwps/prj/d.lst
index 3923a1834f85..e69de29bb2d1 100644
--- a/libwps/prj/d.lst
+++ b/libwps/prj/d.lst
@@ -1,5 +0,0 @@
-mkdir: %_DEST%\inc\libwps
-..\%__SRC%\misc\build\libwps*\src\lib\libwps.h %_DEST%\inc\libwps\
-..\%__SRC%\misc\build\libwps*\src\lib\WPSDocument.h %_DEST%\inc\libwps\
-..\%__SRC%\lib\*.a %_DEST%\lib\*.a
-..\%__SRC%\slb\*.lib %_DEST%\lib\*.lib
diff --git a/libwps/prj/dmake b/libwps/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/libwps/prj/dmake
+++ /dev/null