From 6c7659b584ea7ed3652ca4eb9a2297f36310c365 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 19 Apr 2013 18:54:16 +0200 Subject: move URE headers to include/ Change-Id: Ib48a12e902f2311c295b2007f08f44dee28f431d Reviewed-on: https://gerrit.libreoffice.org/3499 Reviewed-by: David Tardon Tested-by: David Tardon --- odk/CppunitTest_checkapi.mk | 53 ++++++++++ odk/CustomTarget_allheaders.mk | 49 +++++++++ odk/CustomTarget_doxygen.mk | 10 +- odk/Executable_unoapploader.mk | 1 - odk/Module_odk.mk | 5 + odk/PackageSet_odk_headers.mk | 17 +++ odk/Package_odk_headers.mk | 200 +++++++++++++++++++++++++++++++++++ odk/Package_odk_headers_generated.mk | 17 +++ odk/qa/checkapi/strings.cxx | 31 ++++++ 9 files changed, 375 insertions(+), 8 deletions(-) create mode 100644 odk/CppunitTest_checkapi.mk create mode 100644 odk/CustomTarget_allheaders.mk create mode 100644 odk/PackageSet_odk_headers.mk create mode 100644 odk/Package_odk_headers.mk create mode 100644 odk/Package_odk_headers_generated.mk create mode 100644 odk/qa/checkapi/strings.cxx (limited to 'odk') diff --git a/odk/CppunitTest_checkapi.mk b/odk/CppunitTest_checkapi.mk new file mode 100644 index 000000000000..e134a450ac83 --- /dev/null +++ b/odk/CppunitTest_checkapi.mk @@ -0,0 +1,53 @@ +# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2011 Matúš Kukan (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_CppunitTest_CppunitTest,odk_checkapi)) + +$(eval $(call gb_CppunitTest_use_custom_headers,odk_checkapi,\ + odk/allheaders \ +)) + +$(eval $(call gb_CppunitTest_add_exception_objects,odk_checkapi,\ + odk/qa/checkapi/strings \ +)) + +$(eval $(call gb_CppunitTest_use_external,odk_checkapi,boost_headers)) + +$(eval $(call gb_CppunitTest_use_internal_comprehensive_api,odk_checkapi,\ + cppu \ + udkapi \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,odk_checkapi,\ + cppu \ + cppuhelper \ + sal \ + salhelper \ + $(gb_UWINAPI) \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/odk/CustomTarget_allheaders.mk b/odk/CustomTarget_allheaders.mk new file mode 100644 index 000000000000..54699b5fc42f --- /dev/null +++ b/odk/CustomTarget_allheaders.mk @@ -0,0 +1,49 @@ +# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2011 Matúš Kukan (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_CustomTarget_CustomTarget,odk/allheaders)) + +odk_allheaders_DIR := $(call gb_CustomTarget_get_workdir,odk/allheaders) + +$(call gb_CustomTarget_get_target,odk/allheaders) : \ + $(odk_allheaders_DIR)/allheaders.hxx + +$(odk_allheaders_DIR)/allheaders.hxx : \ + $(call gb_PackageSet_get_target,odk_headers) \ + | $(odk_allheaders_DIR)/.dir + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) + printf '// Generated list of sal includes\n' > $@ && \ + printf '#ifdef WNT\n' >> $@ && \ + printf '#include \n' >> $@ && \ + printf '#endif\n' >> $@ \ + $(foreach file,$(shell cat $^),\ + $(if $(findstring /win32/,$(file)),&& printf '#ifdef WNT\n' >> $@) \ + && printf '#include <%s>\n' $(subst $(INSTDIR)/$(gb_Package_SDKDIRNAME)/include/,,$(file)) >> $@ \ + $(if $(findstring /win32/,$(file)),&& printf '#endif // WNT\n' >> $@) \ + ) + +# vim: set noet sw=4 ts=4: diff --git a/odk/CustomTarget_doxygen.mk b/odk/CustomTarget_doxygen.mk index 8820dd062ed8..06e4b034dadb 100644 --- a/odk/CustomTarget_doxygen.mk +++ b/odk/CustomTarget_doxygen.mk @@ -28,19 +28,15 @@ odk_INCFILELIST := com/sun/star/uno/Any.h \ com/sun/star/uno/Type.hxx # Cygwin Doxygen needs unix paths -DOXY_INPUT := $(SRCDIR)/odk/pack/gendocu/main.dox $(SRCDIR)/sal/inc/sal/log-areas.dox \ +DOXY_INPUT := $(SRCDIR)/odk/pack/gendocu/main.dox $(SRCDIR)/include/sal/log-areas.dox \ $(addprefix $(INSTDIR)/$(gb_Package_SDKDIRNAME)/include/,$(odk_INCDIRLIST) $(odk_INCFILELIST)) DOXY_INPUT := $(if $(filter WNT,$(OS)),$(shell cygpath -u $(DOXY_INPUT)),$(DOXY_INPUT)) DOXY_WORKDIR := $(if $(filter WNT,$(OS)),$(shell cygpath -u $(odk_WORKDIR)/docs/cpp/ref),$(odk_WORKDIR)/docs/cpp/ref) DOXY_STRIP_PATH := $(if $(filter WNT,$(OS)),$(shell cygpath -u $(OUTDIR)/inc),$(OUTDIR)/inc) DOXY_DEPS := $(SRCDIR)/odk/pack/gendocu/Doxyfile \ $(SRCDIR)/odk/pack/gendocu/main.dox \ - $(SRCDIR)/sal/inc/sal/log-areas.dox \ - $(call gb_Package_get_target,sal_odk_headers) \ - $(call gb_Package_get_target,sal_generated) \ - $(call gb_Package_get_target,salhelper_odk_headers) \ - $(call gb_Package_get_target,cppu_odk_headers) \ - $(call gb_Package_get_target,cppuhelper_odk_headers) \ + $(SRCDIR)/include/sal/log-areas.dox \ + $(call gb_PackageSet_get_target,odk_headers) $(eval $(call gb_CustomTarget_register_target,odk/odkcommon/docs/cpp/ref,index.html)) diff --git a/odk/Executable_unoapploader.mk b/odk/Executable_unoapploader.mk index 22bcc87e7e1d..709b1188fd53 100644 --- a/odk/Executable_unoapploader.mk +++ b/odk/Executable_unoapploader.mk @@ -10,7 +10,6 @@ $(eval $(call gb_Executable_Executable,unoapploader)) $(eval $(call gb_Executable_use_packages,unoapploader,\ - sal_generated \ )) $(eval $(call gb_Executable_use_static_libraries,unoapploader,\ diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk index 6e78471eb30a..c17c57419e03 100644 --- a/odk/Module_odk.mk +++ b/odk/Module_odk.mk @@ -23,8 +23,11 @@ $(eval $(call gb_Module_add_targets,odk,\ Package_html \ Package_examples \ Package_lib \ + Package_odk_headers \ + Package_odk_headers_generated \ Package_settings \ Package_settings_generated \ + PackageSet_odk_headers \ )) ifeq ($(OS),WNT) @@ -62,6 +65,8 @@ $(eval $(call gb_Module_add_targets,odk,\ )) $(eval $(call gb_Module_add_check_targets,odk,\ + CppunitTest_checkapi \ + CustomTarget_allheaders \ CustomTarget_check \ )) diff --git a/odk/PackageSet_odk_headers.mk b/odk/PackageSet_odk_headers.mk new file mode 100644 index 000000000000..d28f6d1bb559 --- /dev/null +++ b/odk/PackageSet_odk_headers.mk @@ -0,0 +1,17 @@ +# -*- 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_PackageSet_PackageSet,odk_headers)) + +$(eval $(call gb_PackageSet_add_packages,odk_headers,\ + odk_headers \ + odk_headers_generated \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/odk/Package_odk_headers.mk b/odk/Package_odk_headers.mk new file mode 100644 index 000000000000..fca30c43046e --- /dev/null +++ b/odk/Package_odk_headers.mk @@ -0,0 +1,200 @@ + +# -*- 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,odk_headers,$(SRCDIR)/include)) + +$(eval $(call gb_Package_set_outdir,odk_headers,$(INSTDIR))) + +$(eval $(call gb_Package_add_files_with_dir,odk_headers,$(gb_Package_SDKDIRNAME)/include,\ + com/sun/star/uno/Any.h \ + com/sun/star/uno/Any.hxx \ + com/sun/star/uno/Reference.h \ + com/sun/star/uno/Reference.hxx \ + com/sun/star/uno/Sequence.h \ + com/sun/star/uno/Sequence.hxx \ + com/sun/star/uno/Type.h \ + com/sun/star/uno/Type.hxx \ + com/sun/star/uno/genfunc.h \ + com/sun/star/uno/genfunc.hxx \ + cppu/Enterable.hxx \ + cppu/EnvDcp.hxx \ + cppu/EnvGuards.hxx \ + cppu/Map.hxx \ + cppu/cppudllapi.h \ + cppu/helper/purpenv/Environment.hxx \ + cppu/helper/purpenv/Mapping.hxx \ + cppu/macros.hxx \ + cppu/unotype.hxx \ + cppuhelper/access_control.hxx \ + cppuhelper/basemutex.hxx \ + cppuhelper/bootstrap.hxx \ + cppuhelper/compbase.hxx \ + cppuhelper/compbase1.hxx \ + cppuhelper/compbase10.hxx \ + cppuhelper/compbase11.hxx \ + cppuhelper/compbase12.hxx \ + cppuhelper/compbase2.hxx \ + cppuhelper/compbase3.hxx \ + cppuhelper/compbase4.hxx \ + cppuhelper/compbase5.hxx \ + cppuhelper/compbase6.hxx \ + cppuhelper/compbase7.hxx \ + cppuhelper/compbase8.hxx \ + cppuhelper/compbase9.hxx \ + cppuhelper/compbase_ex.hxx \ + cppuhelper/component.hxx \ + cppuhelper/component_context.hxx \ + cppuhelper/cppuhelperdllapi.h \ + cppuhelper/exc_hlp.hxx \ + cppuhelper/factory.hxx \ + cppuhelper/findsofficepath.h \ + cppuhelper/implbase.hxx \ + cppuhelper/implbase1.hxx \ + cppuhelper/implbase10.hxx \ + cppuhelper/implbase11.hxx \ + cppuhelper/implbase12.hxx \ + cppuhelper/implbase13.hxx \ + cppuhelper/implbase2.hxx \ + cppuhelper/implbase3.hxx \ + cppuhelper/implbase4.hxx \ + cppuhelper/implbase5.hxx \ + cppuhelper/implbase6.hxx \ + cppuhelper/implbase7.hxx \ + cppuhelper/implbase8.hxx \ + cppuhelper/implbase9.hxx \ + cppuhelper/implbase_ex.hxx \ + cppuhelper/implbase_ex_post.hxx \ + cppuhelper/implbase_ex_pre.hxx \ + cppuhelper/implementationentry.hxx \ + cppuhelper/interfacecontainer.h \ + cppuhelper/interfacecontainer.hxx \ + cppuhelper/propertysetmixin.hxx \ + cppuhelper/propshlp.hxx \ + cppuhelper/proptypehlp.h \ + cppuhelper/proptypehlp.hxx \ + cppuhelper/queryinterface.hxx \ + cppuhelper/shlib.hxx \ + cppuhelper/supportsservice.hxx \ + cppuhelper/typeprovider.hxx \ + cppuhelper/unourl.hxx \ + cppuhelper/weak.hxx \ + cppuhelper/weakagg.hxx \ + cppuhelper/weakref.hxx \ + osl/conditn.h \ + osl/conditn.hxx \ + osl/diagnose.h \ + osl/diagnose.hxx \ + osl/doublecheckedlocking.h \ + osl/endian.h \ + osl/file.h \ + osl/file.hxx \ + osl/getglobalmutex.hxx \ + osl/interlck.h \ + osl/module.h \ + osl/module.hxx \ + osl/mutex.h \ + osl/mutex.hxx \ + osl/nlsupport.h \ + osl/pipe.h \ + osl/pipe.hxx \ + osl/pipe_decl.hxx \ + osl/process.h \ + osl/profile.h \ + osl/profile.hxx \ + osl/security.h \ + osl/security.hxx \ + osl/security_decl.hxx \ + osl/signal.h \ + osl/socket.h \ + osl/socket.hxx \ + osl/socket_decl.hxx \ + osl/thread.h \ + osl/thread.hxx \ + osl/time.h \ + osl/util.h \ + rtl/alloc.h \ + rtl/allocator.hxx \ + rtl/bootstrap.h \ + rtl/bootstrap.hxx \ + rtl/byteseq.h \ + rtl/byteseq.hxx \ + rtl/character.hxx \ + rtl/cipher.h \ + rtl/crc.h \ + rtl/digest.h \ + rtl/instance.hxx \ + rtl/locale.h \ + rtl/logfile.h \ + rtl/logfile.hxx \ + rtl/malformeduriexception.hxx \ + rtl/math.h \ + rtl/math.hxx \ + rtl/process.h \ + rtl/random.h \ + rtl/ref.hxx \ + rtl/strbuf.h \ + rtl/strbuf.hxx \ + rtl/string.h \ + rtl/string.hxx \ + rtl/stringconcat.hxx \ + rtl/stringutils.hxx \ + rtl/tencinfo.h \ + rtl/textcvt.h \ + rtl/textenc.h \ + rtl/unload.h \ + rtl/uri.h \ + rtl/uri.hxx \ + rtl/ustrbuf.h \ + rtl/ustrbuf.hxx \ + rtl/ustring.h \ + rtl/ustring.hxx \ + rtl/uuid.h \ + sal/ByteBufferWrapper.hxx \ + sal/alloca.h \ + sal/config.h \ + sal/detail/log.h \ + sal/log.hxx \ + sal/macros.h \ + sal/main.h \ + sal/mathconf.h \ + sal/saldllapi.h \ + sal/types.h \ + salhelper/condition.hxx \ + salhelper/dynload.hxx \ + salhelper/linkhelper.hxx \ + salhelper/refobj.hxx \ + salhelper/salhelperdllapi.h \ + salhelper/simplereferenceobject.hxx \ + salhelper/singletonref.hxx \ + salhelper/thread.hxx \ + salhelper/timer.hxx \ + systools/win32/snprintf.h \ + typelib/typeclass.h \ + typelib/typedescription.h \ + typelib/typedescription.hxx \ + typelib/uik.h \ + uno/Enterable.h \ + uno/EnvDcp.h \ + uno/any2.h \ + uno/current_context.h \ + uno/current_context.hxx \ + uno/data.h \ + uno/dispatcher.h \ + uno/dispatcher.hxx \ + uno/environment.h \ + uno/environment.hxx \ + uno/lbnames.h \ + uno/mapping.h \ + uno/mapping.hxx \ + uno/sequence2.h \ + uno/threadpool.h \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/odk/Package_odk_headers_generated.mk b/odk/Package_odk_headers_generated.mk new file mode 100644 index 000000000000..fff5c6b85750 --- /dev/null +++ b/odk/Package_odk_headers_generated.mk @@ -0,0 +1,17 @@ + +# -*- 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,odk_headers_generated,$(BUILDDIR)/config_$(gb_Side))) + +$(eval $(call gb_Package_set_outdir,odk_headers_generated,$(INSTDIR))) + +$(eval $(call gb_Package_add_file,odk_headers_generated,$(gb_Package_SDKDIRNAME)/include/sal/typesizes.h,config_typesizes.h)) + +# vim: set noet sw=4 ts=4: diff --git a/odk/qa/checkapi/strings.cxx b/odk/qa/checkapi/strings.cxx new file mode 100644 index 000000000000..87526acb673b --- /dev/null +++ b/odk/qa/checkapi/strings.cxx @@ -0,0 +1,31 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +// The whole purpose of this test is to check that public API headers +// build even without RTL_USING (which enables using e.g. rtl::OUString +// without to refer to the rtl namespace, which is not wanted +// in public API). If there are build errors here, check the headers +// for uses of such types. + +#ifdef RTL_USING +#error Build system problem, RTL_USING using should not be set here. +#endif + +// This module contains no tests, this is for the build system. +#include + +#include "allheaders.hxx" + +CPPUNIT_PLUGIN_IMPLEMENT(); +extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL firstfunc( sal_Bool bRes ) +{ + return ( bRes = sal_True ); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit