incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1230097 - in /incubator/ooo/trunk/main: sfx2/ solenv/gbuild/ solenv/gbuild/platform/ vcl/
Date Wed, 11 Jan 2012 15:37:35 GMT
Author: af
Date: Wed Jan 11 15:37:34 2012
New Revision: 1230097

URL: http://svn.apache.org/viewvc?rev=1230097&view=rev
Log:
118769: Fixed build break on Ubuntu11.10 by adding explicit support for external libraries
to gbuild.

Modified:
    incubator/ooo/trunk/main/sfx2/Library_qstart.mk
    incubator/ooo/trunk/main/solenv/gbuild/Library.mk
    incubator/ooo/trunk/main/solenv/gbuild/LinkTarget.mk
    incubator/ooo/trunk/main/solenv/gbuild/platform/freebsd.mk
    incubator/ooo/trunk/main/solenv/gbuild/platform/linux.mk
    incubator/ooo/trunk/main/solenv/gbuild/platform/macosx.mk
    incubator/ooo/trunk/main/solenv/gbuild/platform/os2.mk
    incubator/ooo/trunk/main/solenv/gbuild/platform/solaris.mk
    incubator/ooo/trunk/main/solenv/gbuild/platform/windows.mk
    incubator/ooo/trunk/main/solenv/gbuild/platform/winmingw.mk
    incubator/ooo/trunk/main/vcl/Library_vclplug_gen.mk
    incubator/ooo/trunk/main/vcl/Library_vclplug_gtk.mk

