summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/Package.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index 2a1fd5380926..606bca3501df 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -135,6 +135,18 @@ gb_Package_OUTDIR_$(1) := $(2)
endef
+define gb_Package_add_symbolic_link
+$(call gb_Package__check,$(1))
+$(if $(strip $(3)),,$(call gb_Output_error,gb_Package_add_symbolic_link requires 3 arguments))
+$(call gb_Package_get_target,$(1)) : $$(gb_Package_OUTDIR_$(1))/$(2)
+$$(gb_Package_OUTDIR_$(1))/$(2) : $$(dir $$(gb_Package_OUTDIR_$(1))/$(2)).dir
+ rm -f $$@ && ln -s $(3) $$@
+
+$(call gb_Package_get_target,$(1)) : FILES += $$(gb_Package_OUTDIR_$(1))/$(2)
+$(call gb_Package_get_clean_target,$(1)) : FILES += $$(gb_Package_OUTDIR_$(1))/$(2)
+
+endef
+
define gb_Package_add_file
$(call gb_Package__check,$(1))
$(if $(strip $(3)),,$(call gb_Output_error,gb_Package_add_file requires 3 arguments))