Kaydet (Commit) 1817366c authored tarafından Michael Stahl's avatar Michael Stahl

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
üst 2aab2f4b
...@@ -49,6 +49,7 @@ $(eval $(call gb_Library_set_include,sd,\ ...@@ -49,6 +49,7 @@ $(eval $(call gb_Library_set_include,sd,\
$(eval $(call gb_Library_add_defs,sd,\ $(eval $(call gb_Library_add_defs,sd,\
-DSD_DLLIMPLEMENTATION \ -DSD_DLLIMPLEMENTATION \
-DSDUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,sdui)\" \
)) ))
ifneq ($(strip $(dbg_anim_log)$(DBG_ANIM_LOG)),) ifneq ($(strip $(dbg_anim_log)$(DBG_ANIM_LOG)),)
......
...@@ -369,7 +369,6 @@ ...@@ -369,7 +369,6 @@
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <config_features.h> #include <config_features.h>
#include <config_libraries.h>
#include <config_options.h> #include <config_options.h>
#include <cppcanvas/basegfxfactory.hxx> #include <cppcanvas/basegfxfactory.hxx>
#include <cppcanvas/vclfactory.hxx> #include <cppcanvas/vclfactory.hxx>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
#include <config_features.h> #include <config_features.h>
#include <config_libraries.h>
#include "sdabstdlg.hxx" #include "sdabstdlg.hxx"
...@@ -43,7 +42,7 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create() ...@@ -43,7 +42,7 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create()
#if HAVE_FEATURE_DESKTOP #if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary; 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 ) ) if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName ) )
fp = ( SdAbstractDialogFactory* (SAL_CALL*)() ) fp = ( SdAbstractDialogFactory* (SAL_CALL*)() )
aDialogLibrary.getFunctionSymbol( "SdCreateDialogFactory" ); aDialogLibrary.getFunctionSymbol( "SdCreateDialogFactory" );
......
...@@ -208,15 +208,6 @@ else mv $(1) $(2) $(if $(3),&& touch -r $(3) $(2)); \ ...@@ -208,15 +208,6 @@ else mv $(1) $(2) $(if $(3),&& touch -r $(3) $(2)); \
fi fi
endef 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 define gb_Helper_define_if_set
$(foreach def,$(1),$(if $(filter TRUE YES,$($(def))),-D$(def))) $(foreach def,$(1),$(if $(filter TRUE YES,$($(def))),-D$(def)))
endef endef
......
...@@ -325,8 +325,6 @@ include $(foreach class, \ ...@@ -325,8 +325,6 @@ include $(foreach class, \
$(eval $(call gb_Helper_process_executable_registrations)) $(eval $(call gb_Helper_process_executable_registrations))
$(eval $(call gb_Postprocess_make_targets)) $(eval $(call gb_Postprocess_make_targets))
$(eval $(call gb_Helper_generate_config_libraries))
# optional extensions that should never be essential # optional extensions that should never be essential
ifneq ($(wildcard $(GBUILDDIR)/extensions/post_*.mk),) ifneq ($(wildcard $(GBUILDDIR)/extensions/post_*.mk),)
include $(wildcard $(GBUILDDIR)/extensions/post_*.mk) include $(wildcard $(GBUILDDIR)/extensions/post_*.mk)
......
...@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_sdk_api,sw)) ...@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_sdk_api,sw))
$(eval $(call gb_Library_add_defs,sw,\ $(eval $(call gb_Library_add_defs,sw,\
-DSW_DLLIMPLEMENTATION \ -DSW_DLLIMPLEMENTATION \
-DSWUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,swui)\" \
)) ))
$(eval $(call gb_Library_use_libraries,sw,\ $(eval $(call gb_Library_use_libraries,sw,\
......
...@@ -466,7 +466,6 @@ ...@@ -466,7 +466,6 @@
#include <config_features.h> #include <config_features.h>
#include <config_folders.h> #include <config_folders.h>
#include <config_graphite.h> #include <config_graphite.h>
#include <config_libraries.h>
#include <config_options.h> #include <config_options.h>
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
#include <cppuhelper/bootstrap.hxx> #include <cppuhelper/bootstrap.hxx>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
#include <config_features.h> #include <config_features.h>
#include <config_libraries.h>
#include "swabstdlg.hxx" #include "swabstdlg.hxx"
...@@ -42,7 +41,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() ...@@ -42,7 +41,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
#if HAVE_FEATURE_DESKTOP #if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary; 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, if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName,
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) ) SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
fp = ( SwAbstractDialogFactory* (SAL_CALL*)() ) fp = ( SwAbstractDialogFactory* (SAL_CALL*)() )
......
...@@ -31,6 +31,7 @@ $(eval $(call gb_Library_set_include,tk,\ ...@@ -31,6 +31,7 @@ $(eval $(call gb_Library_set_include,tk,\
$(eval $(call gb_Library_add_defs,tk,\ $(eval $(call gb_Library_add_defs,tk,\
-DTOOLKIT_DLLIMPLEMENTATION \ -DTOOLKIT_DLLIMPLEMENTATION \
-DSVT_DLL_NAME=\"$(call gb_Library_get_runtime_filename,svt)\" \
)) ))
$(eval $(call gb_Library_use_sdk_api,tk)) $(eval $(call gb_Library_use_sdk_api,tk))
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <config_libraries.h>
#include <boost/ptr_container/ptr_vector.hpp> #include <boost/ptr_container/ptr_vector.hpp>
#include <stdio.h> #include <stdio.h>
...@@ -1223,7 +1221,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( ...@@ -1223,7 +1221,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
) )
{ {
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
OUString aLibName(LIBO_LIBRARY(svt)); OUString aLibName(SVT_DLL_NAME);
hSvToolsLib = osl_loadModuleRelative( hSvToolsLib = osl_loadModuleRelative(
&thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT ); &thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT );
if ( hSvToolsLib ) if ( hSvToolsLib )
......
...@@ -45,6 +45,9 @@ $(eval $(call gb_Library_set_include,vcl,\ ...@@ -45,6 +45,9 @@ $(eval $(call gb_Library_set_include,vcl,\
$(eval $(call gb_Library_add_defs,vcl,\ $(eval $(call gb_Library_add_defs,vcl,\
-DVCL_DLLIMPLEMENTATION \ -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)) $(eval $(call gb_Library_use_sdk_api,vcl))
......
...@@ -277,7 +277,6 @@ ...@@ -277,7 +277,6 @@
#include <config_features.h> #include <config_features.h>
#include <config_folders.h> #include <config_folders.h>
#include <config_graphite.h> #include <config_graphite.h>
#include <config_libraries.h>
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase1.hxx> #include <cppuhelper/compbase1.hxx>
#include <cppuhelper/factory.hxx> #include <cppuhelper/factory.hxx>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
#include <config_features.h> #include <config_features.h>
#include <config_libraries.h>
#include "comphelper/processfactory.hxx" #include "comphelper/processfactory.hxx"
...@@ -1404,7 +1403,7 @@ UnoWrapperBase* Application::GetUnoWrapper( bool bCreateIfNotExist ) ...@@ -1404,7 +1403,7 @@ UnoWrapperBase* Application::GetUnoWrapper( bool bCreateIfNotExist )
if ( !pSVData->mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate ) if ( !pSVData->mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate )
{ {
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
OUString aLibName(LIBO_LIBRARY(tk)); OUString aLibName(TK_DLL_NAME);
oslModule hTkLib = osl_loadModuleRelative( oslModule hTkLib = osl_loadModuleRelative(
&thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT ); &thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT );
if ( hTkLib ) if ( hTkLib )
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
*/ */
#include <config_features.h> #include <config_features.h>
#include <config_libraries.h>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <osl/module.hxx> #include <osl/module.hxx>
...@@ -38,10 +37,13 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create() ...@@ -38,10 +37,13 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
#if HAVE_FEATURE_DESKTOP #if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary; static ::osl::Module aDialogLibrary;
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, LIBO_LIBRARY(cui), if (aDialogLibrary.is() ||
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) ) aDialogLibrary.loadRelative(&thisModule, CUI_DLL_NAME,
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY))
{
fp = ( VclAbstractDialogFactory* (SAL_CALL*)() ) fp = ( VclAbstractDialogFactory* (SAL_CALL*)() )
aDialogLibrary.getFunctionSymbol( OUString("CreateDialogFactory") ); aDialogLibrary.getFunctionSymbol( OUString("CreateDialogFactory") );
}
#else #else
fp = CreateDialogFactory; fp = CreateDialogFactory;
#endif #endif
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <config_libraries.h>
#include "osl/module.h" #include "osl/module.h"
#include "osl/process.h" #include "osl/process.h"
...@@ -117,7 +115,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals ...@@ -117,7 +115,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals
static DesktopType get_desktop_environment() static DesktopType get_desktop_environment()
{ {
OUString aModule(LIBO_LIBRARY(desktop_detector)); OUString aModule(DESKTOP_DETECTOR_DLL_NAME);
oslModule aMod = osl_loadModuleRelative( oslModule aMod = osl_loadModuleRelative(
reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData, reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData,
SAL_LOADMODULE_DEFAULT ); SAL_LOADMODULE_DEFAULT );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment