summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorRMZeroFour <ritobroto04@gmail.com>2024-06-23 12:31:16 +0530
committerMike Kaganski <mike.kaganski@collabora.com>2024-06-27 18:18:49 +0200
commitdd13569254e832d48bcdc7e612aaa1d7909708b0 (patch)
tree55f01c876119618f16c4f0f7a9f6dd7afc697965 /solenv
parentf5f5ff719f30fccd207e36627f2e42b34d0a6fb1 (diff)
.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.kaganski@collabora.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/DotnetLibrary.mk23
1 files changed, 9 insertions, 14 deletions
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