[Libreoffice-commits] .: Branch 'feature/gbuild_ure' - 3 commits - cli_ure/CliNativeLibrary_cli_cppuhelper.mk cli_ure/CustomTarget_cli_ure_assemblies.mk solenv/gbuild

David Tardon dtardon at kemper.freedesktop.org
Mon Aug 6 09:51:37 PDT 2012


 cli_ure/CliNativeLibrary_cli_cppuhelper.mk |    5 +++++
 cli_ure/CustomTarget_cli_ure_assemblies.mk |    8 ++++++--
 solenv/gbuild/CliNativeLibrary.mk          |   25 +++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 2 deletions(-)

New commits:
commit 431a4c7685ba563676b93da95adb5d48edd53627
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Aug 6 18:47:50 2012 +0200

    add missing deps
    
    Change-Id: I11219716e92c8337a0dcbf2e4fc54e98fc35a67d

diff --git a/cli_ure/CliNativeLibrary_cli_cppuhelper.mk b/cli_ure/CliNativeLibrary_cli_cppuhelper.mk
index 2e1ead7..23ed5fa 100644
--- a/cli_ure/CliNativeLibrary_cli_cppuhelper.mk
+++ b/cli_ure/CliNativeLibrary_cli_cppuhelper.mk
@@ -17,4 +17,9 @@ $(eval $(call gb_CliNativeLibrary_set_configfile,cli_cppuhelper,cli_ure/source/n
 
 $(eval $(call gb_CliNativeLibrary_set_policy,cli_cppuhelper,$(CLI_CPPUHELPER_POLICY_ASSEMBLY),$(CLI_CPPUHELPER_POLICY_VERSION)))
 
+$(eval $(call gb_CliNativeLibrary_use_assemblies,cli_cppuhelper,\
+	cli_ure \
+	cli_uretypes \
+))
+
 # vim: set noet sw=4 ts=4:
commit f183a066d6138db0ad6fe0124083b1a15a9501b8
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Aug 6 18:47:02 2012 +0200

    allow CliNativeLibrary to depend on other assemblies
    
    Change-Id: I9b7e4c0f155e38d551c677803ee94b80639eb5de

diff --git a/solenv/gbuild/CliNativeLibrary.mk b/solenv/gbuild/CliNativeLibrary.mk
index a11c1d1..87909da 100644
--- a/solenv/gbuild/CliNativeLibrary.mk
+++ b/solenv/gbuild/CliNativeLibrary.mk
@@ -39,6 +39,7 @@ $(call gb_CliNativeLibraryTarget_get_clean_target,%) :
 	)
 
 define gb_CliNativeLibraryTarget_CliNativeLibraryTarget
+$(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_ASSEMBLIES := $(gb_Helper_MISCDUMMY)
 $(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_KEYFILE :=
 $(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_LIBRARY :=
 
@@ -46,9 +47,13 @@ $(call gb_CliNativeLibraryTarget_get_target,$(1)) :| $(dir $(call gb_CliNativeLi
 
 endef
 
+# TODO gb_Library_get_target might be sufficient here. I do not know if
+# #using <assembly.dll> actually does anything at compile time, or if it is
+# only needed at link time.
 define gb_CliNativeLibraryTarget_wrap_library
 $(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_LIBRARY := $(call gb_CliNativeLibraryTarget__get_library,$(2))
 $(call gb_CliNativeLibraryTarget_get_target,$(1)) : $(call gb_Library_get_target,$(2))
+$(call gb_Library_get_external_headers_target,$(2)) : $$(CLI_NATIVE_ASSEMBLIES)
 
 endef
 
@@ -58,6 +63,16 @@ $(call gb_CliNativeLibraryTarget_get_target,$(1)) : $(2)
 
 endef
 
+define gb_CliNativeLibraryTarget_use_assembly
+$(call gb_CliNativeLibraryTarget_get_target,$(1)) : CLI_NATIVE_ASSEMBLIES += $(call gb_CliLibrary_get_target,$(2))
+
+endef
+
+define gb_CliNativeLibraryTarget_use_assemblies
+$(foreach assembly,$(2),$(call gb_CliNativeLibraryTarget_use_assembly,$(1),$(assembly)))
+
+endef
+
 # CliNativeLibrary class
 
 gb_CliNativeLibrary_PLATFORM_DEFAULT := x86
@@ -111,4 +126,14 @@ $(call gb_CliNativeLibraryTarget_wrap_library,$(1),$(2))
 
 endef
 
+define gb_CliNativeLibrary_use_assembly
+$(call gb_CliNativeLibraryTarget_use_assembly,$(1),$(2))
+
+endef
+
+define gb_CliNativeLibrary_use_assemblies
+$(call gb_CliNativeLibraryTarget_use_assemblies,$(1),$(2))
+
+endef
+
 # vim: set noet sw=4 ts=4:
commit 0705eb2177945de3a15f828b2dfe9efa6efc9304
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Aug 6 18:38:15 2012 +0200

    use S.R.AssemblyKeyFile attribute if compiler version is sufficient
    
    Change-Id: I5b80ca69637fe801e8392281669aaef421ee0553

diff --git a/cli_ure/CustomTarget_cli_ure_assemblies.mk b/cli_ure/CustomTarget_cli_ure_assemblies.mk
index 4e200c8..bed0143 100644
--- a/cli_ure/CustomTarget_cli_ure_assemblies.mk
+++ b/cli_ure/CustomTarget_cli_ure_assemblies.mk
@@ -9,6 +9,10 @@
 
 cli_ure_source_MAKEFILE := $(lastword $(MAKEFILE_LIST))
 
+# FIXME move this to configure.in ?
+cli_ure_CCNUMVER = $(shell $(CC) -V | $(gb_AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk)
+cli_ure_CCNUMVER_GOOD = $(shell expr $(cli_ure_CCNUMVER) -ge 001399999999)
+
 include $(SRCDIR)/cli_ure/version/version.txt
 
 $(eval $(call gb_CustomTarget_CustomTarget,cli_ure/source))
@@ -39,7 +43,7 @@ $(call gb_CustomTarget_get_workdir,cli_ure/source)/ure/assembly.cs : \
 $(call gb_CustomTarget_get_workdir,cli_ure/source)/basetypes/assembly.cs :
 	$(GNUCOPY) $< $@.tmp && \
 	echo '[assembly:System.Reflection.AssemblyVersion( "$(CLI_BASETYPES_NEW_VERSION)" )]' >> $@.tmp && \
-	$(if $(cli_ure_CCNUMVER),echo '[assembly:System.Reflection.AssemblyKeyFile( @"$(OUTDIR)/bin/cliuno.snk" )]' >> $@.tmp &&) \
+	$(if $(cli_ure_CCNUMVER_GOOD),echo '[assembly:System.Reflection.AssemblyKeyFile( @"$(OUTDIR)/bin/cliuno.snk" )]' >> $@.tmp &&) \
 	mv $@.tmp $@
 
 # TODO use macros for this
@@ -52,7 +56,7 @@ $(call gb_CustomTarget_get_workdir,cli_ure/source)/native/assembly.cxx :
 $(call gb_CustomTarget_get_workdir,cli_ure/source)/ure/assembly.cs :
 	$(GNUCOPY) $< $@.tmp && \
 	echo '[assembly:System.Reflection.AssemblyVersion( "$(CLI_URE_NEW_VERSION)" )]' >> $@.tmp && \
-	$(if $(cli_ure_CCNUMVER),echo '[assembly:System.Reflection.AssemblyKeyFile( @"$(OUTDIR)/bin/cliuno.snk" )]' >> $@.tmp &&) \
+	$(if $(cli_ure_CCNUMVER_GOOD),echo '[assembly:System.Reflection.AssemblyKeyFile( @"$(OUTDIR)/bin/cliuno.snk" )]' >> $@.tmp &&) \
 	mv $@.tmp $@
 
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list