diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-06-04 16:11:19 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-06-09 17:05:50 +0200 |
commit | 1817366cb5f61337b34b5284615d3d4e0a8aa68a (patch) | |
tree | 03ac5b051b6367567c66c6aa6741d63ef9ff7ef1 | |
parent | 2aab2f4b7b0736e19b76abad652bbb055b18b857 (diff) |
gbuild: remove config_libraries.h and gb_Helper_generate_config_libraries
This much ugly complexity, generating a header on every gbuild startup
etc. is really not warranted for 6 callers of the generated macros.
Also, the Win32 make has problems with the quoting.
Change-Id: If945e09c1730e52174a6084677842dc611d66b2f
-rw-r--r-- | sd/Library_sd.mk | 1 | ||||
-rw-r--r-- | sd/inc/pch/precompiled_sd.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/dlg/sdabstdlg.cxx | 3 | ||||
-rw-r--r-- | solenv/gbuild/Helper.mk | 9 | ||||
-rw-r--r-- | solenv/gbuild/gbuild.mk | 2 | ||||
-rw-r--r-- | sw/Library_sw.mk | 1 | ||||
-rw-r--r-- | sw/inc/pch/precompiled_sw.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/dialog/swabstdlg.cxx | 3 | ||||
-rw-r--r-- | toolkit/Library_tk.mk | 1 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 4 | ||||
-rw-r--r-- | vcl/Library_vcl.mk | 3 | ||||
-rw-r--r-- | vcl/inc/pch/precompiled_vcl.hxx | 1 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/abstdlg.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/plugadapt/salplug.cxx | 4 |
15 files changed, 16 insertions, 29 deletions
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 7ce290582147..d1bb6eb3ffdc 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -49,6 +49,7 @@ $(eval $(call gb_Library_set_include,sd,\ $(eval $(call gb_Library_add_defs,sd,\ -DSD_DLLIMPLEMENTATION \ + -DSDUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,sdui)\" \ )) ifneq ($(strip $(dbg_anim_log)$(DBG_ANIM_LOG)),) diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 221208504b71..8937ebb081ad 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -369,7 +369,6 @@ #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> #include <config_features.h> -#include <config_libraries.h> #include <config_options.h> #include <cppcanvas/basegfxfactory.hxx> #include <cppcanvas/vclfactory.hxx> diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx index fc83a93248b5..fb75b373ca0d 100644 --- a/sd/source/ui/dlg/sdabstdlg.cxx +++ b/sd/source/ui/dlg/sdabstdlg.cxx @@ -18,7 +18,6 @@ */ #include <config_features.h> -#include <config_libraries.h> #include "sdabstdlg.hxx" @@ -43,7 +42,7 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create() #if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING static ::osl::Module aDialogLibrary; - static const OUString sLibName(LIBO_LIBRARY(sdui)); + static const OUString sLibName(SDUI_DLL_NAME); if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName ) ) fp = ( SdAbstractDialogFactory* (SAL_CALL*)() ) aDialogLibrary.getFunctionSymbol( "SdCreateDialogFactory" ); diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk index 8efba9834ba1..398b2f7f9a8c 100644 --- a/solenv/gbuild/Helper.mk +++ b/solenv/gbuild/Helper.mk @@ -208,15 +208,6 @@ else mv $(1) $(2) $(if $(3),&& touch -r $(3) $(2)); \ fi endef -define gb_Helper_generate_config_libraries -$(shell FILE=$(BUILDDIR)/config_$(gb_Side)/config_libraries.h && \ -printf "// This file is generated by gbuild: gb_Helper_generate_config_libraries.\n\n" >> $$FILE.tmp && \ -$(foreach lib,$(gb_Library_KNOWNLIBS), \ - printf "#define LIBO_LIB_$(subst -,_,$(lib)) \"$(call gb_Library_get_runtime_filename,$(call gb_Library__get_name,$(lib)))\"\n" >> $$FILE.tmp &&) \ -printf "\n#define LIBO_LIBRARY(name) LIBO_LIB_##name\n" >> $$FILE.tmp && \ -$(call gb_Helper_replace_if_different_and_touch,$$FILE.tmp,$$FILE)) -endef - define gb_Helper_define_if_set $(foreach def,$(1),$(if $(filter TRUE YES,$($(def))),-D$(def))) endef diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index 23d5591cfcb4..17a7d8fe0a50 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -325,8 +325,6 @@ include $(foreach class, \ $(eval $(call gb_Helper_process_executable_registrations)) $(eval $(call gb_Postprocess_make_targets)) -$(eval $(call gb_Helper_generate_config_libraries)) - # optional extensions that should never be essential ifneq ($(wildcard $(GBUILDDIR)/extensions/post_*.mk),) include $(wildcard $(GBUILDDIR)/extensions/post_*.mk) diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index aced49f8e319..f2ff8aa331b6 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_sdk_api,sw)) $(eval $(call gb_Library_add_defs,sw,\ -DSW_DLLIMPLEMENTATION \ + -DSWUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,swui)\" \ )) $(eval $(call gb_Library_use_libraries,sw,\ diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 94d5aa1cc59a..69ad7b3e6d11 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -466,7 +466,6 @@ #include <config_features.h> #include <config_folders.h> #include <config_graphite.h> -#include <config_libraries.h> #include <config_options.h> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/bootstrap.hxx> diff --git a/sw/source/uibase/dialog/swabstdlg.cxx b/sw/source/uibase/dialog/swabstdlg.cxx index 8cf41aa5604d..7b5ec71bbe10 100644 --- a/sw/source/uibase/dialog/swabstdlg.cxx +++ b/sw/source/uibase/dialog/swabstdlg.cxx @@ -18,7 +18,6 @@ */ #include <config_features.h> -#include <config_libraries.h> #include "swabstdlg.hxx" @@ -42,7 +41,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() #if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING static ::osl::Module aDialogLibrary; - static const OUString sLibName(LIBO_LIBRARY(swui)); + static const OUString sLibName(SWUI_DLL_NAME); if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName, SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) ) fp = ( SwAbstractDialogFactory* (SAL_CALL*)() ) diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk index a8fbeb50eb87..ddce52ed47d5 100644 --- a/toolkit/Library_tk.mk +++ b/toolkit/Library_tk.mk @@ -31,6 +31,7 @@ $(eval $(call gb_Library_set_include,tk,\ $(eval $(call gb_Library_add_defs,tk,\ -DTOOLKIT_DLLIMPLEMENTATION \ + -DSVT_DLL_NAME=\"$(call gb_Library_get_runtime_filename,svt)\" \ )) $(eval $(call gb_Library_use_sdk_api,tk)) diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 054ef9432b48..4b6635621ccf 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <config_libraries.h> - #include <boost/ptr_container/ptr_vector.hpp> #include <stdio.h> @@ -1223,7 +1221,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( ) { #ifndef DISABLE_DYNLOADING - OUString aLibName(LIBO_LIBRARY(svt)); + OUString aLibName(SVT_DLL_NAME); hSvToolsLib = osl_loadModuleRelative( &thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT ); if ( hSvToolsLib ) diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 72877b359b3a..e271b3ea1c7f 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -45,6 +45,9 @@ $(eval $(call gb_Library_set_include,vcl,\ $(eval $(call gb_Library_add_defs,vcl,\ -DVCL_DLLIMPLEMENTATION \ + -DCUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,cui)\" \ + -DDESKTOP_DETECTOR_DLL_NAME=\"$(call gb_Library_get_runtime_filename,desktop_detector)\" \ + -DTK_DLL_NAME=\"$(call gb_Library_get_runtime_filename,tk)\" \ )) $(eval $(call gb_Library_use_sdk_api,vcl)) diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx index 7afd3f4670d8..5428d2bc4f79 100644 --- a/vcl/inc/pch/precompiled_vcl.hxx +++ b/vcl/inc/pch/precompiled_vcl.hxx @@ -277,7 +277,6 @@ #include <config_features.h> #include <config_folders.h> #include <config_graphite.h> -#include <config_libraries.h> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase1.hxx> #include <cppuhelper/factory.hxx> diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 50cda48010c6..a1c59ef0819b 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -18,7 +18,6 @@ */ #include <config_features.h> -#include <config_libraries.h> #include "comphelper/processfactory.hxx" @@ -1404,7 +1403,7 @@ UnoWrapperBase* Application::GetUnoWrapper( bool bCreateIfNotExist ) if ( !pSVData->mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate ) { #ifndef DISABLE_DYNLOADING - OUString aLibName(LIBO_LIBRARY(tk)); + OUString aLibName(TK_DLL_NAME); oslModule hTkLib = osl_loadModuleRelative( &thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT ); if ( hTkLib ) diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx index 5cdb7575579a..869800ace32d 100644 --- a/vcl/source/window/abstdlg.cxx +++ b/vcl/source/window/abstdlg.cxx @@ -18,7 +18,6 @@ */ #include <config_features.h> -#include <config_libraries.h> #include <rtl/ustring.hxx> #include <osl/module.hxx> @@ -38,10 +37,13 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create() #if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING static ::osl::Module aDialogLibrary; - if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, LIBO_LIBRARY(cui), - SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) ) + if (aDialogLibrary.is() || + aDialogLibrary.loadRelative(&thisModule, CUI_DLL_NAME, + SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY)) + { fp = ( VclAbstractDialogFactory* (SAL_CALL*)() ) aDialogLibrary.getFunctionSymbol( OUString("CreateDialogFactory") ); + } #else fp = CreateDialogFactory; #endif diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 0fd81dc9ac18..ff0899d43099 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <config_libraries.h> - #include "osl/module.h" #include "osl/process.h" @@ -117,7 +115,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals static DesktopType get_desktop_environment() { - OUString aModule(LIBO_LIBRARY(desktop_detector)); + OUString aModule(DESKTOP_DETECTOR_DLL_NAME); oslModule aMod = osl_loadModuleRelative( reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData, SAL_LOADMODULE_DEFAULT ); |