From d391d2eb6eafed4506ed4c4e45850cdcfc71361a Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 14 Nov 2002 23:09:18 +0000 Subject: [PATCH] Added AbsSymLink rule. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1941 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- Jamrules | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Jamrules b/Jamrules index f472cdba21..251d39eec5 100644 --- a/Jamrules +++ b/Jamrules @@ -938,6 +938,32 @@ rule RelSymLink LocalClean clean : $(target) ; } +rule AbsSymLink +{ + # RelSymLink : : + # Creates an absolute symbolic link from to . + # and must be usual targets. If is + # given, then it is set as LOCATE directory on . + + LocalDepends files : $(1) ; + Depends $(1) : $(2) ; + if $(3) { + MakeLocate $(1) : $(3) ; + } + SEARCH on $(2) += $(SEARCH_SOURCE) ; + LocalClean clean : $(1) ; +} + +actions AbsSymLink +{ + target="$(2)" + case "$target" in + /*) ;; + *) target=`pwd`/"$target";; + esac + $(RM) "$(1)" && $(LN) -s "$target" "$(1)" +} + #------------------------------------------------------------------------------- # Low-level OBOS utility rules #-------------------------------------------------------------------------------