net_ure/DotnetLibrary_net_basetypes.mk |   13 +++++++------
 net_ure/DotnetLibrary_net_oootypes.mk  |    3 ++-
 net_ure/DotnetLibrary_net_uretypes.mk  |    3 ++-
 solenv/gbuild/DotnetLibrary.mk         |   23 +++++++++--------------
 4 files changed, 20 insertions(+), 22 deletions(-)

New commits:
commit dd13569254e832d48bcdc7e612aaa1d7909708b0
Author:     RMZeroFour <ritobrot...@gmail.com>
AuthorDate: Sun Jun 23 12:31:16 2024 +0530
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Jun 27 18:18:49 2024 +0200

    .NET Bindings: Remove absolute path check in DotnetLibrary
    
    This commit removes the gb_DotnetLibrary__ensure_absolute gbuild
    function that was breaking out-of-source directory builds.
    
    Code using that function was changed to accept already absolute paths
    as arguments.
    
    Change-Id: I6d9d3dac33e296cf0e69910f16564d822047857e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169353
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/net_ure/DotnetLibrary_net_basetypes.mk 
b/net_ure/DotnetLibrary_net_basetypes.mk
index b8500fd7aa26..b6a847838344 100644
--- a/net_ure/DotnetLibrary_net_basetypes.mk
+++ b/net_ure/DotnetLibrary_net_basetypes.mk
@@ -9,12 +9,13 @@
 $(eval $(call gb_DotnetLibrary_CsLibrary,net_basetypes))
 
 $(eval $(call gb_DotnetLibrary_add_sources,net_basetypes,\
-    net_ure/source/basetypes/Any.cs \
-    net_ure/source/basetypes/BoundAttribute.cs \
-    net_ure/source/basetypes/Exception.cs \
-    net_ure/source/basetypes/IQueryInterface.cs \
-    net_ure/source/basetypes/RaisesAttribute.cs \
-    net_ure/source/basetypes/UnoGeneratedAttribute.cs \
+    $(SRCDIR)/net_ure/source/basetypes, \
+        Any.cs \
+        BoundAttribute.cs \
+        Exception.cs \
+        IQueryInterface.cs \
+        RaisesAttribute.cs \
+        UnoGeneratedAttribute.cs \
 ))
 
 $(eval $(call gb_DotnetLibrary_add_properties,net_basetypes,\
diff --git a/net_ure/DotnetLibrary_net_oootypes.mk 
b/net_ure/DotnetLibrary_net_oootypes.mk
index f799f5056764..b21f1bb92945 100644
--- a/net_ure/DotnetLibrary_net_oootypes.mk
+++ b/net_ure/DotnetLibrary_net_oootypes.mk
@@ -12,7 +12,8 @@ $(call gb_DotnetLibrary_get_target,net_oootypes) : \
     $(call gb_CustomTarget_get_target,net_oootypes)
 
 $(eval $(call gb_DotnetLibrary_add_generated_sources,net_oootypes,\
-    $(gb_CustomTarget_workdir)/net_ure/net_oootypes/**/*.cs \
+    $(gb_CustomTarget_workdir)/net_ure/net_oootypes, \
+        **/*.cs \
 ))
 
 $(eval $(call gb_DotnetLibrary_link_cs_library,net_oootypes,net_uretypes))
diff --git a/net_ure/DotnetLibrary_net_uretypes.mk 
b/net_ure/DotnetLibrary_net_uretypes.mk
index a5e6968887c2..747e4574ecb9 100644
--- a/net_ure/DotnetLibrary_net_uretypes.mk
+++ b/net_ure/DotnetLibrary_net_uretypes.mk
@@ -12,7 +12,8 @@ $(call gb_DotnetLibrary_get_target,net_uretypes) : \
     $(call gb_CustomTarget_get_target,net_uretypes)
 
 $(eval $(call gb_DotnetLibrary_add_generated_sources,net_uretypes,\
-    $(gb_CustomTarget_workdir)/net_ure/net_uretypes/**/*.cs \
+    $(gb_CustomTarget_workdir)/net_ure/net_uretypes, \
+        **/*.cs \
 ))
 
 $(eval $(call gb_DotnetLibrary_link_cs_library,net_uretypes,net_basetypes))
diff --git a/solenv/gbuild/DotnetLibrary.mk b/solenv/gbuild/DotnetLibrary.mk
index 190a0059e724..9d20638f0738 100644
--- a/solenv/gbuild/DotnetLibrary.mk
+++ b/solenv/gbuild/DotnetLibrary.mk
@@ -33,11 +33,6 @@ $(strip $(subst ",\",$(1)))
 
 endef
 
-define gb_DotnetLibrary__ensure_absolute
-$(if $(filter $(SRCDIR)%,$(1)),$(1),$(SRCDIR)/$(1))
-
-endef
-
 ####### Build and Clean Targets #########
 
 .PHONY : $(call gb_DotnetLibrary_get_clean_target,%)
@@ -136,19 +131,19 @@ endef
 # Add one source file to the project file
 # This adds it to the project, and makes it a build dependency
 # so the library is rebuilt if the source changes
-# call gb_DotnetLibrary_add_source,target,source
+# call gb_DotnetLibrary_add_source,target,basedir,source
 define gb_DotnetLibrary_add_source
-$(call gb_DotnetLibrary_get_target,$(1)) : $(call 
gb_DotnetLibrary__ensure_absolute,$(strip $(2)))
-$(call gb_DotnetLibrary_add_items,$(1),<Compile Include="$(call 
gb_DotnetLibrary__ensure_absolute,$(strip $(2)))"/>)
+$(call gb_DotnetLibrary_get_target,$(1)) : $(strip $(2))/$(strip $(3))
+$(call gb_DotnetLibrary_add_items,$(1),<Compile Include="$(strip $(2))/$(strip 
$(3))"/>)
 
 endef
 
 # Add source files to the project file
 # This adds them to the project, and makes it them build dependency
 # so the library is rebuilt if the sources change
-# call gb_DotnetLibrary_add_sources,target,sources
+# call gb_DotnetLibrary_add_sources,target,basedir,sources
 define gb_DotnetLibrary_add_sources
-$(foreach source,$(2),$(call gb_DotnetLibrary_add_source,$(1),$(source)))
+$(foreach source,$(3),$(call gb_DotnetLibrary_add_source,$(1),$(2),$(source)))
 
 endef
 
@@ -156,9 +151,9 @@ endef
 # This is not marked as makefile build dependency,
 # so the library is NOT rebuilt if this source changes
 # Useful for things like source globs supported by .net projects
-# call gb_DotnetLibrary_add_generated_source,target,source
+# call gb_DotnetLibrary_add_generated_source,target,basedir,source
 define gb_DotnetLibrary_add_generated_source
-$(call gb_DotnetLibrary_add_items,$(1),<Compile Include="$(call 
gb_DotnetLibrary__ensure_absolute,$(strip $(2)))"/>)
+$(call gb_DotnetLibrary_add_items,$(1),<Compile Include="$(strip $(2))/$(strip 
$(3))"/>)
 
 endef
 
@@ -166,9 +161,9 @@ endef
 # These are not marked as makefile build dependencies,
 # so the library is NOT rebuilt if these sources change
 # Useful for things like source globs supported by .net projects
-# call gb_DotnetLibrary_add_generated_sources,target,sources
+# call gb_DotnetLibrary_add_generated_sources,target,basedir,sources
 define gb_DotnetLibrary_add_generated_sources
-$(foreach source,$(2),$(call 
gb_DotnetLibrary_add_generated_source,$(1),$(source)))
+$(foreach source,$(3),$(call 
gb_DotnetLibrary_add_generated_source,$(1),$(2),$(source)))
 
 endef
 

Reply via email to