summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-06-03 12:29:36 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-03 16:26:30 +0200
commitc567806c23aeaa361662f58c261093950ea40b99 (patch)
treea0bb5ea84a3ff6f4e332ff9c240e093c67488e45 /sw
parent268f27f6623334b81762b068f842c944a7541f25 (diff)
sw_rtfexport: use a template for makefiles
in order to remove duplicated code Change-Id: Ic1e7d331b14f74051ed23bf6c7e64016eca61206 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116651 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/CppunitTest_sw_rtfexport.mk48
-rw-r--r--sw/CppunitTest_sw_rtfexport2.mk49
-rw-r--r--sw/CppunitTest_sw_rtfexport3.mk47
-rw-r--r--sw/CppunitTest_sw_rtfexport4.mk48
-rw-r--r--sw/CppunitTest_sw_rtfexport5.mk49
-rw-r--r--sw/Module_sw.mk1
-rw-r--r--sw/rtfexport_setup.mk67
7 files changed, 74 insertions, 235 deletions
diff --git a/sw/CppunitTest_sw_rtfexport.mk b/sw/CppunitTest_sw_rtfexport.mk
index f8ca21aa1f47..9205361329ed 100644
--- a/sw/CppunitTest_sw_rtfexport.mk
+++ b/sw/CppunitTest_sw_rtfexport.mk
@@ -9,51 +9,7 @@
#
#*************************************************************************
-$(eval $(call gb_CppunitTest_CppunitTest,sw_rtfexport))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_rtfexport))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sw_rtfexport, \
- sw/qa/extras/rtfexport/rtfexport \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sw_rtfexport, \
- comphelper \
- cppu \
- cppuhelper \
- sal \
- sfx \
- sw \
- swqahelper \
- test \
- unotest \
- utl \
- tl \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,sw_rtfexport,\
- boost_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sw_rtfexport,\
- -I$(SRCDIR)/sw/inc \
- -I$(SRCDIR)/sw/source/core/inc \
- -I$(SRCDIR)/sw/qa/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_api,sw_rtfexport,\
- udkapi \
- offapi \
- oovbaapi \
-))
-
-$(eval $(call gb_CppunitTest_use_ure,sw_rtfexport))
-$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport))
-
-$(eval $(call gb_CppunitTest_use_rdb,sw_rtfexport,services))
-
-$(eval $(call gb_CppunitTest_use_configuration,sw_rtfexport))
+# empty second argument (i.e. no 1)
+$(eval $(call sw_rtfexport_test,))
# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_rtfexport2.mk b/sw/CppunitTest_sw_rtfexport2.mk
index d507d4e50287..3109ab9a5e25 100644
--- a/sw/CppunitTest_sw_rtfexport2.mk
+++ b/sw/CppunitTest_sw_rtfexport2.mk
@@ -9,53 +9,6 @@
#
#*************************************************************************
-$(eval $(call gb_CppunitTest_CppunitTest,sw_rtfexport2))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_rtfexport2))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sw_rtfexport2, \
- sw/qa/extras/rtfexport/rtfexport2 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sw_rtfexport2, \
- comphelper \
- cppu \
- cppuhelper \
- i18nlangtag \
- sal \
- sfx \
- sw \
- swqahelper \
- test \
- unotest \
- utl \
- vcl \
- tl \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,sw_rtfexport2,\
- boost_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sw_rtfexport2,\
- -I$(SRCDIR)/sw/inc \
- -I$(SRCDIR)/sw/source/core/inc \
- -I$(SRCDIR)/sw/qa/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_api,sw_rtfexport2,\
- udkapi \
- offapi \
- oovbaapi \
-))
-
-$(eval $(call gb_CppunitTest_use_ure,sw_rtfexport2))
-$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport2))
-
-$(eval $(call gb_CppunitTest_use_rdb,sw_rtfexport2,services))
-
-$(eval $(call gb_CppunitTest_use_configuration,sw_rtfexport2))
+$(eval $(call sw_rtfexport_test,2))
# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_rtfexport3.mk b/sw/CppunitTest_sw_rtfexport3.mk
index 377defd2a197..14220889821a 100644
--- a/sw/CppunitTest_sw_rtfexport3.mk
+++ b/sw/CppunitTest_sw_rtfexport3.mk
@@ -9,51 +9,6 @@
#
#*************************************************************************
-$(eval $(call gb_CppunitTest_CppunitTest,sw_rtfexport3))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_rtfexport3))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sw_rtfexport3, \
- sw/qa/extras/rtfexport/rtfexport3 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sw_rtfexport3, \
- comphelper \
- cppu \
- cppuhelper \
- sal \
- sfx \
- sw \
- swqahelper \
- test \
- unotest \
- utl \
- tl \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,sw_rtfexport3,\
- boost_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sw_rtfexport3,\
- -I$(SRCDIR)/sw/inc \
- -I$(SRCDIR)/sw/source/core/inc \
- -I$(SRCDIR)/sw/qa/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_api,sw_rtfexport3,\
- udkapi \
- offapi \
- oovbaapi \
-))
-
-$(eval $(call gb_CppunitTest_use_ure,sw_rtfexport3))
-$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport3))
-
-$(eval $(call gb_CppunitTest_use_rdb,sw_rtfexport3,services))
-
-$(eval $(call gb_CppunitTest_use_configuration,sw_rtfexport3))
+$(eval $(call sw_rtfexport_test,3))
# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_rtfexport4.mk b/sw/CppunitTest_sw_rtfexport4.mk
index 0c39ff4834e9..8481083246c8 100644
--- a/sw/CppunitTest_sw_rtfexport4.mk
+++ b/sw/CppunitTest_sw_rtfexport4.mk
@@ -9,52 +9,6 @@
#
#*************************************************************************
-$(eval $(call gb_CppunitTest_CppunitTest,sw_rtfexport4))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_rtfexport4))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sw_rtfexport4, \
- sw/qa/extras/rtfexport/rtfexport4 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sw_rtfexport4, \
- comphelper \
- cppu \
- cppuhelper \
- sal \
- svl \
- sfx \
- sw \
- swqahelper \
- test \
- unotest \
- utl \
- tl \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,sw_rtfexport4,\
- boost_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sw_rtfexport4,\
- -I$(SRCDIR)/sw/inc \
- -I$(SRCDIR)/sw/source/core/inc \
- -I$(SRCDIR)/sw/qa/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_api,sw_rtfexport4,\
- udkapi \
- offapi \
- oovbaapi \
-))
-
-$(eval $(call gb_CppunitTest_use_ure,sw_rtfexport4))
-$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport4))
-
-$(eval $(call gb_CppunitTest_use_rdb,sw_rtfexport4,services))
-
-$(eval $(call gb_CppunitTest_use_configuration,sw_rtfexport4))
+$(eval $(call sw_rtfexport_test,4))
# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_rtfexport5.mk b/sw/CppunitTest_sw_rtfexport5.mk
index 67a69accb9a1..8d4dfcd044f2 100644
--- a/sw/CppunitTest_sw_rtfexport5.mk
+++ b/sw/CppunitTest_sw_rtfexport5.mk
@@ -9,53 +9,6 @@
#
#*************************************************************************
-$(eval $(call gb_CppunitTest_CppunitTest,sw_rtfexport5))
-
-$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_rtfexport5))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sw_rtfexport5, \
- sw/qa/extras/rtfexport/rtfexport5 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sw_rtfexport5, \
- comphelper \
- cppu \
- cppuhelper \
- i18nlangtag \
- sal \
- sfx \
- sw \
- swqahelper \
- test \
- unotest \
- utl \
- vcl \
- tl \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,sw_rtfexport5,\
- boost_headers \
- libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sw_rtfexport5,\
- -I$(SRCDIR)/sw/inc \
- -I$(SRCDIR)/sw/source/core/inc \
- -I$(SRCDIR)/sw/qa/inc \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_api,sw_rtfexport5,\
- udkapi \
- offapi \
- oovbaapi \
-))
-
-$(eval $(call gb_CppunitTest_use_ure,sw_rtfexport5))
-$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport5))
-
-$(eval $(call gb_CppunitTest_use_rdb,sw_rtfexport5,services))
-
-$(eval $(call gb_CppunitTest_use_configuration,sw_rtfexport5))
+$(eval $(call sw_rtfexport_test,5))
# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index d195e7439c32..a9356124762a 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -19,6 +19,7 @@
include $(SRCDIR)/sw/layoutwriter_setup.mk
include $(SRCDIR)/sw/ooxmlexport_setup.mk
+include $(SRCDIR)/sw/rtfexport_setup.mk
include $(SRCDIR)/sw/uiwriter_setup.mk
include $(SRCDIR)/sw/ww8export_setup.mk
diff --git a/sw/rtfexport_setup.mk b/sw/rtfexport_setup.mk
new file mode 100644
index 000000000000..40bbfb62321a
--- /dev/null
+++ b/sw/rtfexport_setup.mk
@@ -0,0 +1,67 @@
+# -*- 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/.
+#
+#*************************************************************************
+
+# template for rtfexport tests
+define sw_rtfexport_test
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_rtfexport$(1)))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_rtfexport$(1)))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_rtfexport$(1), \
+ sw/qa/extras/rtfexport/rtfexport$(1) \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_rtfexport$(1), \
+ comphelper \
+ cppu \
+ cppuhelper \
+ i18nlangtag \
+ sal \
+ sfx \
+ svl \
+ sw \
+ swqahelper \
+ test \
+ unotest \
+ utl \
+ vcl \
+ tl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_rtfexport$(1),\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_rtfexport$(1),\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/qa/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_rtfexport$(1),\
+ udkapi \
+ offapi \
+ oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_rtfexport$(1)))
+$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport$(1)))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_rtfexport$(1),services))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_rtfexport$(1)))
+
+endef
+
+# vim: set noet sw=4 ts=4: