extensions/Library_OOoSpotlightImporter.mk |    4 +---
 solenv/gbuild/platform/macosx.mk           |   13 +++++++++++--
 2 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 0dd3e081fbea5b917d4635de9b5cf15db217063c
Author: Michael Stahl <mst...@redhat.com>
Date:   Wed Jan 4 21:29:11 2012 +0100

    gbuild: macosx.mk: add gb_Library_Bundle
    
    ...and use it to build OOoSpotlightImporter.
    
    This isn't particularly elegant, but then again, why the heck does dyld
    have different dynamic library types in the first place?

diff --git a/extensions/Library_OOoSpotlightImporter.mk 
b/extensions/Library_OOoSpotlightImporter.mk
index f8a4c3c..336cf4d 100644
--- a/extensions/Library_OOoSpotlightImporter.mk
+++ b/extensions/Library_OOoSpotlightImporter.mk
@@ -28,7 +28,7 @@
 # instead of those above.
 #
 
-$(eval $(call gb_Library_Library,OOoSpotlightImporter))
+$(eval $(call gb_Library_Bundle,OOoSpotlightImporter))
 
 $(eval $(call gb_Library_add_objcobjects,OOoSpotlightImporter,\
        extensions/source/macosx/spotlight/GetMetadataForFile \
@@ -45,8 +45,6 @@ $(eval $(call gb_Library_add_ldflags,OOoSpotlightImporter,\
        -framework Foundation \
        -framework CoreServices \
 ))
-#      -bundle \
-
 
 $(eval $(call gb_Library_use_external,OOoSpotlightImporter,zlib))
 
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 114dd16..7b2517b 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -187,6 +187,7 @@ $(call gb_Helper_abbreviate_dirs,\
        DYLIB_FILE=`$(gb_MKTEMP)` && \
        $(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
                $(if $(filter 
Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
+               $(if $(filter 
Bundle,$(TARGETTYPE)),$(gb_Bundle_TARGETTYPEFLAGS)) \
                $(if $(filter Library 
CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
                $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
                $(subst \d,$$,$(RPATH)) \
@@ -194,6 +195,7 @@ $(call gb_Helper_abbreviate_dirs,\
                $(patsubst lib%.dylib,-l%,$(foreach lib,$(LINKED_LIBS),$(call 
gb_Library_get_filename,$(lib)))) > $${DYLIB_FILE} && \
        $(gb_CXX) \
                $(if $(filter 
Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
+               $(if $(filter 
Bundle,$(TARGETTYPE)),$(gb_Bundle_TARGETTYPEFLAGS)) \
                $(if $(filter Library 
CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
                $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
                $(subst \d,$$,$(RPATH)) \
@@ -214,7 +216,7 @@ $(call gb_Helper_abbreviate_dirs,\
     $(if $(filter Executable,$(TARGETTYPE)), \
         $(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl Executable \
             $(LAYER) $(1) &&) \
-       $(if $(filter Library CppunitTest,$(TARGETTYPE)),\
+       $(if $(filter Library Bundle CppunitTest,$(TARGETTYPE)),\
                $(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl Library 
$(LAYER) $(if $(SOVERSION),$(1).$(SOVERSION),$(1)) && \
                ln -sf $(1) $(patsubst %.dylib,%.jnilib,$(1)) &&) \
        rm -f $${DYLIB_FILE})
@@ -237,7 +239,7 @@ endef
 
 define gb_LinkTarget__command
 $(call gb_Output_announce,$(2),$(true),LNK,4)
-$(if $(filter Library CppunitTest Executable,$(TARGETTYPE)),$(call 
gb_LinkTarget__command_dynamiclink,$(1),$(2)))
+$(if $(filter Library Bundle CppunitTest Executable,$(TARGETTYPE)),$(call 
gb_LinkTarget__command_dynamiclink,$(1),$(2)))
 $(if $(filter StaticLibrary,$(TARGETTYPE)),$(call 
gb_LinkTarget__command_staticlink,$(1)))
 endef
 
@@ -246,6 +248,7 @@ endef
 
 gb_Library_DEFS :=
 gb_Library_TARGETTYPEFLAGS := -dynamiclib -single_module
+gb_Bundle_TARGETTYPEFLAGS := -bundle
 gb_Library_SYSPRE := lib
 gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
 gb_Library_PLAINEXT := .dylib
@@ -305,6 +308,12 @@ endef
 
 gb_Library__set_soversion_script_platform = $(gb_Library__set_soversion_script)
 
+# bundle is a special kind of library that exists only on Darwin/OSX
+# set the TARGETTYPE to Bundle
+define gb_Library_Bundle
+$(call gb_Library_Library,$(1))
+$(call gb_LinkTarget_set_targettype,$(call 
gb_Library_get_linktargetname,$(1)),Bundle)
+endef
 
 # StaticLibrary class
 
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to