Modified: incubator/ooo/trunk/main/sfx2/Library_qstart.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/Library_qstart.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sfx2/Library_qstart.mk (original)
+++ incubator/ooo/trunk/main/sfx2/Library_qstart.mk Wed Jan 11 15:37:34 2012
@@ -47,9 +47,14 @@ $(eval $(call gb_Library_set_cflags,qsta
 
 $(eval $(call gb_Library_set_ldflags,qstart_gtk,\
     $$(LDFLAGS) \
-    $(GTK_LIBS) \
 ))
 
+$(eval $(call gb_Library_add_external_libs,qstart_gtk,	\
+    $(patsubst -l%,%, $(filter -l%,	$(GTK_LIBS)))	\
+))
+
+
+
 $(eval $(call gb_Library_add_linked_libs,qstart_gtk,\
 	comphelper \
 	cppu \
@@ -70,7 +75,7 @@ $(eval $(call gb_Library_add_linked_libs
 	vcl \
 	vos3 \
 	xml2 \
-    sfx \
+	sfx \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,qstart_gtk,\

Modified: incubator/ooo/trunk/main/solenv/gbuild/Library.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/gbuild/Library.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/gbuild/Library.mk (original)
+++ incubator/ooo/trunk/main/solenv/gbuild/Library.mk Wed Jan 11 15:37:34 2012
@@ -120,6 +120,7 @@ $(eval $(foreach method,\
 	set_library_path_flags \
 	add_linked_libs \
 	add_linked_static_libs \
+	add_external_libs \
 	add_package_headers \
 	add_sdi_headers \
 	add_precompiled_header \

Modified: incubator/ooo/trunk/main/solenv/gbuild/LinkTarget.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/gbuild/LinkTarget.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/gbuild/LinkTarget.mk (original)
+++ incubator/ooo/trunk/main/solenv/gbuild/LinkTarget.mk Wed Jan 11 15:37:34 2012
@@ -248,7 +248,7 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(foreach object,$(3),$(call gb_CObject_get_dep_target,$(object))) \
 		$(foreach object,$(4),$(call gb_CxxObject_get_dep_target,$(object))) \
 		$(foreach object,$(5),$(call gb_ObjCxxObject_get_dep_target,$(object)))\
- 		$(foreach object,$(6),$(call gb_GenCxxObject_get_dep_target,$(object)))\
+		$(foreach object,$(6),$(call gb_GenCxxObject_get_dep_target,$(object)))\
 		) && \
 	cat $${RESPONSEFILE} /dev/null | xargs -n 200 cat > $(1)) && \
 	rm -f $${RESPONSEFILE}
@@ -352,6 +352,7 @@ $(call gb_LinkTarget_get_target,$(1)) : 
 $(call gb_LinkTarget_get_target,$(1)) : LDFLAGS := $$(gb_LinkTarget_LDFLAGS)
 $(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS := 
 $(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS := 
+$(call gb_LinkTarget_get_target,$(1)) : EXTERNAL_LIBS := 
 $(call gb_LinkTarget_get_target,$(1)) : TARGETTYPE := 
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_NAME :=
@@ -475,6 +476,40 @@ $$(foreach lib,$(2),$$(call gb_StaticLib
 
 endef
 
+#
+# Add external libs for linking.  External libaries are not built by any module.
+#
+# The list of libraries is used as is, ie it is not filtered with gb_Library_KNOWNLIBS.
+#
+# An error is signaled, when any of the library names does not look like
+# a base name, ie is prefixed by -l or lib or is folled by .lib or .so.
+# 
+# @param target
+# @param libraries
+#     A list of (base names of) libraries that will be added to the target
+#     local EXTERNAL_LIBS variable and eventually linked in when the
+#     target is made.
+#
+define gb_LinkTarget_add_external_libs
+
+# Make sure that all libraries are given as base names.
+ifneq (,$$(filter -l% lib% %.so %.lib, $(2)))
+$$(eval $$(call gb_Output_announce,ERROR: Please give only libary basenames to gb_LinkTarget_add_external_libs))
+$$(eval $$(call gb_Output_announce,ERROR:    (no prefixes -l% or lib%, no suffixes %.so or
%.lib)))
+$$(eval $$(call gb_Output_announce,ERROR:    libraries given: $(2)))
+$$(eval $$(call gb_Output_announce,ERROR:    offending: $$(filter -l% lib% %.so %.lib, $(2))))
+$$(eval $$(call gb_Output_error,  ))
+endif
+
+$(call gb_LinkTarget_get_target,$(1)) : EXTERNAL_LIBS += $(2)
+
+$(call gb_LinkTarget_get_target,$(1)) : $$(foreach lib,$(2),$$(call gb_Library_get_target,$$(lib)))
+$(call gb_LinkTarget_get_external_headers_target,$(1)) : \
+$$(foreach lib,$(2),$$(call gb_Library_get_headers_target,$$(lib)))
+
+endef
+
+
 define gb_LinkTarget_add_cobject
 $(call gb_LinkTarget_get_target,$(1)) : COBJECTS += $(2)
 $(call gb_LinkTarget_get_clean_target,$(1)) : COBJECTS += $(2)

Modified: incubator/ooo/trunk/main/solenv/gbuild/platform/freebsd.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/gbuild/platform/freebsd.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/gbuild/platform/freebsd.mk (original)
+++ incubator/ooo/trunk/main/solenv/gbuild/platform/freebsd.mk Wed Jan 11 15:37:34 2012
@@ -223,6 +223,7 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
 		$(subst \d,$$,$(RPATH)) $(LDFLAGS) \
 		$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))
\
+		$(patsubst %,-l%,$(EXTERNAL_LIBS)) \
 		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
 		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \

Modified: incubator/ooo/trunk/main/solenv/gbuild/platform/linux.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/gbuild/platform/linux.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/gbuild/platform/linux.mk (original)
+++ incubator/ooo/trunk/main/solenv/gbuild/platform/linux.mk Wed Jan 11 15:37:34 2012
@@ -224,10 +224,11 @@ $(call gb_Helper_abbreviate_dirs,\
 	$(gb_CXX) \
 		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
 		$(subst \d,$$,$(RPATH)) $(LDFLAGS) \
-		$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))
\
 		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
 		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
+		$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))
\
+		$(patsubst %,-l%,$(EXTERNAL_LIBS)) \
 		-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib)))
-Wl$(COMMA)--end-group \
 		-o $(1))
 endef

Modified: incubator/ooo/trunk/main/solenv/gbuild/platform/macosx.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/gbuild/platform/macosx.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/gbuild/platform/macosx.mk (original)
+++ incubator/ooo/trunk/main/solenv/gbuild/platform/macosx.mk Wed Jan 11 15:37:34 2012
@@ -254,7 +254,10 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
 		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
 		$(subst \d,$$,$(RPATH)) $(LDFLAGS) \
-		$(patsubst lib%.dylib,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))
> $${DYLIB_FILE} && \
+		$(patsubst lib%.dylib,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))\
+		$(patsubst %,-l%,$(EXTERNAL_LIBS)) \
+		> $${DYLIB_FILE} && \
+
 	$(gb_CXX) \
 		$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
 		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \

Modified: incubator/ooo/trunk/main/solenv/gbuild/platform/os2.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/gbuild/platform/os2.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/gbuild/platform/os2.mk (original)
+++ incubator/ooo/trunk/main/solenv/gbuild/platform/os2.mk Wed Jan 11 15:37:34 2012
@@ -337,6 +337,7 @@ $(call gb_Helper_abbreviate_dirs_native,
 		$(if $(DLLTARGET), $(DLLDEF8)) \
 		$(NATIVERES) \
 		$(patsubst %.lib,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))
\
+		$(patsubst %,-l%,$(EXTERNAL_LIBS)) \
 		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
 		$(if $(DLLTARGET),-o $(DLLTARGET8), -o $(1) ); \
 		RC=$$?; rm $${RESPONSEFILE} \

