.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>
This commit is contained in:
RMZeroFour 2024-06-23 12:31:16 +05:30 committed by Mike Kaganski
parent f5f5ff719f
commit dd13569254
4 changed files with 20 additions and 22 deletions

View file

@ -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,\

View file

@ -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))

View file

@ -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))

View file

@ -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