Modified: incubator/ooo/trunk/main/solenv/gbuild/platform/solaris.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/gbuild/platform/solaris.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/gbuild/platform/solaris.mk (original)
+++ incubator/ooo/trunk/main/solenv/gbuild/platform/solaris.mk Wed Jan 11 15:37:34 2012
@@ -201,6 +201,7 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
 		$(subst \d,$$,$(RPATH)) $(LDFLAGS) \
 		$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))
\
+		$(patsubst %,-l%,$(EXTERNAL_LIBS)) \
 		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
 		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \

Modified: incubator/ooo/trunk/main/solenv/gbuild/platform/windows.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/gbuild/platform/windows.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/gbuild/platform/windows.mk (original)
+++ incubator/ooo/trunk/main/solenv/gbuild/platform/windows.mk Wed Jan 11 15:37:34 2012
@@ -428,6 +428,7 @@ $(call gb_Helper_abbreviate_dirs_native,
 		$(LDFLAGS) \
 		@$${RESPONSEFILE} \
 		$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))) \
+		$(patsubst %,%.lib,$(EXTERNAL_LIBS)) \
 		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_filename,$(lib))) \
 		$(if $(DLLTARGET),-out:$(DLLTARGET) -implib:$(1),-out:$(1)); RC=$$?; rm $${RESPONSEFILE}
\
 	$(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) ; exit
$$RC)

Modified: incubator/ooo/trunk/main/solenv/gbuild/platform/winmingw.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/gbuild/platform/winmingw.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/gbuild/platform/winmingw.mk (original)
+++ incubator/ooo/trunk/main/solenv/gbuild/platform/winmingw.mk Wed Jan 11 15:37:34 2012
@@ -404,6 +404,7 @@ $(call gb_Helper_abbreviate_dirs_native,
 		@$${RESPONSEFILE} \
 		--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib)))
--end-group \
 		--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib))))
--end-group \
+		--start-group $(patsubst %,-l%,$(EXTERNAL_LIBS)) --end-group \
 		$(MINGW_CLIB_DIR)/crtend.o \
 		-Map $(basename $(1)).map \
 		-o $(1))

Modified: incubator/ooo/trunk/main/vcl/Library_vclplug_gen.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/Library_vclplug_gen.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/Library_vclplug_gen.mk (original)
+++ incubator/ooo/trunk/main/vcl/Library_vclplug_gen.mk Wed Jan 11 15:37:34 2012
@@ -149,8 +149,8 @@ $(eval $(call gb_Library_set_defs,vclplu
 ifeq ($(XINERAMA_LINK),dynamic)
 $(eval $(call gb_Library_set_ldflags,vclplug_gen,\
     $$(LDFLAGS) \
-    -lXinerama \
 ))
+
 else
 $(eval $(call gb_Library_set_ldflags,vclplug_gen,\
     $$(LDFLAGS) \
@@ -198,5 +198,8 @@ $(eval $(call gb_Library_add_linked_libs
 	m \
 	pthread \
 ))
+$(eval $(call gb_Library_add_external_libs,vclplug_gen,	\
+	Xinerama Xrandr					\
+))
 endif
 # vim: set noet sw=4 ts=4:

Modified: incubator/ooo/trunk/main/vcl/Library_vclplug_gtk.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/Library_vclplug_gtk.mk?rev=1230097&r1=1230096&r2=1230097&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/Library_vclplug_gtk.mk (original)
+++ incubator/ooo/trunk/main/vcl/Library_vclplug_gtk.mk Wed Jan 11 15:37:34 2012
@@ -55,14 +55,18 @@ $(eval $(call gb_Library_set_defs,vclplu
 ))
 $(eval $(call gb_Library_set_ldflags,vclplug_gtk,\
     $$(LDFLAGS) \
-    $(shell pkg-config --libs dbus-glib-1)\
+))
+$(eval $(call gb_Library_add_external_libs,vclplug_gtk,	\
+    $(shell pkg-config --libs dbus-glib-1)		\
 ))
 endif
 
-$(eval $(call gb_Library_set_ldflags,vclplug_gtk,\
-    $$(LDFLAGS) \
-    $$(GTK_LIBS) \
-    $$(GTHREAD_LIBS) \
+$(eval $(call gb_Library_set_ldflags,vclplug_gtk,	\
+    $$(LDFLAGS)						\
+    $(filter-out -l%,$(GTK_LIBS))			\
+))
+$(eval $(call gb_Library_add_external_libs,vclplug_gtk,	\
+    $(patsubst -l%,%, $(filter -l%, $(GTK_LIBS)))	\
 ))
 
 $(eval $(call gb_Library_add_linked_libs,vclplug_gtk,\
@@ -125,4 +129,5 @@ $(eval $(call gb_Library_add_linked_libs
 	pthread \
 ))
 endif
+
 # vim: set noet sw=4 ts=4:



Mime
View raw message